[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: "Vasu Chakkera" <vasucv@xxxxxxxxx>
Date: Fri, 21 Nov 2008 14:39:04 +0000
Re:  are multiple predicates same as boolean and
> I think yes ...

If that were true, then the condition

myelement[@myattribute][1] should be same as
myelement[1][@myattribute], which is not true...

The predicate order is important

in a typical "and"

[a and b] = [b and a]

Vasu


On Fri, Nov 21, 2008 at 1:34 PM, Mukul Gandhi <gandhi.mukul@xxxxxxxxx> wrote:
> Hi all,
>  Supposing I write following XPath expressions,
>
> 1) X[c1][c2]  or specifying generically, X[c1][c2][]...[cn]
>
> 2) X[c1 and c2]  or specifying generically, X[c1 and c2 ... and cn]
>
> c1, c2 etc. are boolean expressions.
>
> are the two forms (1 & 2) above exactly equivalent (i.e., will they
> return the same nodeset/sequence)?. I think yes ... but just wanted to
> confirm with the list.
>
> if 1 & 2 are exactly equivalent, then what could be the rule of thumb
> for using which form in certain scenarios?
>
>
> --
> Regards,
> Mukul Gandhi
>
>



-- 
Vasu Chakkera
Numerical Algorithms Group Ltd.
Oxford
www.vasucv.com

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.