You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the following XML is converted to an OMElement, then written back out, the namespace prefix used by the xsi:type attribute refers to the incorrect namespace URI. That is because the local prefix mapping used in the type name reference is removed from the element that contains the type attribute during parsing.
It appears to be caused by a null return value from the getNsBuilder method of AttributeCollector when it thinks the namespace declaration is redundant.
After conversion to OMElement, xsi:type name cannot be resolved because it is mapped to the wrong namespace URI:
<ns1:A xmlns:ns1="urn:foo">
<ns1:B xmlns:ns1="urn:bar">
<ns2:C xmlns:ns2="urn:bar" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:TypeA"/>
</ns1:B>
</ns1:A>
The text was updated successfully, but these errors were encountered:
Unfortunately I can only help with Woodstox-only part: it may make sense to work with Axiom folks first as integrations often cause problems -- and if it turns out Woodstox has some specific problem add that info.
This because Woodstox does not have any known namespace binding problems and I do not have time or interest to dig through Axiom codebase to see what translations they might do.
About the only thing I would suggest is just that for output they really should use "namespace" repairing mode as that ensures that namespace declarations can not be omitted, and bindings that might be missing are added automatically.
When the following XML is converted to an OMElement, then written back out, the namespace prefix used by the xsi:type attribute refers to the incorrect namespace URI. That is because the local prefix mapping used in the type name reference is removed from the element that contains the type attribute during parsing.
It appears to be caused by a null return value from the getNsBuilder method of AttributeCollector when it thinks the namespace declaration is redundant.
Original XML:
<ns1:A xmlns:ns1="urn:foo">
<ns1:B xmlns:ns1="urn:bar">
<ns2:C xmlns:ns1="urn:foo" xmlns:ns2="urn:bar" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:TypeA"/>
</ns1:B>
</ns1:A>
After conversion to OMElement, xsi:type name cannot be resolved because it is mapped to the wrong namespace URI:
<ns1:A xmlns:ns1="urn:foo">
<ns1:B xmlns:ns1="urn:bar">
<ns2:C xmlns:ns2="urn:bar" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:TypeA"/>
</ns1:B>
</ns1:A>
The text was updated successfully, but these errors were encountered: