20 Oct
2017
20 Oct
'17
6:20 p.m.
Hello, I noticed that the order of my FLWOR expression is not kept when I do an xpath on the node list:
basex 'declare function local:nodes() {let $data := (<test a="2"/>, <test a="1"/>) let $nodes := trace(for $n in $data order by xs:integer($n/@a/data()) return $n) return $nodes }; local:nodes()/@a/data()' <test a="1"/> <test a="2"/> 2 1
I would expect it to return it in order. Is it a bug or or some optimization allowed by XQuery? I tried it on the latest snapshot (BaseX90-20171020.102055.zip). Best regards, Iwan