W3C home > Mailing lists > Public > public-qt-comments@w3.org > April 2011

[Bug 12403] [XQuery30UC] incorrect attribute name for "Windowing" Q12

From: <bugzilla@jessica.w3.org>
Date: Mon, 18 Apr 2011 21:33:33 +0000
To: public-qt-comments@w3.org
Message-Id: <E1QBw4b-000064-F9@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12403

Jonathan Robie <jonathan.robie@redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Jonathan Robie <jonathan.robie@redhat.com> 2011-04-18 21:33:32 UTC ---
I believe this is correct now:

Solution in XQuery:

declare variable $seq := fn:doc("person_events.xml");

<result>{
  for tumbling window $w in $seq/stream/event[direction eq "in"]
    start  $x when $x/person = ("Barbara", "Anton")
    end next $y when xs:dateTime($y/@time) - xs:dateTime($x/@time) gt
xs:dayTimeDuration("PT30M")
  where $w[person eq "Anton"] and $w[person eq "Barbara"]
  return
    <alert time="{ xs:dateTime($y/@time) }">Anton and Barbara just
arrived</alert>
}</result>

Expected Result:

<result>
  <alert time="2006-01-01T11:15:00Z">Anton and Barbara just arrived</alert>
</result>

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Monday, 18 April 2011 21:33:34 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:45 UTC