This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: xsl:variable within xsl:choose. Why doesn't that work? And what does?
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] xsl:variable within xsl:choose. Why doesn't that work? And what does?
- From: Michael Strasser <M dot Strasser at myrealbox dot com>
- Date: Thu, 17 May 2001 22:36:46 +1000
- Organization: StrassCom Pty Ltd
- References: <D1F94D8C7C1FD111A5290020AF92B1B3E4CAFB@INTRASERVER> <01051714054002.00938@pc-ingos>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Ingo Schildmann wrote:
> <xsl:variable name="aVar">
> <xsl:choose>
> <xsl:when test="do a test">
> <xsl:value-of select="'when var'"/>
> </xsl:when>
> <xsl:otherwise>
> <xsl:value-of select="'otherwise var'"/>
> </xsl:otherwise>
>
> </xsl:choose>
> </xsl:variable>
> <xsl:value-of select="$aVar"/>
Just to be picky, why use:
<xsl:value-of select="'when var'"/>
when
<xsl:text>when var</xsl:text>
is simpler and probably more efficient?
--
Michael Strasser
Brisbane, Australia
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list