-
-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Labels
test-neededIssue waiting for reproduction, ideally as stand-alone unit testIssue waiting for reproduction, ideally as stand-alone unit test
Description
Consider the following setup.
- Instantiate an XMLEventReader reading from an xml file, which root element defines an "xmlns" attribute, and contains unprefixed tags. (As an example, you can fetch the W3C's xmldsig schema )
- Instantiate an XMLEventWriter writing on another file, with IS_REPAIRING_NAMESPACES=true.
- For each event read from the Reader, write it through directly to the Writer.
If aalto-xml 1.0.0 is used as STAX backend, the resulting document's root schema tag's xmlns attribute will be written 3 times, as follows :
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://www.w3.org/2000/09/xmldsig#" version="0.1" elementFormDefault="qualified">
Note that if I simply switch the implementation to woodstox-core 5.0.3, everything works fine, so this is definitely an issue with aalto-xml.
Also note that definitions of prefixed namespaces (like xmlns:xx) are unaffected by the issue : only the "xmlns" attribute is affected.
Metadata
Metadata
Assignees
Labels
test-neededIssue waiting for reproduction, ideally as stand-alone unit testIssue waiting for reproduction, ideally as stand-alone unit test