Skip to content

Commit 088a04a

Browse files
committed
fix: reserved namespaces registration skipped.
1 parent 9105bd6 commit 088a04a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pydantic_xml/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def register_nsmap(nsmap: NsMap) -> None:
8181
"""
8282

8383
for prefix, uri in nsmap.items():
84-
if prefix != '': # skip default namespace
84+
if prefix != '' and not re.match(r"ns\d+$", prefix): # skip default namespace and reserved ones
8585
etree.register_namespace(prefix, uri)
8686

8787

0 commit comments

Comments
 (0)