Subject: RE: Variable Scope and xsl:if
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Tue, 18 Apr 2000 11:24:03 +0100
|
> It's clear I can't query this variable from outside the <xsl:if>
> because of the variable scope, so, what's the solution?
<xsl:variable name="xxx">
<xsl:if test="condition">1</xsl:if>
<xsl:if test="not(condition)">2</xsl:if>
<xsl:variable>
or if you want the result to be a node-set:
<xsl:variable name="xxx" select="value1[condition] |
value2[not(condition)]"/>
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|