Subject: Re: xsl:when, xsl:otherwise question?
From: "Nick Roberts" <nick_roberts5@xxxxxxxxxxx>
Date: Sun, 06 Feb 2005 20:28:15 +0000
|
<xsl:choose>
<xsl:when test="foo">FOO</xsl:when>
<xsl:when test="bar">BAR</xsl:when>
<xsl:otherwise>BAZ</xsl:otherwise>
</xsl:choose>
is this valid syntax... I get an error when I try to use this?
From: Kevin Rodgers <kevin.rodgers@xxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: xsl:when, xsl:otherwise question?
Date: Thu, 3 Feb 2005 12:51:46 -0700
Nick Roberts writes:
> Is it possible to implement an else-if condition using the above.
>
> All literature i've read only seems to use xsl:when and xsl:otherwise...
no
> "xsl:else-when" condition?
Isn't this:
<xsl:choose>
<xsl:when test="foo">FOO</xsl:when>
<xsl:when test="bar">BAR</xsl:when>
<xsl:otherwise>BAZ</xsl:otherwise>
</xsl:choose>
equivalent to:
if (foo) then FOO
else if (bar) then BAR
else BAZ
--
Kevin Rodgers
|