From 0df58582b2d6adb23db4f19b302dedb0dca14686 Mon Sep 17 00:00:00 2001 From: Michiel Nauta Date: Wed, 13 Apr 2011 17:31:45 +0000 Subject: [PATCH] Align code with DTD/schema svn: r17116 --- data/grampsxml.dtd | 2 +- data/grampsxml.rng | 2 +- src/plugins/import/ImportXml.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) 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