Error: Circular definition of variable ...
Posted: Mon Jul 28, 2008 5:21 pm
Hi there!
In an XSL I have the following lines of code:
If I do a transformation with the related XML this error occurs:
The confusing thing is, if I change the definition of the variable 'numberOfRoundsToDisplayOnFirstPage' to the following code, everything is fine:
What is wrong here?
Thanks for your help,
phranck
In an XSL I have the following lines of code:
Code: Select all
<xsl:variable name="hasSecondPage">
<xsl:choose>
<xsl:when test="$numberOfRounds = $numberOfRoundsToDisplayOnFirstPage and $numberOfRounds > $maxNumberOfRoundsOnFirstPage">
<xsl:value-of select="true()"/>
</xsl:when>
<xsl:when test="($numberOfRoundsToDisplayOnFirstPage < ($numberOfRounds + 1)) and ($numberOfRounds != $numberOfRoundsToDisplayOnFirstPage)">
<xsl:value-of select="true()"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="false()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="numberOfRoundsToDisplayOnFirstPage" as="xs:integer">
<xsl:variable name="rounds" select="/tourmatchesreport/tourmatchesreportitem/numberOfRoundsToDisplayOnFirstPage" as="xs:integer"/>
<xsl:choose>
<xsl:when test="$hasSecondPage = true()">
<xsl:value-of select="$rounds"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$rounds + 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
Code: Select all
SystemID: ~/Developer/theLeague/TennisFramework/tournamentMatchesReportRaster64.xsl
Description: Circular definition of variable hasSecondPage
Code: Select all
<xsl:variable name="numberOfRoundsToDisplayOnFirstPage" select="/tourmatchesreport/tourmatchesreportitem/numberOfRoundsToDisplayOnFirstPage" as="xs:integer" />
Thanks for your help,
phranck