This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Difference between preceding::foo[1] and (preceding::foo)[1]
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Difference between preceding::foo[1] and (preceding::foo)[1]
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Thu, 6 Sep 2001 15:52:14 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> Could someone shed some light on the following statement from Section
> 3.3 of the XPath 1.0 specification: "The Predicate [on an expression
> that is not a location path] filters the node-set with respect to
> the child axis"?
It's a totally weird way of saying that in evaluating the predicate, the
nodes are considered in document order.
What the spec does is first say that all predicates are evaluated with
respect to an axis; for some axes the nodes are considered in document order
and for others in reverse document order. But in a construct like $x[3]
which axis should be used? We want it in document order, so the spec selects
one of the forwards axes at random, namely child, and says it should use
that one.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list