#200 ArrayBoundCheck failure with as="node()*" on xsl:template

v7.9
closed
5
2012-10-08
2004-03-19
Michael Kay
No

An as="SequenceType" clause on xsl:template or
xsl:sequence causes the current output tree to be
prematurely condensed. Condensing a tree with no
attributes on it causes an array bound check failure if
there is a subsequent attempt to add attributes to the
tree.

Several changes made here, not yet fully regression tested:

(a) in SequenceChecker.finalCheck(), avoid the call on
endDocument()

(b) in Sequence.processLeavingTail(), change the call
on controller.resetOutputDestination(out) to
controller.setReceiver(out)

(c) in TinyDocumentImpl.ensureAttributeCapacity after
the initial assignment to "int k", add "if (k==0)
k=10;". This is just defensive programming against a
situation that shouldn't occur.

MHK

Discussion