jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Abley" <james.ab...@gmail.com>
Subject Re: XPath nested predicates
Date Mon, 18 Feb 2008 13:59:42 GMT
On 18/02/2008, Matt Fulford <matt.fulford@pfiks.com> wrote:
> Hi,
> Does the XPath implementation used in Jackrabbit (1.4) support nested
> predicates?
>
> I'm trying to select all nodes that have child nodes called x which have
> a jcr:primaryType of attribute of 'cms:attribute':
>
> //*[x[@jcr:primaryType = 'cms:attribute']]
>
> Executing this query throws javax.jcr.query.InvalidQueryException:
> Unsupported location for predicate.
>
> Many thanks,
> Matt
>

I think the error you're seeing is correct. Maybe try to alter the
XPath to something like this:

//*[x][x/@jcr:primaryType = 'cms:attribute']

HTH

Cheers,

James

Mime
View raw message