This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: xsl:variable within xsl:choose. Why doesn't that work? And what does?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]