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

Re: multiple or statements in xsl:when

Subject: Re: multiple or statements in xsl:when
From: Daniel Purucker <dpu@xxxxxxxxxxxxxxxxxx>
Date: Fri, 2 Apr 2004 21:16:14 +0200
xsl when multiple or
Sorry, but i'm a little confused (dammed boolean algebra) ;)
What i want is: to run the code if:
a) the name of the tag is void AND
b) there is an attribute "property" which is not empty AND
c) the value of this attribute is either 'container' OR ' assetscontainer' OR and so on


for example run the code for this line of xml:
<void property="container"> and also for this line
<void property="assetscontainer">

but for example not for this line:
<void property="string">


Daniel



Am 02.04.2004 um 20:28 schrieb Michael Kay:



<xsl:when test="name(.)='void' and @property !='' and @property != 'container' or @property != 'container' or @property != 'assetscontainer' or @property != 'incomecontainer' or @property != 'value' or @property != 'variable' " </xsl:when>

Any ideas why my code doesn't work?

Because your logic is flawed.


if @property != 'value' is false, then @property must equal "value", and
therefore @property != 'variable' will be true. So at least one of these
terms will be true, therefore the whole condition will be true.


Michael Kay

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.