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: Searching for multiple types using xpath
Date Wed, 04 Jul 2007 11:24:34 GMT
Rohnny Moland wrote:
> Works great. My guess was that I could use something like:
> 
> /path/to/context//element(*, typeA or typeB)
> 
> But this did not work. Tried to search this mailing list also, but
> couldnt find any answer for this.

you can have multiple checks for the jcr:primaryType property, but please note 
that type inheritance is not respected in that case. the query will then only 
return nodes that have the exact primary type you state in the query.

example:

/jcr:root/path/to/context//*[@jcr:primaryType eq 'typeA' or @jcr:primaryType eq 
'typeB']

regards
  marcel

Mime
View raw message