[xquery-talk] Order of results

David dlee at calldei.com
Thu Nov 4 21:11:19 PST 2010


Good question.
To me this looks like a bug.  While many things in xquery dont return 
the order one may 'naturally suspect' I belive this case is well 
defined.  Since your using the sequence expression operator (',") then I 
belive this applies to 3.3 of the xquery spec

http://www.w3.org/TR/xquery/

quote:

[Definition: One way to construct a sequence is by using the*comma 
operator*, which evaluates each of its operands and concatenates the 
resulting sequences,*in order,* into a single result sequence.]

But since you didn't provide the full input and code I cant tell for 
sure if maybe there is something fishy elsewhere.





David A. Lee
dlee at calldei.com
http://www.xmlsh.org


On 11/4/2010 8:07 PM, 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20101104/01670609/attachment.htm


More information about the talk mailing list