setting value of the variables depending on condit
How to set the value of variable depending upon the condition?
Hi,
suppose i have declare the varaible with default value.
<xsl:variable name="flag" select="0"/>
<xsl:for-each select="/root">
<xsl:variable name="flag" select="1"/>
</xsl:for-each>
<xsl:if test="$flag=1">
<xsl:value-of select="root/name"/>
</xsl:if>
Here variable flag loosing its scope.
How do i reset the value of variable depending upon the condition?
If it is not possible using the xsl:variable then what should i use?
sheetal
__________________
sheetal
|