I am using an XSLT where I have created <xsl:template>
tag which does some validation using an <xsl:for-each>
statement and sets the value of <xsl:variable>
or <xsl:param>
to true or false.
- Is there any way to break the statement in for-each if condition is true?
- Can we use the value of Template variable or param from main calling routine?
Example:
<!-- Main Xslt -->
<xsl:template>
<xsl:call-template name ="TestTemplate">
<!--
Here I want to use the variable or param that
is defined in TestTemplate, is it possible?
-->
</xsl:call-template>
</xsl:template>
<xsl:template name ="TestTemplate">
<xsl:param name="eee"/>
<xsl:for-each select ="//RootNode/LeafNode">
<xsl:choose>
<xsl:when test ="@Type='ABC'">
<xsl:value-of select ="true"/>
</xsl:when>
<xsl:otherwise>false</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:template>