Project

Profile

Help

Bug #2561

closed

java.lang.NullPointerException with nested xsl:iterate

Added by David Rudel almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
XSLT conformance
Sprint/Milestone:
Start date:
2015-12-28
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.6, 9.7
Fix Committed on Branch:
9.6, 9.7
Fixed in Maintenance Release:
Platforms:

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

nested_iterate_bug.xsl (732 Bytes) nested_iterate_bug.xsl David Rudel, 2015-12-28 13:59

Please register to edit this issue

Also available in: Atom PDF