jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: XPath question 1
Date Wed, 04 Oct 2006 12:55:02 GMT

On 10/4/06, Shane Preater <shane.preater@googlemail.com> wrote:
> I need to return the nodes above in a search where they have an additional
> child node called author
> [...]
> I am not sure if this is a specific jackrabbit question or a more general
> xpath if its the latter I apologise.

Unfortunately the search features specified in JSR 170 or implemented
in Jackrabbit don't allow such queries. See JCR-247 for the related
improvement issue.

A workaround you can use is to query for the author node
(/jcr:root/people/users/hashing-bit/*/author), and postprocess the
results to get the parent nodes you were looking for.

Another alternative would be to model the "has author information"
constraint as an explicit mixin type, which would allow you to use a
query like /jcr:root/people/users/hashing-bit/element(*,authored).


Jukka Zitting

Yukatan - http://yukatan.fi/ - info@yukatan.fi
Software craftsmanship, JCR consulting, and Java development

View raw message