You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by gary long <ga...@gmx.fr> on 2010/02/05 15:15:58 UTC

xpath or sql query on nodes

Hello :)

I try to write a query that returns nodes that contains a certain key word in its properties. I also would like to specify a certain node from which the search should start but I don't know if it's possible? 

For exemple, I would like the query to search only for nodes that are of type nt:resource and children of the node called "project8".

Could you help me please? :)

Thanks,

Gary

Re: xpath or sql query on nodes

Posted by Ard Schrijvers <a....@onehippo.com>.
On Fri, Feb 5, 2010 at 3:15 PM, gary long <ga...@gmx.fr> wrote:
> Hello :)
>
> I try to write a query that returns nodes that contains a certain key word in its properties. I also would like to specify a certain node from which the search should start but I don't know if it's possible?
>
> For exemple, I would like the query to search only for nodes that are of type nt:resource and children of the node called "project8".

Try for example the xpath:

/jcr:root/project8//element(*, nt:resource)

take a look at the jsr 170/283 spec, there are some examples that
should get you going

Regards Ard

>
> Could you help me please? :)
>
> Thanks,
>
> Gary
>