You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by KÖLL Claus <C....@TIROL.GV.AT> on 2007/03/29 10:12:58 UTC

xpath search

can anybody tell me please how i negate a
jcr:contains() and jcr:like() ?

something like
//element(*, nt:base)[not jcr:contains(jcr:content, 'test')] 
or
//element(*, nt:base)[jcr:contains(jcr:content, 'test') and not jcr:like(@my:createuser, 'admin%')]
doesnt work ...

thanks
claus

Re: xpath search

Posted by Alessandro Bologna <al...@gmail.com>.
Did you try with [not(jcr:contains(jcr:content, 'test'))]?
The parenthesis after the 'not' may help.

Alessandro


On 3/29/07, KÖLL Claus <C....@tirol.gv.at> wrote:
>
> can anybody tell me please how i negate a
> jcr:contains() and jcr:like() ?
>
> something like
> //element(*, nt:base)[not jcr:contains(jcr:content, 'test')]
> or
> //element(*, nt:base)[jcr:contains(jcr:content, 'test') and not
> jcr:like(@my:createuser, 'admin%')]
> doesnt work ...
>
> thanks
> claus
>