diff --git a/sphinx/builders/xml.py b/sphinx/builders/xml.py index 865820c364c..853eed6dce6 100644 --- a/sphinx/builders/xml.py +++ b/sphinx/builders/xml.py @@ -71,6 +71,7 @@ def write_doc(self, docname: str, doctree: Node) -> None: # work around multiple string % tuple issues in docutils; # replace tuples in attribute values with lists doctree = doctree.deepcopy() + doctree.document.attributes["xmlns:py"] = "https://github.com/sphinx-doc/sphinx/issues/9413" for node in doctree.traverse(nodes.Element): for att, value in node.attributes.items(): if isinstance(value, tuple):