jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timur Evdokimov" <ti...@jacum.com>
Subject RE: Query language issues
Date Tue, 22 Feb 2005 21:01:54 GMT

Thank you for these clarifications about /jcr:root, it was not quite obvious
(and apparently was recent addition) 
Now everything works as it should, even with ordering.


-----Original Message-----
From: Marcel Reutegger [mailto:marcel.reutegger@gmx.net] 
Sent: Monday, February 21, 2005 10:20 AM
To: jackrabbit-dev@incubator.apache.org
Subject: Re: Query language issues

Hi Timur,

> In //*[@my:includeInMainStream='true'] order by @my:publishingDate 
> descending It complains about @ in @my:publishingDate clause So that 
> only order by publishingDate is accepted, but doesn't work anyway

hmm, works fine for me. Could you please create a jira bug with instructions
how to reproduce it? Thanks

> Also any expression apart from //* returns nothing, i.e. just /text//* 
> gives 0 hits, whereas SELECT * FROM my:article WHERE jcr:path LIKE 
> '/text/%' gives what it supposed to give.

XPath uses a virtual XML document refered to as document view mapping in the
jsr 170 spec. Because the root element in that document is the root node of
the workspace any absolute XPath must start with /jcr:root. In your case
that would be something like:

You may also use a relative XPath. In that case the context for the query is
the root node of the workspace:

Relevant section in the spec is:


View raw message