#852 AIOOB serializing a namespace node

v9.1
closed
Michael Kay
s9api API (27)
5
2012-10-08
2008-07-26
Michael Kay
No

An ArrayIndexOutOfBounds exception occurs when calling the toString() method of an XdmNode that represents a namespace node.

The underlying cause of this is in the TreeReceiver class, which is invoked via QueryResult.serialize() when the sequence to be serialized includes a namespace node.

Two patches will be raised:

(a) to cause TreeReceiver.namespace() to throw a NoOpenStartTag exception instead of ArrayIndexOutOfBounds when a top-level namespace node is passed (this mirrors the behaviour with attribute nodes)

(b) to special case namespace nodes in XdmNode.toString(), in rather the same way that attribute nodes are already special-cased, generating the string xmlns="uri" or xmlns:pre="uri" as appropriate.

Discussion

  • Michael Kay
    Michael Kay
    2008-09-02

    Logged In: YES
    user_id=251681
    Originator: YES

    Fixed in 9.1.0.2