You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Michael Yin <yi...@gmail.com> on 2010/03/24 21:57:28 UTC

XPath queries

Is there any documentation on doing xpath queries via sling?
I found this blog post, but it'd be nice if there were some official docs.

http://in-the-sling.blogspot.com/2008/09/how-to-use-json-query-servlet.html

-mike

Re: XPath queries

Posted by Alexander Klimetschek <ak...@day.com>.
On Wed, Mar 24, 2010 at 21:57, Michael Yin <yi...@gmail.com> wrote:
> Is there any documentation on doing xpath queries via sling?
> I found this blog post, but it'd be nice if there were some official docs.
>
> http://in-the-sling.blogspot.com/2008/09/how-to-use-json-query-servlet.html

As noted in that article, the json query servlet is get by using the
"query" selector and the "json" extension. The query type is given in
the "queryType" parameter (xpath or sql) and the statement is in the
"statement" parameter.

The queries itself are standard JCR queries, see the JCR 1.0 spec [1]
[2], the jackrabbit mailing lists or some googling for eg. "jcr
xpath".

[1] http://jcp.org/en/jsr/detail?id=170
[2] http://www.day.com/specs/jcr/1.0/

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com