Working XML import with new surnames

svn: r15947
This commit is contained in:
Benny Malengier
2010-10-02 12:52:14 +00:00
parent e9599d762d
commit 043d35a354
3 changed files with 195 additions and 81 deletions

View File

@@ -55,7 +55,7 @@ DATABASE
<!ELEMENT database (header, name-formats?, events?, people?, families?,
sources?, places?, objects?, repositories?, notes?,
bookmarks?,namemaps?)>
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.3.0/">
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.4.0/">
<!-- ************************************************************
HEADER
@@ -96,7 +96,7 @@ PEOPLE
home IDREF #IMPLIED
>
<!ELEMENT person (gender, name*, nick?, eventref*, lds_ord*,
<!ELEMENT person (gender, name*, eventref*, lds_ord*,
objref*, address*, attribute*, url*, childof*,
parentin*, personref*, noteref*, sourceref*)>
<!ATTLIST person
@@ -112,7 +112,7 @@ GENDER has values of M, F, or U.
-->
<!ELEMENT gender (#PCDATA)>
<!ELEMENT name (first?,call?,last?,suffix?,patronymic?,title?,
<!ELEMENT name (first?,call?,surname*,nick?,familynick?,suffix?,title?,group?
(daterange|datespan|dateval|datestr)?,noteref*,sourceref*)>
<!ATTLIST name
alt (0|1) #IMPLIED
@@ -124,16 +124,19 @@ GENDER has values of M, F, or U.
<!ELEMENT first (#PCDATA)>
<!ELEMENT call (#PCDATA)>
<!ELEMENT last (#PCDATA)>
<!ATTLIST last
prefix CDATA #IMPLIED
group CDATA #IMPLIED
>
<!ELEMENT suffix (#PCDATA)>
<!ELEMENT patronymic (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT nick (#PCDATA)>
<!ELEMENT familynick (#PCDATA)>
<!ELEMENT group (#PCDATA)>
<!ELEMENT nick (#PCDATA)>
<!ELEMENT surname (#PCDATA)>
<!ATTLIST surname
prefix CDATA #IMPLIED
primary (0|1) #IMPLIED
derivation CDATA #IMPLIED
connector CDATA #IMPLIED
>
<!ELEMENT childof EMPTY>
<!ATTLIST childof hlink IDREF #REQUIRED

View File

@@ -31,7 +31,7 @@
<grammar
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://gramps-project.org/xml/1.3.0/"
ns="http://gramps-project.org/xml/1.4.0/"
xmlns="http://relaxng.org/ns/structure/1.0">
<start><element name="database">
@@ -150,7 +150,6 @@
<zeroOrMore><element name="name">
<ref name="name-content"/>
</element></zeroOrMore>
<optional><element name="nick"><text/></element></optional>
<zeroOrMore><element name="eventref">
<ref name="eventref-content"/>
</element></zeroOrMore>
@@ -221,13 +220,13 @@
<optional><attribute name="display"><text/></attribute></optional>
<optional><element name="first"><text/></element></optional>
<optional><element name="call"><text/></element></optional>
<optional><element name="last">
<text/>
<optional><attribute name="prefix"><text/></attribute></optional>
<optional><attribute name="group"><text/></attribute></optional>
</element></optional>
<optional><element name="nick"><text/></element></optional>
<optional><element name="familynick"><text/></element></optional>
<optional><element name="group"><text/></element></optional>
<zeroOrMore><element name="surname">
<ref name="surname-content"/>
</element></zeroOrMore>
<optional><element name="suffix"><text/></element></optional>
<optional><element name="patronymic"><text/></element></optional>
<optional><element name="title"><text/></element></optional>
<optional><ref name="date-content"/></optional>
<zeroOrMore><element name="noteref">
@@ -238,6 +237,24 @@
</element></zeroOrMore>
</define>
<define name="surname-content">
<element name="surname">
<text/>
<optional><attribute name="prefix"><text/></attribute></optional>
<optional><attribute name="primary"><choice>
<value>0</value>
<value>1</value>
</choice></attribute></optional>
<optional><attribute name="derivation"><choice>
<value>inherited</value>
<value>patronymic</value>
<value>matronymic</value>
<value>other</value>
</choice></attribute></optional>
<optional><attribute name="connector"><text/></attribute></optional>
</element>
</define>
<define name="address-content">
<optional><attribute name="priv">
<ref name="priv-content"/>