xsl-list
[Top] [All Lists]

Re: multiple or statements in xsl:when

2004-04-03 03:55:21
Thanx you two.
Your hints just solved my problem. I had to use and instead of or:

<xsl:when test="(name(.)='void' and (
@property != 'assetscontainer' and
@property != 'incomecontainer' and
@property != 'value' and
@property != 'variable')">
<!-- code -->
</xsl:when>
<xsl:otherwise>
<!-- ignore stuff -->
</xsl:otherwise>

Thanx again,
Daniel


Am 02.04.2004 um 21:56 schrieb Andreas L. Delmelle:

-----Original Message-----
From: Daniel Purucker [mailto:dpu(_at_)daniel-purucker(_dot_)de]

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


Hi,

Well, you could make it easier on yourself if you were to place a few braces
in strategic locations ;)

However, first things first: following c) above, I don't see why you are
testing for *in*equality to 'container' or 'assetcontainer' ...

This would more reflect what you're trying to do:

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

To specify which @property values to disregard:

<xsl:when test="name(.)='void' and (
            @property != '' and
            @property != 'string' ...)" />



Hope this helps!

Cheers,

Andreas


--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--




<Prev in Thread] Current Thread [Next in Thread>