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 probably can't do this with JCR XPath, I probably need a JOIN with SQL2 or JQOM. What do
you think?
Regards,
Frank
Le 2010-04-28 à 6:20 PM, Alexander Klimetschek a écrit :
> 2010/4/28 François Cassistat <f@maya-systems.com>:
>> Your solution looks good, but what if I need to do this kind of test more than once
in the same query?
>
> Sorry, I don't understand. Do you mean check a single node for
> multiple node types at the same time? Instead of element(*, nt), you
> can also search for the (virtual) "jcr:primaryType" property, eg.
> [@jcr:primaryType='nt:file' or @jcr:primaryType='my:foo']
>
> Regards,
> Alex
>
> --
> Alexander Klimetschek
> alexander.klimetschek@day.com
|