[xquery-talk] Order of results

Markus Pilman mpilman at student.ethz.ch
Fri Nov 5 07:29:12 PST 2010


Hi,

like David, I also think this is a bug. For example for the query

declare variable $seq := (<A><a1/><a2/></A>, <B><b1/></B>);

for $i in 1 to 2 return ($seq[$i], $seq[$i]/*)

, zorba would return something like

<A><a1/><a2/></A><a1/><a2/><B><b1/></B><b1/>

and I think this is the correct result (you can try it easily on http://try.zorba-xquery.com ). You probably should try your query on other engines and than write a mail to the implementer of the XQuery engine you are using.

Best Markus

Am 05.11.2010 um 01:07 schrieb Vyacheslav Zholudev:

> 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/20101105/54ce07b0/attachment.htm


More information about the talk mailing list