Re: [xsl] Positional predicates in pattern matching

Subject: Re: [xsl] Positional predicates in pattern matching
From: Kevin Jones <kjones@xxxxxxxxxxx>
Date: Fri, 2 Jul 2004 17:12:43 +0100
Thanks for your quick reply David,

> your modes one and two are identical as the only difference is
> [true()] but a filter of [true()] never does anything.

Yes, that was deliberate just to create two predicates. I understand why you 
get P2P3 instead of what you might have expected, i.e. P1P2. The problem I 
think I am having is the standard says that is only for the first predicate. 
So if I move my test to the second predicate, in this case by inserting a 
dummy [true()], then the position should no longer be taken a relative to the 

To quote Michael Kay from the bottom of page 442 in the 2nd edition of the 
XSLT Programmers Reference,

"If there are several predicates in the StepPatten, then position() and last() 
in predicates after the first apply to the nodes that survived the previous 


Current Thread