Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Cannot Reproduce
-
1.3.3, 1.3.4
-
None
Description
The DOMUtils.cloneNode code doesn't handle default namespace declarations correctly when processing an XQuery result from Saxon.
For example:
<ns1:parent xmlns:ns1="abc">
<ns1:child xmlns="def">
<ns2:nestedChild xmlns:ns2="def"/>
</ns1:child>
</ns1:parent>
results in:
<ns1:parent xmlns:ns1="abc">
<ns1:child xmlns:xmlns="def">
<ns2:nestedChild xmlns:ns2="def"/>
</ns1:child>
</ns1:parent>
Notice that the default namespace has been rewritten as xmlns:xmlns which is invalid.
Granted the above example is a bit odd, but strange things can happen when passing nodes in and out of XSLT and XQuery with respect to namespace declarations.