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

Re: Predicates

Subject: Re: Predicates
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 7 Jan 2005 16:12:13 GMT
damian duff
> 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
________________________________________________________________________

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.