diff --git a/data/grampsxml.dtd b/data/grampsxml.dtd index bd1370659..49c270243 100644 --- a/data/grampsxml.dtd +++ b/data/grampsxml.dtd @@ -139,7 +139,7 @@ GENDER has values of M, F, or U. diff --git a/data/grampsxml.rng b/data/grampsxml.rng index 6aec238e5..e00b4c741 100644 --- a/data/grampsxml.rng +++ b/data/grampsxml.rng @@ -255,7 +255,7 @@ - + 1 0 diff --git a/src/plugins/import/ImportXml.py b/src/plugins/import/ImportXml.py index c10725c3a..408eca820 100644 --- a/src/plugins/import/ImportXml.py +++ b/src/plugins/import/ImportXml.py @@ -1791,7 +1791,8 @@ class GrampsParser(UpdateCallback): self.reporef.ref = handle 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")) # we count here on self.source being available # reporefs can only be found within source