M
matatu
Hi to everybody,
It's possible to exit from a cycle for-each?
I have this code:
1: <xsl:for-each select="field">
2: <xsl:variable name="tagfield" select="@tag"/>
3: <xsl:variable name="pos" select="position()"/>
4: <xsl:for-each select="/root/ass/istance">
5: <xsl:choose>
6: <xsl:when test="number($tagfield) != number(tag/@name)">
7: <xsl:call-template name="handle-tilde"/>
8: </xsl:when>
9: <xsl:when test="number($tagfield) = number(tag/@name)">
10: <xsl:apply-templates select="/root/record/fields/field[$pos]"/>
11: </xsl:when>
12: </xsl:choose>
13: </xsl:for-each>
14: <xsl:value-of select="'
'"/>
15: </xsl:for-each>
if the condition to the line 9 are verified it has to jump to the
"field" element following. It's possible?
thanks for the possible answers
It's possible to exit from a cycle for-each?
I have this code:
1: <xsl:for-each select="field">
2: <xsl:variable name="tagfield" select="@tag"/>
3: <xsl:variable name="pos" select="position()"/>
4: <xsl:for-each select="/root/ass/istance">
5: <xsl:choose>
6: <xsl:when test="number($tagfield) != number(tag/@name)">
7: <xsl:call-template name="handle-tilde"/>
8: </xsl:when>
9: <xsl:when test="number($tagfield) = number(tag/@name)">
10: <xsl:apply-templates select="/root/record/fields/field[$pos]"/>
11: </xsl:when>
12: </xsl:choose>
13: </xsl:for-each>
14: <xsl:value-of select="'
'"/>
15: </xsl:for-each>
if the condition to the line 9 are verified it has to jump to the
"field" element following. It's possible?
thanks for the possible answers