.toxml() fails when <any namespace="##other" processContents="lax"...
Brought to you by:
pabigot
A schema defines an extension point with " <any namespace="##other" processContents="lax" maxOccurs="unbounded"/>".
I create a document containing such an extension with CreateFromDocument(xml). This document cannot be toxml()'ed. The toxml() call fails with
AttributeError: 'Document' object has no attribute 'removeChild'
In reality this is happening with the SAML2 Protocol schema but I have created a simplified example to easily reproduce the problem.
The example contains 5 files:
Fix error that discarded DOM node namespaceURI attribute
Fix reported bug
Fixed on next branch in commit 5bb94cd. This fix depends on the previous commit which ensures the namespaceURI attribute is correctly set in the DOM instance.
Thank you for the prompt fix!
You're welcome; hold on a bit, though, the patch was incomplete when attributes are cloned and I need to update the test before pushing the fix.
Add API-required attribute to saxdom Element class
Fix cloning of nodes with attributes
OK, that should work better. Please open a new ticket if you find something else wrong.