jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: How to filter a query by attributes from children nodes
Date Mon, 14 Apr 2008 12:26:00 GMT
Hi Tamara,

Tamara Coutinho wrote:
> I would like to know wether exists a way to filter a parent node by a 
> child attribute.
> E.g. : /jcr:root/site/Notícias//element(*,mtx:content) this query 
> returns parent nodes, I would like to filter the query using 
> mpt:fileGroup attribute from children nodes mtx:file.

I'm not sure I understand your node type model, but that would be something like:

/jcr:root/site/Notícias//element(*,mtx:content)[*/@jcr:primaryType = 'mtx:file' 
and */@mpt:fileGroup = 'some value']

or if mtx:file is the name of a node:

/jcr:root/site/Notícias//element(*,mtx:content)[mtx:file/@mpt:fileGroup = 'some 

for further questions please use the user list (users@jackrabbit.apache.org)


View raw message