Bug #2561
closed
java.lang.NullPointerException with nested xsl:iterate
Category:
XSLT conformance
Applies to branch:
9.6, 9.7
Fix Committed on Branch:
9.6, 9.7
Fixed in Maintenance Release:
Description
When using one iterate inside another iterate, I'm getting a java.lang.NullPointerException.
A repro script code is:
<xsl:template match="/">
<xsl:iterate select="//row">
<xsl:variable name="days.left" as="xs:integer">
<xsl:iterate select="following-sibling::row">
<xsl:param name="days" select="0"/>
<xsl:on-completion>
<xsl:sequence select="$days"/>
</xsl:on-completion>
<xsl:next-iteration>
<xsl:with-param name="days" select="$days + 1"/>
</xsl:next-iteration>
</xsl:iterate>
</xsl:variable>
<day date="{@Date}" days.left="{$days.left}"/>
</xsl:iterate>
</xsl:template>
I'm getting the error regardless of whether the internal iterate is inside a variable or not.
Files
- Subject changed from java.lang.NullPointerException with nested iterate to java.lang.NullPointerException with nested xsl:iterate
- Category set to XSLT conformance
- Status changed from New to In Progress
- Priority changed from Low to Normal
- Applies to branch 9.6, 9.7 added
Thanks for reporting it. Have reproduced it on Saxon 9.7, running with the stylesheet itself as source document.
- Status changed from In Progress to Resolved
- Fix Committed on Branch 9.6, 9.7 added
Patch committed on the 9.6 and 9.7 branches. The recursive search for nested xsl:next-iteration instructions should not extend into a nested xsl:iterate instruction.
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.7.0.2 added
Bug fix applied in the Saxon 9.7.0.2 maintenance release
- Fixed in Maintenance Release 9.7.0.3 added
- Fixed in Maintenance Release deleted (
9.7.0.2)
Bug fix applied in the 9.7.0.3 maintenance release. Leave open until fix applied in the 9.6 branch
- Status changed from Resolved to Closed
- Fixed in Maintenance Release 9.6.0.9 added
- Fixed in Maintenance Release deleted (
9.7.0.3)
Bug fix applied in the Saxon 9.6.0.9 maintenance release.
- Fixed in Maintenance Release 9.7.0.3 added
- Sprint/Milestone set to 9.7.0.3
Please register to edit this issue
Also available in: Atom
PDF