From de50f13043994ad989afdefb5abb72d074c29a39 Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Fri, 17 Jun 2022 17:01:07 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20alto4pandas:=20Determine=20ALTO?= =?UTF-8?q?=20namespace=20for=20group?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qurator/modstool/alto4pandas.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qurator/modstool/alto4pandas.py b/qurator/modstool/alto4pandas.py index ceb498a..3f3724b 100755 --- a/qurator/modstool/alto4pandas.py +++ b/qurator/modstool/alto4pandas.py @@ -34,6 +34,8 @@ def alto_to_dict(alto, raise_errors=True): group = list(group) localname = ET.QName(tag).localname + alto_namespace = ET.QName(tag).namespace + namespaces={"alto": alto_namespace} if localname == 'Description': value[localname] = TagGroup(tag, group).is_singleton().has_no_attributes().descend(raise_errors) @@ -76,9 +78,6 @@ def alto_to_dict(alto, raise_errors=True): elif localname == 'Layout': value[localname] = TagGroup(tag, group).is_singleton().has_no_attributes().descend(raise_errors) elif localname == 'Page': - alto_namespace = ET.QName(group[0]).namespace - namespaces={"alto": alto_namespace} - value[localname] = {} value[localname].update(TagGroup(tag, group).is_singleton().attributes()) value[localname].update(TagGroup(tag, group).subelement_counts())