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: Query help
Date Fri, 08 Apr 2005 13:22:37 GMT
Hi Sean,

Did you try:

/jcr:root/ANT/BEAR[@propA = 2]/CAT

?

cheers
  marcel

Sean Radford wrote:
> Hi,
> 
> Can someone give me some help on a query please.
> 
> I have the a node structure something like:
> 
> /ANT
> /ANT/jcr:primaryType=nt:unstructured
> /ANT/BEAR
> /ANT/BEAR/jcr:primaryType=nt:unstructured
> /ANT/BEAR/propA=1
> /ANT/BEAR/CAT
> /ANT/BEAR/CAT/jcr:primaryType=nt:unstructured
> /ANT/BEAR/CAT/colour=red
> /ANT/BEAR[2]/
> /ANT/BEAR[2]/jcr:primaryType=nt:unstructured
> /ANT/BEAR[2]/propA=2
> /ANT/BEAR[2]/CAT
> /ANT/BEAR[2]/CAT/jcr:primaryType=nt:unstructured
> /ANT/BEAR[2]/CAT/colour=blue
> 
> And I would like a query to return the CAT node whose parent BEAR node 
> has the property called propA with value 2, i.e /ANT/BEAR[2]/CAT
> 
> Any ideas?
> 
> Thanks in advance,
> 
> Sean
> 

Mime
View raw message