jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil <ncorbe...@hotmail.com>
Subject XPath Query Help
Date Tue, 15 Feb 2011 14:04:44 GMT

Hello Everyone,

I have some 'ths:file' nodes with the names 2800069512 and 2800069903. 

The path to these nodes are the following:

/jcr:root/permanent/280/006/951/2/

/jcr:root/permanent/280/006/990/3/

What I would like to do is get all ths:file nodes under
/jcr:root/permanent/280/006/9**. I would expect to get back both 2800069512
and 2800069903.

I have tried the following:

/jcr:root/permanent/_x0032_80/_x0030_06/_x0039_//element(*,ths:file)order by
jcr:score()

/jcr:root/permanent/_x0032_80/_x0030_06/_x0039_**//element(*,ths:file)order
by jcr:score()

/jcr:root/permanent/_x0032_80/_x0030_06/_x0039_**/*//element(*,ths:file)order
by jcr:score()

The query doesn't fail, it just returns nothing. The thing I am not sure
about is the wildcards in the path.I cannot seem to find any good examples
of this and I am relatively new to xpath.

If I run:

/jcr:root/permanent/_x0032_80/_x0030_06//element(*,ths:file)order by
jcr:score()

I get the files I am looking along with 120 others.

Any help would  be greatly appreciated,
           Neil
-- 
View this message in context: http://jackrabbit.510166.n4.nabble.com/XPath-Query-Help-tp3306803p3306803.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message