You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by tingup <ti...@gmail.com> on 2010/07/23 09:10:00 UTC
is this a bug?
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?
Best Regards,
Edward
Re: is this a bug?
Posted by Stefan Guggisberg <st...@day.com>.
On Fri, Jul 23, 2010 at 9:10 AM, tingup <ti...@gmail.com> 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
>