Xpath/XSLT 2 Nov 15 drafts: order of reverse axis selection

Am I correct in thinking that

ancestor::*

will select the sequence of ancestor nodes in reverse document order?

The list of example axis selections in XPath 3.2.1.1 is derived from
that in Xpath 1 and never mentions order, but the Xpath 1 expressions
were selecting unordered node sets. I think that the Xpath2 examples need
to be explict about the order of the result (as I'm having trouble
answering the above simple question).

so for example

> the descendant axis contains the descendants of the context node

was adequate for XPath 1 but since the Xpath2  result is an ordered list
not a set I think it needs to be explict here that the result is in doc
order.

I _think_ the result of ancestor::* is in reverse order, in which case
the note in XSLT section 7 Repetition

    Note: With XSLT 1.0, the selected nodes were processed in document
    order. With XSLT 2.0, XPath expressions that would have been valid
    under XPath 1.0 (such as path expressions and union expressions)
    will return a sequence of nodes that is already in document order,
    so backwards compatibility is maintained. 

is false as

<xsl:for-each select="ancestor::*">

will iterate in the opposite order.

But it could be that that note is true in which case I'm confused and in
that case could the Xpath spec be clarified at whichever point I became
confused:-)

David



_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

Received on Thursday, 21 November 2002 11:20:38 UTC