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

RE: Interpretation of (preceding::foo)[1]

Subject: RE: Interpretation of (preceding::foo)[1]
From: "Paul W. Abrahams" <abrahams@xxxxxxxxxxx>
Date: Fri, 03 Dec 1999 13:32:33 -0500
RE: Interpretation of (preceding::foo)[1]
Michael Kay wrote:

> > If they are considered as expressions, then preceding::foo[1] is a
> > location path treated as an expression while (preceding::foo)[1] is
> > directly an expression consisting of the parenthesized expr
> > (preceding::foo) narrowed by the predicate[1], and the child axis
> > isn't applied, despite what the note says.
> >
> The spec is really trying to exercise your brain in this area, it says in
> 3.3 that "the predicate filters the node-set with respect to the child
> axis", purely as a device for ensuring that every predicate has an
> associated axis and therefore an associated direction. It's a peculiar way
> of saying that the nodes are filtered in document order, and has nothing to
> do with the nodes being children of any common parent.
>
> Took me a while to work out!

So the reference to the child axis is really a kind of dummy reference whose only
relevant property is the associated direction, right?  Would it be equivalent if the
text of 3.3 had said ``the Predicate filters the node-set with respect to the
following-sibling axis''?  That would replace a misleading reference by an utterly
mystifying one <s>, which might or might not be a change for the better.

If any of the spec-writers are listening, please hear the message that an explanatory
note here would be very helpful.  Even better would be to replace the reference to the
child axis by a straightforward statement that the proximity positions are calculated
using document order rather than reverse order no matter how the node-set itself is
obtained.

Congratulations on deciphering this particular rune, Michael!

Paul Abrahams



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.