You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Savas Triantafillou <sa...@gmail.com> on 2007/03/28 10:54:01 UTC

Child Axis support in order by strange behavior

Hi,

Although child axis is not supported in order by clause I have notice the
following behavior

Query of type

//element(*, type)[foo/@bar >= 1] order by foo/@bar asc

ignores order by clause whereas query of type

//element(*, type)[foo/@bar >= 1]/foo/@bar order by foo/@bar asc

orders results!!!

But then if query is little more complicated like

//element(*, type)[foo/@bar >= 1 and foo/@bar2 >= 1]/foo/ ( @bar | @bar2)
order by foo/@bar asc, foo/@bar2 asc

no ordering takes place.

Does anyone know why this might be happening?

And furthermore, is there anyone who needed to order columns from child
axis?

Savvas