jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Betheuil" <Nicolas.Bethe...@europe.adp.com>
Subject RE: xpath query of subnode
Date Wed, 24 Nov 2010 15:56:38 GMT
Thank's for your quick answer but it's seems doesn't work. I speak about the not function of
course. The other part (/aRootNode/subNode//*) is working expect that the root of a repo is
always jcr:root and the rootNode is of course under this node. That was a mistake in my first
post but like it's something i understand i want to make it available to everyone.

I thought of prepare an extract what I want to do in a small archive and make it available
to anyone that would like to look after it. Do you think it could be interesting ? I should
open instead a jira ?


-----Message d'origine-----
De : Alexander Klimetschek [mailto:aklimets@adobe.com] 
Envoyé : mardi 23 novembre 2010 17:08
À : users@jackrabbit.apache.org
Objet : Re: xpath query of subnode

On 23.11.10 16:46, "Nicolas Betheuil" <Nicolas.Betheuil@europe.adp.com>
>I have the following structure for my default schéma
>(without condition)
>One of my case make this query

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
>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:

But not(conditions) should do the trick.


Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel

View raw message