This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
There are two problems with the expected results of this test. Firstly, the value of $person in the post-grouping key should be the value after atomization, which means that the elements in the result should take the form <working-time>Clara<time>PT3H45M</time></working-time> rather than <working-time><person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Clara</person><time>PT3H45M</time></working-time> Secondly, the order of tuples after grouping is implementation-dependent.
On the second point that you raise, an order by clause was added to Windowing Use Case in response to Bug #11759. When we next publish our Use Cases, Q9 will read: declare variable $seq := fn:doc("person_events.xml"); <result>{ for sliding window $w in $seq/stream/event start $s when $s/direction eq "in" only end $e when $s/person eq $e/person and $e/direction eq "out" let $person := $s/person let $workingTime := xs:dateTime($e/@time) - xs:dateTime($s/@time) group by $person order by $person return <working-time> {$person} <time>{ sum($workingTime) }</time> </working-time> }</result> This order by clause should be added to this test case.
The order by clause was added and the expected result contains the values of the post-grouping tuples.