Bug #2561
closedjava.lang.NullPointerException with nested xsl:iterate
100%
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
Updated by David Rudel almost 9 years ago
- File nested_iterate_bug.xsl nested_iterate_bug.xsl added
Uploading actual file.
Updated by Michael Kay almost 9 years ago
- 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.
Updated by Michael Kay almost 9 years ago
- 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.
Updated by O'Neil Delpratt almost 9 years ago
- % 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
Updated by O'Neil Delpratt almost 9 years ago
- 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
Updated by O'Neil Delpratt over 8 years ago
- 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.
Updated by O'Neil Delpratt over 8 years ago
- Fixed in Maintenance Release 9.7.0.3 added
Please register to edit this issue