[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Or with xsl:when to check for multiple values

Subject: RE: Or with xsl:when to check for multiple values
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Fri, 31 Oct 2003 23:02:58 -0000
xsl when test multiple
> Can i do something like
> 
> <xsl:when test="$var = 'val1'" or "$var = 'val2'" or "$var = 'val3'">
>   some action
> </xsl:when>

XSLT has to be well-formed XML.

You want

<xsl:when test="$var = 'val1' or $var = 'val2' or $var = 'val3'">

Michael Kay


> 
> Or to achieve this i have to write like
>  <xsl:when test="$var = 'val1'" >
>        Some action
>   <xsl:when>
>  <xsl:when test="$var = 'val2'">
>      Some action
>  </xsl:when>
> 
> Since the action code is same I thought if something can be 
> done writing OR 
> expression. Is there some other way to achieve it more effectively.
> 
> I hope i am clear in explaining my problem.
> Thanks in the anticipation that I will get some good hints to 
> solve this.
> 
> Regards,
> Dipesh
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.