jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From François Cassistat...@maya-systems.com>
Subject Re: How to do this JCR XPath query
Date Wed, 28 Apr 2010 19:42:30 GMT
Alex,

Thank you for your fast answer!

Your solution looks good, but what if I need to do this kind of test more than once in the
same query?


Frank



Le 2010-04-28 à 3:35 PM, Alexander Klimetschek a écrit :

> 2010/4/28 François Cassistat <f@maya-systems.com>:
>> //element(*, my:type)[... and element(*, my:othertype)[@someattribute='somevalue'
and @someotherattribute='someothervalue'] and ...]
> 
> Not sure what exactly you want to do, but if you want to search for
> child nodes of type "my:othertype" below nodes of type "my:type", this
> should do it:
> 
> //element(*, my:type)[@attribute='foo']/element(*,
> my:othertype)[@someattribute='somevalue' and
> @someotherattribute='someothervalue']
> 
> element(*, type) from JCR can be used as a standard location step in
> xpath queries.
> 
> Hopt that helps,
> Alex
> 
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com


Mime
View raw message