jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kaizer <Kaiz...@mastek.com>
Subject Re: OCM - Issue while loading list of classes at that path itself.
Date Thu, 08 Nov 2007 05:00:59 GMT

Hi,
Thanks for the reply. I dont have any nodes under test but as you mentioned,
"jackrabbit also allows you to use the descendant-or-self axis anywhere else
in the path", so if i want to get the "test node", which would be the
self-axis, the query /jcr:root//some/test//element(*, my:type) should work.
At least that was my understanding from the spec. Please let me know what
would be the correct query if I'm wrong.

Thanks.

Regards
Kaizer



Marcel Reutegger wrote:
> 
> Kaizer wrote:
>> I was trying to have a deeper look at this problem and found that its
>> related to the way the jackrabbit QueryManager searches based on the
>> jcrExpression. Suppose I've created two nodes "some/test" under the root
>> node. Now, if i create a query like ("/jcr:root//some/test//element(*,
>> "my:type")"), I dont get any results. If i create the query as
>> ("/jcr:root//some//element(test, "my:type")"), it works fine. I had a
>> look
>> at the JCR spec and it says that the constraint for obtaining Descendants
>> or
>> self path is /jcr:root/some/nodes// element(*, my:type). 
> 
> this is just the mandatory feature set, jackrabbit also allows you to use
> the 
> descendant-or-self axis anywhere else in the path.
> 
> /jcr:root//some/test//element(*, my:type)
> 
> will not return results because you probably have no nodes under
> /some/test
> 
> also note that the first // is unnecessary in your case.
> 
> regards
>   marcel
> 
> 

-- 
View this message in context: http://www.nabble.com/OCM---Issue-while-loading-list-of-classes-at-that-path-itself.-tf4719078.html#a13641389
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message