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

Re: Using multiple conditions in the xsl:if statement

Subject: Re: Using multiple conditions in the xsl:if statement
From: Michael Ludwig <mlu@xxxxxxxxxxxxx>
Date: Wed, 26 Mar 2008 16:36:29 +0100
Re:  Using multiple conditions in the xsl:if statement
Davalath, Kishore schrieb:
I'm using the following xsl and I would like to know how do I use
multiple conditions in the same if statement.  If I pass multiple
conditions it does not return any results because if the first condition
matches and there is no match in the second condition I'm not getting
any results.  Ideally I would like not to perform the test at all if
there is no value in the $lname variable or $pubid varialbe or only use
the corresponding test if there is any value in the variables. Is there
anyway to do that?

Use more boolean logic:


<xsl:if test="
  ($pubid and Html/root/Publication = $pubid) or
  ($lname and Html/root[contains(AssocLawyers/a/text(), $lname)])">

          <xsl:if test ="Html/root/Publication = $pubid or
Html/root[contains(AssocLawyers/a/text(), $lname)]" >

Michael


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.