<?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>11913</bug_id>
          
          <creation_ts>2011-01-28 21:15:09 +0000</creation_ts>
          <short_desc>Description of windowing query 18 doesn&apos;t match the semantics of the query</short_desc>
          <delta_ts>2011-02-01 14:31:16 +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.0 Use Cases</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>11762</dup_id>
          
          <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="Matthias Brantner">matthias.brantner</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          <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>44865</commentid>
    <comment_count>0</comment_count>
    <who name="Matthias Brantner">matthias.brantner</who>
    <bug_when>2011-01-28 21:15:09 +0000</bug_when>
    <thetext>The textual description of windowing query q18 (see 4.2.18) says &quot;Calculate the time needed to process an order from the request up to the shipping.&quot;.

However, in the query &quot;and&quot; has a higher priority than &quot;or&quot;. Hence, any ShipNotice element is sufficient to end the window. I suggest to force precedence in the query as follows:

declare variable $seq := fn:doc(&quot;cxml.xml&quot;);

&lt;result&gt;{
  for sliding window $w in $seq/sequence/* 
    start  $s when $s[self::OrderRequest]
    end  $e when $e/@orderID eq  $s/@orderID
   and
   (
     $e[self::ConfirmationRequest] and $e/@status eq &quot;reject&quot; 
     or
    $e[self::ShipNotice]
    )
  where $e[self::ShipNotice]
  return 
    &lt;timeToShip orderID=&quot;{ $s/@orderID}&quot;&gt;{xs:dateTime($e/@date) - xs:dateTime($s/@date) }&lt;/timeToShip&gt; 
}&lt;/result&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44947</commentid>
    <comment_count>1</comment_count>
    <who name="Matthias Brantner">matthias.brantner</who>
    <bug_when>2011-02-01 14:31:16 +0000</bug_when>
    <thetext>Closing as duplicate of bug #11762

*** This bug has been marked as a duplicate of bug 11762 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>