On Aug 6, 2008, at 1:00 PM, Paul Davis wrote:
Hi,
If I create some nodes like:
curl -D - -F"sling:resourceType=editorial/tracks" ...other params...
"http://admin:[EMAIL PROTECTED]:8080/sling/modules/editorial/tracks/*"
where sling creates the path, how can I query for a list of nodes
created that way?
thanks
There are a number of ways to do it. For JCR resources, Sling passes
the query to the repository's QueryManager, which by specification
must support XPath. Here are two examples (in code and via HTTP,
respectively):
ResourceResolver rr = [get ResourceResolver instance];
Iterator results = rr.queryResources("//
[EMAIL PROTECTED]:resourceType='editorial/tracks']", "xpath");
http://localhost:8080/sling/modules.query.json?statement=//
[EMAIL PROTECTED]:resourceType='editorial/tracks']&queryType=xpath
The JSR 170 specification has many more examples, including SQL
syntax, which is optional but supported by Jackrabbit.
HTH
--
Christopher Elkins