Align code with DTD/schema

svn: r17116
This commit is contained in:
Michiel Nauta 2011-04-13 17:31:45 +00:00
parent 45efb2043c
commit 0df58582b2
3 changed files with 4 additions and 3 deletions

View File

@ -139,7 +139,7 @@ GENDER has values of M, F, or U.
<!ELEMENT surname (#PCDATA)> <!ELEMENT surname (#PCDATA)>
<!ATTLIST surname <!ATTLIST surname
prefix CDATA #IMPLIED prefix CDATA #IMPLIED
primary (1|0) #IMPLIED prim (1|0) #IMPLIED
derivation CDATA #IMPLIED derivation CDATA #IMPLIED
connector CDATA #IMPLIED connector CDATA #IMPLIED
> >

View File

@ -255,7 +255,7 @@
<element name="surname"> <element name="surname">
<text/> <text/>
<optional><attribute name="prefix"><text/></attribute></optional> <optional><attribute name="prefix"><text/></attribute></optional>
<optional><attribute name="primary"><choice> <optional><attribute name="prim"><choice>
<value>1</value> <value>1</value>
<value>0</value> <value>0</value>
</choice></attribute></optional> </choice></attribute></optional>

View File

@ -1791,7 +1791,8 @@ class GrampsParser(UpdateCallback):
self.reporef.ref = handle self.reporef.ref = handle
self.reporef.call_number = attrs.get('callno', '') self.reporef.call_number = attrs.get('callno', '')
self.reporef.media_type.set_from_xml_str(attrs['medium']) if 'medium' in attrs:
self.reporef.media_type.set_from_xml_str(attrs['medium'])
self.reporef.private = bool(attrs.get("priv")) self.reporef.private = bool(attrs.get("priv"))
# we count here on self.source being available # we count here on self.source being available
# reporefs can only be found within source # reporefs can only be found within source