jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@adobe.com>
Subject Re: XPath Query Help
Date Tue, 15 Feb 2011 14:17:26 GMT
On 15.02.11 15:04, "Neil" <ncorbet23@hotmail.com> wrote:
>What I would like to do is get all ths:file nodes under
>/jcr:root/permanent/280/006/9**

In the newest Jackrabbit 2.2 you should be able to use wildcards on node
names, previously this was simply not possible. Use jcr:like (where "%" is
the wildcard for any number of chars and "_" is a single char wildcard)
together with fn:name():

/jcr:root/permanent/_x0032_80/_x0030_06/*[jcr:like(fn:name(),
"9__")]//element(*,ths:file) order by jcr:score()


BTW  the "*" in your path step examples means any node (at that level),
but you can't mix characters and wildcards in normal xpath location steps
to match node names.

Regards,
Alex

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





Mime
View raw message