jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: xpath query with child constraints
Date Mon, 03 Jul 2006 10:28:17 GMT
Torgeir Veimo wrote:
> Torgeir Veimo wrote:
>> I have a hard time coming up with a way to query on content 
>> (jcr:contains) on subnodes of type nt:resource, combined with 
>> constraints on properties of the parent nodes.
> Is it correct to do something along the lines of
> /jcr:root//element(*,nen:resource)[@isarticle]//element(*,nt:resource)[jcr:contains(*,'alive')]

If you know that your nen:resource node has a nt:resource child node the 
descendant-or-self axis is overkill. this should be sufficient:


please note that the '*' in jcr:contains() in your query is wrong, it 
should be '.' (context node).


View raw message