[xquery-talk] Order of results

Michael Kay mike at saxonica.com
Fri Nov 5 09:05:59 PST 2010


There's something in XQuery called "ordering mode", and if this is set 
to "unordered" then this would be a legitimate result. It would be very 
unfriendly of an XQuery processor to set this to "unordered" by default, 
but the specification does actually permit it.

Michael Kay
Saxonica

On 05/11/2010 00:07, Vyacheslav Zholudev wrote:
> Hi all,
>
> Using one of the XQuery processors I encountered the following situation:
>
> Assume I have a sequence of 2 XML elements: $seq := (A, B)
> "A" contains 2 element children: a1, a1; "B" contains one element child b1
>
> Query:
> for $i in 1 to 2 return ($seq[$i], $seq[$i]/*)
>
> returns
> (A, b1, B, a1, a2)
>
> That is for A it returns children of B, and for B it returns children of A.
>
> Is it somehow explainable or it's a definitely a bug in the XQuery processor?
>
> Thanks,
> Vyacheslav
>
>
>
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk
>



More information about the talk mailing list