RE: Question regarding order in XPath

Murali Mani <[email protected]>
Newsgroups gmane.comp.web.query-languages
Message-ID <[email protected]>

Let me try to understand this order thing slightly more..  I am sure it is
well thought out already..??

My concern is regarding the statement that "even reverse axes will return
results in document order". Let us consider something like:

a [2 TO 5]/b

Now suppose "a" uses a reverse axis. Now because of the range predicate,
we will get only results that are produced by a, but have positions 2 TO 5
in reverse document order, right??

Now we again start getting results in document order when we start
navigating etc.. right??

My question is: Why do we define order based on document order, rather
than the order of previous step??

The thing is document order and order based on previous step are identical
for forward axes, reverse axis with a position predicate (rather than a
range predicate) etc..

Were these options for defining order discussed by the WG? and any
insights into the reasoning process would be greatly appreciated.

best, murali.

Note: Also, I cannot think of any use case where after a step using a
reverse axis, we want to revert back to document order (if document order
and the "previous-step-order" yield different results)..
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.