#350 Copying namespace nodes

v8.4
closed
5
2012-10-08
2005-04-18
Michael Kay
No

When an unnamed namespace node (a node for the default
namespace) is copied from the source document to the
result document, a failure such as an
ArrayIndexOutOfBounds may occur.

Note that this only applies to explicit copying of
namespace nodes using an instruction such as
<xsl:sequence select="namespace::*">. The problem does
not occur when namespaces are copied implicitly along
with their parent element.

Source fix:

In net.sf.saxon.om.NamespaceIterator line 589, change
the copy() method to read:

    public void copy(Receiver out, int

whichNamespaces, boolean copyAnnotations, int
locationId) throws XPathException {
out.namespace(nscode, 0);
}

Test case added: nspc69

Discussion