xsl-list
[Top] [All Lists]

Re: Predicates

2005-01-07 09:12:13

I have tried several combinations, but none work...am I heading in the right
direction?

The boolean operator for or is or not | (not sure why so many people miss
this)

[not(name='Frank Lampard' or  name=' Damian Deff')]

or


[(name!='Frank Lampard') and  (name!=' Damian Deff')]

although beware of using != ever in Xpath unless you are sure you know
what you are doing. It has quite entertaining meaning and in the cases
where it isn't the same as using not (   =    ) it almost always doesn't
do what you want, so I find it's better to simply always use  not() and
= rather than !=.

Of the things you tried:


[name!='Frank Lampard | Damian Duff']

That is legal and tests that every name element is not equal to teh
string 'Frank Lampard | Damian Duff'


[name!='Frank Lampard' | name!=' Damian Duff']

that is a syntax error as | is set union and can only be applied to node
sets, not to boolean expressions.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--~------------------------------------------------------------------
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>