Reverse document order bug

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Reverse document order bug

Piotr Kaminski
Hi all,

There's a bug in eXist's handling of reverse axes.  According to XQuery
section 3.2.2, the context positions for reverse axes (e.g. "preceding" or
"ancestor") should be assigned in reverse document order.  So, for example,
ancestor::*[1] should always be equal to parent::*.  Unfortunately, AFAICT,
eXist sorts all results into document order before evaluating predicates, so
that ancestor::*[1] always returns the root node.  I've attached a unit test
patch that demonstrates the bug.

Wolfgang, perhaps you can take a look at this while fixing the position
predicate bug?


                -- P.

  Piotr Kaminski <[hidden email]>
  "But I don't wanna use my head!"

reverse-order-test.txt (1K) Download Attachment