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

Re: Positional predicates in pattern matching

Subject: Re: Positional predicates in pattern matching
From: Kevin Jones <kjones@xxxxxxxxxxx>
Date: Fri, 2 Jul 2004 17:12:43 +0100
xsl predicates
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 
parent. 

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 
predicates"

Kev.



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.