On 23.11.10 16:46, "Nicolas Betheuil" <nicolas.bethe...@europe.adp.com> wrote: >I have the following structure for my default schéma >/aRootNode/subNode/onePath/myInterestingNode/conditions[2]/@someHelpffulAt >tributes >/aRootNode/subNode/otherVeryDifferentPath/myOtherInterestingNode/ >(without condition) > >One of my case make this query >/aRootNode/subNode/*
You want to do /aRootNode/subNode//* as you have intermediate steps such as "onePath" or "otherVeryDifferentPath" in your example. >[(conditions/@property!='propName') or (conditions/@property='propName' >and conditions/@operator='eq' and conditions/@expectedValue=true) or >(count(conditions)=0)] >But the count(conditions)=0 doesn't work. Worse, ever it's in an or >condition, all is false and nothing is returned. count() is not supported in JCR xpath, which only implements a subset of Xpath 1.0. For more see the spec starting at section 6.6: http://www.day.com/specs/jcr/1.0/index.html But not(conditions) should do the trick. Regards, Alex -- Alexander Klimetschek Developer // Adobe (Day) // Berlin - Basel