xsl-list
[Top] [All Lists]

Re: [xsl] are multiple predicates same as boolean and

2008-11-21 09:39:30
I think yes ...

If that were true, then the condition

myelement[(_at_)myattribute][1] should be same as
myelement[1][(_at_)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(_dot_)mukul(_at_)gmail(_dot_)com> 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

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





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

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