jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Bologna <alessandro.bolo...@gmail.com>
Subject Re: Query on child node returning parent node
Date Wed, 19 Nov 2008 06:12:48 GMT
Unfortunately the parent axis is not supported, as far as I know at  

  You could use this query instead (replace with your date of course):

/jcr:root//element(*,nt:file)[jcr:content/@jcr:lastModified <  

which uses a predicate on a child node (which seems to be supported)  
to obtain the same result.


On Nov 19, 2008, at 12:49 AM, Jaco Prinsloo wrote:

> Hi All,
> Is there anyway for me to create a query (XPath preferably) that  
> will check
> some criteria against a node, and if it matches return the parent  
> node?
> What I want to do is check in my jcr:content nodes for all files  
> created
> before a certain date and then return the nt:file node, something  
> like this:
> /jcr:root//jcr:content[@jcr:lastModified < date]/..
> (in regular XPath '..' returns the parent)
> Thank you,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message