On Fri, Jul 23, 2010 at 9:10 AM, tingup <[email protected]> wrote:
> Hi, list,
>
> I got a trouble that:
> I have a node in /jcr:root has the same name of child.
>
> /jcr:root
>  foldername
>  filename.html
>  foldername[2]
>  filename.html
>
> -------------------------------
> [/jcr:root/foldername/element(*, cms:folder) order by @name ascending ]  is 
> query a
> [/jcr:root/foldername[2]/element(*, cms:folder) order by @name ascending ] is 
> query b
>
> query a will get /jcr:root/foldername/filename.html and 
> /jcr:root/foldername[2]/filename.html
> and query b get what I need /jcr:root/foldername[2]/filename.html only.
> Is this query a designed to get two result or a bug?
>
> I want to get /jcr:root/foldername/filename.html only when I use query a, can 
> someone help me?

in this case you should use "/jcr:root/foldername[1]/element(*,
cms:folder) order by @name ascending".

cheers
stefan

>
>
> Best Regards,
> Edward
>

Reply via email to