AFAIK, XPath doesn't support this kind of glob expression inside a path segment.
But even if it did, you're probably better off using node.getNodes("9*") to get
all the nodes starting with '9'
Justin
On Feb 15, 2011, at 9:04 AM, Neil <[email protected]> wrote:
>
> 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.