Skip to content

Commit ed07dba

Browse files
authored
Merge pull request #245 from dapper91/fix/reserved-namespace
fix: reserved namespaces registration skipped
2 parents 9105bd6 + 088a04a commit ed07dba

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)