xsl-list
[Top] [All Lists]

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

2008-11-21 09:25:48
apart from this use case you cited, are all other forms equivalent
(which do not involve positional predicates)?

No.

like,
X[(_at_)a='hi'][(_at_)b='hi..']

If X[(_at_)a='hi'] matches a node, then that node will become the context
node when evaluating [(_at_)b='hi..']

would be same as
X[(_at_)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
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

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