X
Xeon
Hi,
I'm trying this code snippet below but the parser (sablotron) returns
error :
<xsl:choose>
<xsl:when test="some test case">
<xsl:variable name="test" select="0"/>
</xsl:when>
<xsltherwise>
<xsl:variable name="test" select="1"/>
</xsltherwise>
</xsl:choose>
<xsl:value-of select="$test"/>
Sablotron whines that $test is undefined. IMHO the scope of $test is
only inside <xsl:choose>. How can I overcome this?
Note: the structure of the code is a simplified one. I could put the
<xsl:value-of> element inside the <xsl:choose> but it would increase
the complexity of the overall code, not to mention readablity.
TIA
I'm trying this code snippet below but the parser (sablotron) returns
error :
<xsl:choose>
<xsl:when test="some test case">
<xsl:variable name="test" select="0"/>
</xsl:when>
<xsltherwise>
<xsl:variable name="test" select="1"/>
</xsltherwise>
</xsl:choose>
<xsl:value-of select="$test"/>
Sablotron whines that $test is undefined. IMHO the scope of $test is
only inside <xsl:choose>. How can I overcome this?
Note: the structure of the code is a simplified one. I could put the
<xsl:value-of> element inside the <xsl:choose> but it would increase
the complexity of the overall code, not to mention readablity.
TIA