2010/4/29 François Cassistat <[email protected]>:
> Thanks for your answers and sorry if I was not clear enough.
>
> What I need is to test more than one property on a subnode, and maybe need to 
> do these tests on more than one subnodes. For example, if it was XML, I could 
> write something like this :
>
> //node[child::*...@att1='a' and @att2='b'] and child::*...@att1='c' and 
> @att2='d'] and ...]
>
> Theses informations cannot be stored in the name or the node type (non-unique 
> user-provided strings with no SNS allowed).

I see, you still want to return the parent node, but check for
properties of children with unknown names. Yes, this is not possible
with JCR XPath. With JQOM/JCR-SQL2 it should be possible, but I don't
know how to build that query ;-)

Another solution could be to enhance the content model that the child
nodes have well-known names. Or, the solution that is a bit ugly, use
a query that returns the child nodes and on the nodes in the result
set go up the ancestor path.

Regards,
Alex

-- 
Alexander Klimetschek
[email protected]

Reply via email to