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:
Alex Roitman
2006-10-07 19:09:05 +00:00
parent ee3d288ad4
commit be4c39a654
5 changed files with 23 additions and 8 deletions

View File

@@ -369,6 +369,7 @@ class GrampsParser(UpdateCallback):
"childref" : (self.start_childref,self.stop_childref),
"personref" : (self.start_personref,self.stop_personref),
"city" : (None, self.stop_city),
"county" : (None, self.stop_county),
"country" : (None, self.stop_country),
"comment" : (None, self.stop_comment),
"created" : (self.start_created, None),
@@ -1641,6 +1642,9 @@ class GrampsParser(UpdateCallback):
def stop_city(self,tag):
self.address.city = tag
def stop_county(self,tag):
self.address.county = tag
def stop_state(self,tag):
self.address.state = tag

View File

@@ -70,7 +70,7 @@ except:
_gzip_ok = 0
_xml_version = "1.1.2"
_xml_version = "1.1.3"
# table for skipping control chars from XML
strip_dict = dict.fromkeys(range(20))
@@ -504,6 +504,7 @@ class XmlWriter(UpdateCallback):
self.write_date(address.get_date_object(),index+2)
self.write_line("street",address.get_street(),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("country",address.get_country(),index+2)
self.write_line("postal",address.get_postal_code(),index+2)