|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: ancestor::* and for-each
Just adding a little to what others have said on this.
This is undoubtedly one of the most confusing aspects of the XPath specification, and in my opinion it was not a good decision. The way the rules are expressed is different between XPath 1.0 and 2.0, because of the replacement of node-sets by sequences, but the effect is the same. Conceptually an AxisStep (of the form axis::nodetest[predicates]*) is evaluated in the following way: 1. All the nodes on the axis are selected, in axis order (that is, starting from the context node and moving outwards). 2. This sequence is filtered by retaining only the nodes that satisfy the nodetest 3. The sequence is then filtered using each of the predicates in turn. Within each predicate, position() refers to the position of a node in the sequence that results from the previous stage of filtering 4. The final filtered sequence is sorted into document order. Apologies that "position" and "document" are trisyllabic, but I hope it explains what is going on. Michael Kay Saxonica On 28/07/2010 17:11, Wolfgang Laun wrote:
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








