You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Cédric Damioli <ce...@anyware-tech.com> on 2005/10/25 15:24:44 UTC

Ordering by Node name in XPath queries

Hi,

Spec paragraph 6.6.3.5 says "Support for ordering on PATH and NAME 
properties is not required".
Does JackRabbit handles this case ?

I'd like to write a query like : "//*[@prop = 'foo'] order by name()"

Is it possible ?

regards,

-- 
Cédric Damioli
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com


Re: Ordering by Node name in XPath queries

Posted by Marcel Reutegger <ma...@gmx.net>.
Hi Cédric,

Cédric Damioli wrote:
> Spec paragraph 6.6.3.5 says "Support for ordering on PATH and NAME 
> properties is not required".
> Does JackRabbit handles this case ?

yes, it does, but ordering NAME or PATH values will not always make 
sense because those values are namespace sensitive. which raises the 
question how exactly such values are ordered. because this question 
couldn't be answered easily it was decided to make it optional in the spec.

jackrabbit will make sure that names that belong to the same namespace 
will be properly ordered. when names belong to different namespaces 
ordering may be arbitrary.

> I'd like to write a query like : "//*[@prop = 'foo'] order by name()"
> Is it possible ?

no, currently not, because the name() function is not implemented. that 
would be another enhancement ;)

regards
  marcel