jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mueller <muel...@adobe.com>
Subject Re: Converting XPath to SQL-2
Date Tue, 10 Apr 2012 09:44:49 GMT
Hi,

Thanks, that simplifies things quite a lot! So I was wrong. What confused
me is that the "/jcr:root" prefix seems to have a different meaning if
there is a path or not. So according to my test:

//*[@name='Hello'] 
-> include "/"

/jcr:root//*[@name='Hello']
-> exclude "/"


content//*[@name='Hello']
-> exclude "/content"

/jcr:root/content//*[@name='Hello']
-> exclude "/content"

But that should be quite simple to detect.

Regards,
Thomas





On 4/9/12 10:03 PM, "Marcel Reutegger" <mreutegg@adobe.com> wrote:

>Hi,
>
>>     /jcr:root/content//*[@test='hello']
>> 
>> This XPath query includes the node "content".
>
>that's incorrect. /jcr:root/content//* only selects descendants of
>content,
>but not content itself.
>
>there's a XPath test bed you can use here:
>http://www.whitebeam.org/library/guide/TechNotes/xpathtestbed.rhtm
>
>try the expression: parent//*
>
>Regards
> Marcel


Mime
View raw message