2006-10-07 Alex Roitman <shura@gramps-project.org>
* data/grampsxml.dtd: Update DTD for XML 1.1.3. * data/grampsxml.rng: Update schema for XML 1.1.3. * src/GrampsDb/_ReadXML.py (stop_county): Read county. * src/GrampsDb/_WriteXML.py (write_address_list): Write county. svn: r7363
This commit is contained in:
parent
4b2087c749
commit
7cc70a7acf
@ -1,3 +1,9 @@
|
|||||||
|
2006-10-07 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* data/grampsxml.dtd: Update DTD for XML 1.1.3.
|
||||||
|
* data/grampsxml.rng: Update schema for XML 1.1.3.
|
||||||
|
* src/GrampsDb/_ReadXML.py (stop_county): Read county.
|
||||||
|
* src/GrampsDb/_WriteXML.py (write_address_list): Write county.
|
||||||
|
|
||||||
2006-10-06 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
2006-10-06 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
* src/PluginUtils/_Plugins.py: ignore pressing apply without
|
* src/PluginUtils/_Plugins.py: ignore pressing apply without
|
||||||
a plugin being selected
|
a plugin being selected
|
||||||
|
@ -24,15 +24,15 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This is the Document Type Definition file for v1.1.2
|
This is the Document Type Definition file for v1.1.3
|
||||||
of the GRAMPS XML genealogy data format.
|
of the GRAMPS XML genealogy data format.
|
||||||
Please use the following formal public identifier to identify it:
|
Please use the following formal public identifier to identify it:
|
||||||
|
|
||||||
"-//GRAMPS//DTD GRAMPS XML V1.1.2//EN"
|
"-//GRAMPS//DTD GRAMPS XML V1.1.3//EN"
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
<!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.1.2//EN"
|
<!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.1.3//EN"
|
||||||
"http://gramps-project.org/xml/1.1.2/grampsxml.dtd"
|
"http://gramps-project.org/xml/1.1.3/grampsxml.dtd"
|
||||||
[...]>
|
[...]>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ DATABASE
|
|||||||
|
|
||||||
<!ELEMENT database (header, name-formats?, events?, people?, families?,
|
<!ELEMENT database (header, name-formats?, events?, people?, families?,
|
||||||
sources?, places?, objects?, repositories?, bookmark?)>
|
sources?, places?, objects?, repositories?, bookmark?)>
|
||||||
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.1.2/">
|
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.1.3/">
|
||||||
|
|
||||||
<!-- ************************************************************
|
<!-- ************************************************************
|
||||||
HEADER
|
HEADER
|
||||||
@ -144,12 +144,13 @@ GENDER has values of M, F, or U.
|
|||||||
rel CDATA #REQUIRED
|
rel CDATA #REQUIRED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT address ((daterange|dateval|datestr)?,street?,city?,state?,
|
<!ELEMENT address ((daterange|dateval|datestr)?,street?,city?,county?,state?,
|
||||||
country?,postal?,phone?,note?,sourceref?)>
|
country?,postal?,phone?,note?,sourceref?)>
|
||||||
<!ATTLIST address priv (0|1) #IMPLIED>
|
<!ATTLIST address priv (0|1) #IMPLIED>
|
||||||
|
|
||||||
<!ELEMENT street (#PCDATA)>
|
<!ELEMENT street (#PCDATA)>
|
||||||
<!ELEMENT city (#PCDATA)>
|
<!ELEMENT city (#PCDATA)>
|
||||||
|
<!ELEMENT county (#PCDATA)>
|
||||||
<!ELEMENT country (#PCDATA)>
|
<!ELEMENT country (#PCDATA)>
|
||||||
<!ELEMENT postal (#PCDATA)>
|
<!ELEMENT postal (#PCDATA)>
|
||||||
<!ELEMENT state (#PCDATA)>
|
<!ELEMENT state (#PCDATA)>
|
||||||
@ -251,6 +252,7 @@ PLACES
|
|||||||
|
|
||||||
<!ELEMENT location EMPTY>
|
<!ELEMENT location EMPTY>
|
||||||
<!ATTLIST location
|
<!ATTLIST location
|
||||||
|
street CDATA #IMPLIED
|
||||||
city CDATA #IMPLIED
|
city CDATA #IMPLIED
|
||||||
parish CDATA #IMPLIED
|
parish CDATA #IMPLIED
|
||||||
county CDATA #IMPLIED
|
county CDATA #IMPLIED
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
<grammar
|
<grammar
|
||||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
|
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
|
||||||
ns="http://gramps-project.org/xml/1.1.2/"
|
ns="http://gramps-project.org/xml/1.1.3/"
|
||||||
xmlns="http://relaxng.org/ns/structure/1.0">
|
xmlns="http://relaxng.org/ns/structure/1.0">
|
||||||
|
|
||||||
<start><element name="database">
|
<start><element name="database">
|
||||||
@ -232,6 +232,7 @@
|
|||||||
<optional><ref name="date-content"/></optional>
|
<optional><ref name="date-content"/></optional>
|
||||||
<optional><element name="street"><text/></element></optional>
|
<optional><element name="street"><text/></element></optional>
|
||||||
<optional><element name="city"><text/></element></optional>
|
<optional><element name="city"><text/></element></optional>
|
||||||
|
<optional><element name="county"><text/></element></optional>
|
||||||
<optional><element name="state"><text/></element></optional>
|
<optional><element name="state"><text/></element></optional>
|
||||||
<optional><element name="country"><text/></element></optional>
|
<optional><element name="country"><text/></element></optional>
|
||||||
<optional><element name="postal"><text/></element></optional>
|
<optional><element name="postal"><text/></element></optional>
|
||||||
@ -369,6 +370,7 @@
|
|||||||
<attribute name="lat"><data type="float"/></attribute>
|
<attribute name="lat"><data type="float"/></attribute>
|
||||||
</element></optional>
|
</element></optional>
|
||||||
<zeroOrMore><element name="location">
|
<zeroOrMore><element name="location">
|
||||||
|
<optional><attribute name="street"><text/></attribute></optional>
|
||||||
<optional><attribute name="city"><text/></attribute></optional>
|
<optional><attribute name="city"><text/></attribute></optional>
|
||||||
<optional><attribute name="parish"><text/></attribute></optional>
|
<optional><attribute name="parish"><text/></attribute></optional>
|
||||||
<optional><attribute name="county"><text/></attribute></optional>
|
<optional><attribute name="county"><text/></attribute></optional>
|
||||||
|
@ -369,6 +369,7 @@ class GrampsParser(UpdateCallback):
|
|||||||
"childref" : (self.start_childref,self.stop_childref),
|
"childref" : (self.start_childref,self.stop_childref),
|
||||||
"personref" : (self.start_personref,self.stop_personref),
|
"personref" : (self.start_personref,self.stop_personref),
|
||||||
"city" : (None, self.stop_city),
|
"city" : (None, self.stop_city),
|
||||||
|
"county" : (None, self.stop_county),
|
||||||
"country" : (None, self.stop_country),
|
"country" : (None, self.stop_country),
|
||||||
"comment" : (None, self.stop_comment),
|
"comment" : (None, self.stop_comment),
|
||||||
"created" : (self.start_created, None),
|
"created" : (self.start_created, None),
|
||||||
@ -1641,6 +1642,9 @@ class GrampsParser(UpdateCallback):
|
|||||||
def stop_city(self,tag):
|
def stop_city(self,tag):
|
||||||
self.address.city = tag
|
self.address.city = tag
|
||||||
|
|
||||||
|
def stop_county(self,tag):
|
||||||
|
self.address.county = tag
|
||||||
|
|
||||||
def stop_state(self,tag):
|
def stop_state(self,tag):
|
||||||
self.address.state = tag
|
self.address.state = tag
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ except:
|
|||||||
_gzip_ok = 0
|
_gzip_ok = 0
|
||||||
|
|
||||||
|
|
||||||
_xml_version = "1.1.2"
|
_xml_version = "1.1.3"
|
||||||
|
|
||||||
# table for skipping control chars from XML
|
# table for skipping control chars from XML
|
||||||
strip_dict = dict.fromkeys(range(20))
|
strip_dict = dict.fromkeys(range(20))
|
||||||
@ -504,6 +504,7 @@ class XmlWriter(UpdateCallback):
|
|||||||
self.write_date(address.get_date_object(),index+2)
|
self.write_date(address.get_date_object(),index+2)
|
||||||
self.write_line("street",address.get_street(),index+2)
|
self.write_line("street",address.get_street(),index+2)
|
||||||
self.write_line("city",address.get_city(),index+2)
|
self.write_line("city",address.get_city(),index+2)
|
||||||
|
self.write_line("county",address.get_county(),index+2)
|
||||||
self.write_line("state",address.get_state(),index+2)
|
self.write_line("state",address.get_state(),index+2)
|
||||||
self.write_line("country",address.get_country(),index+2)
|
self.write_line("country",address.get_country(),index+2)
|
||||||
self.write_line("postal",address.get_postal_code(),index+2)
|
self.write_line("postal",address.get_postal_code(),index+2)
|
||||||
|
Loading…
Reference in New Issue
Block a user