jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek" <aklim...@day.com>
Subject Re: ordering the node according to the date
Date Sun, 14 Dec 2008 15:28:04 GMT
On Sat, Dec 13, 2008 at 6:34 AM, far4ever <fathimafarhath@gmail.com> wrote:
> Jukka Zitting wrote:
>> You can either explicitly order the nodes if the node type of the
>> parent supports orderable child nodes, or use the "order by" clause in
>> a query.
> since i am new to this area can you please describe the solution a bit
> further.

XPath over JCR:
//element(*, my:nodetype)[@prop = "foobar"] order by @date

SQL over JCR:
select * from my:nodetype where prop = "foobar" order by date

The JCR query languages are well described in the JCR 1.0 spec [1] in
sections 6.6 (xpath) and 8.5 (sql).

[1] http://jcp.org/en/jsr/detail?id=170


Alexander Klimetschek

View raw message