From: Raphael Michel Date: Wed, 22 Jan 2025 15:40:04 +0000 (+0100) Subject: Clean-up XML namespaces X-Git-Tag: 2025.1.0~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=19393c9b8b24210a1fbb78170a5e10b21683f922;p=thirdparty%2Fpython-drafthorse.git Clean-up XML namespaces --- diff --git a/drafthorse/models/__init__.py b/drafthorse/models/__init__.py index b4a25e2..f82d0aa 100644 --- a/drafthorse/models/__init__.py +++ b/drafthorse/models/__init__.py @@ -1,6 +1,5 @@ NS_RSM = "urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" NS_UDT = "urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" -NS_A = "urn:un:unece:uncefact:data:standard:QualifiedDataType:100" NS_RAM = ( "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" ) diff --git a/drafthorse/models/document.py b/drafthorse/models/document.py index 67a7920..2056eed 100644 --- a/drafthorse/models/document.py +++ b/drafthorse/models/document.py @@ -3,7 +3,7 @@ import xml.etree.cElementTree as ET from .container import StringContainer, Container from .note import IncludedNote -from . import BASIC, EXTENDED, NS_A, NS_QDT, NS_RAM, NS_RSM, NS_UDT +from . import BASIC, EXTENDED, NS_QDT, NS_RAM, NS_RSM, NS_UDT from .elements import Element from .fields import ( DateTimeField, @@ -103,11 +103,10 @@ class Document(Element): def __init__(self): super().__init__() - ET.register_namespace("a", NS_A) ET.register_namespace("rsm", NS_RSM) ET.register_namespace("qdt", NS_QDT) ET.register_namespace("ram", NS_RAM) - ET.register_namespace("xsi", "http://www.w3.org/2001/XMLSchema") + ET.register_namespace("xs", "http://www.w3.org/2001/XMLSchema") ET.register_namespace("udt", NS_UDT) class Meta: