Putting Value In A Variable And Using It In XSLT

Yirydow

New Member
\[code\]<xsl:choose> <xsl:when test="type='LEVEL'"> <xsl:variable name="myVar" select = "value"/> <xsl:variable name="spaces" select = "'           &#xA0'"/> <xsl:value-of select="substring($spaces, 1, $myVar)"/> </xsl:when>\[/code\]I have the above code in XSLT. myVar is a variable with values like (1 or 2 or 3).I need to store the output of the following line of code in a variable and use it outside the when condition.\[code\]xsl:value-of select="substring($spaces, 1, $myVar)"/\[/code\]I am not able to do it currently.Could anyone suggest something ?
 
Back
Top