Bug #2000
closedFailure with streaming of xsl:iterate
100%
Description
David Rudel reports on saxon-help list:
I'm having strange results when testing out streaming with xsl:iterate.
My source file looks like this.
<chapter>
<page>
<paragraph/>
<figure/>
<paragraph/>
</page>
<page>
<paragraph/>
<paragraph/>
<paragraph/>
</page>
</chapter>
When I do an xsl:iterate using:
<xsl:iterate select="descendant::element()[name(.)=('figure','paragraph')]">
I get expected behavior. (note that
When I instead do this:
<xsl:iterate select="descendant::element()[name(.)=('page','paragraph')]">
Saxon gets lost.
No errors are reported.
I assume the problem is that some elements are children of elements. However, my script does not use any information requiring the content of the elements.
The script is basically:
<xsl:iterate select="descendant::element()[name(.)=('page','paragraph')]">
<xsl:text>
</xsl:text>
<xsl:value-of select="name(.)"/>
</xsl:iterate>
I adapted the test as iterate-098 in the XSLT 3.0 test suite. It's working on the 9.6 snapshot but in 9.5 I get different symptoms, namely
java.lang.ClassCastException: net.sf.saxon.expr.XPathContextMinor cannot be cast to net.sf.saxon.expr.XPathContextMajor
at com.saxonica.stream.watch.IterateWatch.endSelectedParentNode(IterateWatch.java:166)
at com.saxonica.stream.watch.WatchManager.endElement(WatchManager.java:369)
at net.sf.saxon.event.StartTagBuffer.endElement(StartTagBuffer.java:274)
Please register to edit this issue