This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Variable Scope and xsl:if
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: Variable Scope and xsl:if
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Tue, 18 Apr 2000 11:24:03 +0100
- Reply-To: xsl-list at mulberrytech dot com
> 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