RE: [xsl] How to implement "if else if else" condition in XSLT

Subject: RE: [xsl] How to implement "if else if else" condition in XSLT
From: "Andreas L. Delmelle" <a_l.delmelle@xxxxxxxxxx>
Date: Mon, 9 Feb 2004 21:05:02 +0100
> -----Original Message-----
> From: Kotes Mogili
> 
> Hi,
> 
> Is there a way to implement the following condition in XSLt..
> 
> if(){
> ...
> }else if{
> 	....
> }else{
> 	...
> }
> 
> Thanks for any suggestion ..
> 

Yes there is:

<xsl:choose>
  <xsl:when test="...">
    ...
  </xsl:when>
  <xsl:when test="...">
    ...
  </xsl:when>
  <xsl:otherwise>
    ...
  </xsl:otherwise>
</xsl:choose>

However: Are you absolutely sure you need *this*?


Cheers,

Andreas

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread