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

Re: are multiple predicates same as boolean and

Subject: Re: are multiple predicates same as boolean and
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Fri, 21 Nov 2008 14:25:28 +0000
Re:  are multiple predicates same as boolean and
>> apart from this use case you cited, are all other forms equivalent
>> (which do not involve positional predicates)?
> No.
>> like,
>> X[@a='hi'][@b='hi..']
> If X[@a='hi'] matches a node, then that node will become the context
> node when evaluating [@b='hi..']
>> would be same as
>> X[@a='hi' and @b='hi..']
> X is the context node here, so the predicate will be considering @b='hi..'
> X[P][Q] is equivalent to X[P and Q] if and only if Q does not depend on
> the context node at all.

Only / will change the context node, so I would've thought one
predicate after the other is pretty much equivalent apart from cases
that rely on size of the selection (which is the only thing that
changes after each predicate)

Andrew Welch
Kernow: http://kernowforsaxon.sf.net/

Current Thread


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.
First Name
Last Name
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.