Christophe Lombart wrote:
Is it possible to search on multiple primary node types and/or  mixin
node types ?
If I understand, it can differ from one JCR implementation to another.
What is the implementation choice in Jackrabbit ?

With the current implementation this is not possible in general, because only one element() node test is supported per path step. However the XPath syntax defines a union operator for such a use case:

//(element(*, nt:file) | element(*, nt:folder))

this would return all that are either nt:file or nt:folder nodes *or* of any subtype of nt:file or nt:folder.
But as I said, this is currently not supported by Jackrabbit.

What you may use already is the following:

//[EMAIL PROTECTED]:primaryType = 'nt:file' or @jcr:primaryType = 'nt:folder']

however, this will only return nodes of type nt:file or nt:folder but no nodes of subtypes.

To sum up: there is currently no convenient way to search on multiple node / mixin types, but with the help of the NodeTypeManager you are still able to search multiple node type hierarchy trees, by creating an or expression that covers all types you are interested in.

regards
 marcel

Reply via email to