Odd examples for 2 reasons:
- You're asking for the name of the element that you've
selected by name
- The first and last elements on the preceding-sibling axis
have the same name, so how will your example show that you
have selected the correct element?
Anyway, the likely answer is that the context node in
scenario 2 is different because the elements are a level
deeper - they are children of <apara1> rather than <docg> as
in the first example.
Agree fully, and it's also worth pointing out that the most recent preceding
sibling is preceding-sibling::*[1], not preceding-sibling::*[last()].
Numeric predicates on a reverse axis step number the nodes in axis order,
not in document order.
Michael Kay
http://www.saxonica.com/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--