<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>15368</bug_id>
          
          <creation_ts>2011-12-30 21:42:07 +0000</creation_ts>
          <short_desc>WindowingUseCase09</short_desc>
          <delta_ts>2012-01-31 01:29:29 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQuery 3 &amp; XPath 3 Test Suite</component>
          <version>Member-only Editors Drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Matthias Brantner">matthias.brantner</assigned_to>
          <cc>andrew.eisenberg</cc>
    
    <cc>matthias.brantner</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>62164</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-12-30 21:42:07 +0000</bug_when>
    <thetext>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

&lt;working-time&gt;Clara&lt;time&gt;PT3H45M&lt;/time&gt;&lt;/working-time&gt;

rather than

&lt;working-time&gt;&lt;person xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;Clara&lt;/person&gt;&lt;time&gt;PT3H45M&lt;/time&gt;&lt;/working-time&gt;

Secondly, the order of tuples after grouping is implementation-dependent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62781</commentid>
    <comment_count>1</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2012-01-16 17:07:59 +0000</bug_when>
    <thetext>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(&quot;person_events.xml&quot;);

&lt;result&gt;{
for sliding window $w in $seq/stream/event
  start  $s when $s/direction eq &quot;in&quot;
  only end  $e when $s/person eq $e/person and
    $e/direction eq &quot;out&quot;
let $person := $s/person
let $workingTime := xs:dateTime($e/@time) - xs:dateTime($s/@time)
group by $person
order by $person
return
  &lt;working-time&gt;
    {$person}
    &lt;time&gt;{ sum($workingTime) }&lt;/time&gt;
  &lt;/working-time&gt;
}&lt;/result&gt;


This order by clause should be added to this test case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63384</commentid>
    <comment_count>2</comment_count>
    <who name="Matthias Brantner">matthias.brantner</who>
    <bug_when>2012-01-31 01:29:29 +0000</bug_when>
    <thetext>The order by clause was added and the expected result contains the values of the post-grouping tuples.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>