This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15368 - WindowingUseCase09
Summary: WindowingUseCase09
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Member-only Editors Drafts
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Matthias Brantner
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-30 21:42 UTC by Michael Kay
Modified: 2012-01-31 01:29 UTC (History)
2 users (show)

See Also:


Attachments

Description Michael Kay 2011-12-30 21:42:07 UTC
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.
Comment 1 Andrew Eisenberg 2012-01-16 17:07:59 UTC
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.
Comment 2 Matthias Brantner 2012-01-31 01:29:29 UTC
The order by clause was added and the expected result contains the values of the post-grouping tuples.