[Bug 6117] [XQuery11UC] Windowing use case Q7 - error in logic

http://www.w3.org/Bugs/Public/show_bug.cgi?id=6117


Xavier Franc <xfranc@online.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xfranc@online.fr




--- Comment #1 from Xavier Franc <xfranc@online.fr>  2008-11-19 23:33:40 ---
Indeed, Michael.

Here is a proposal for a solution:

<result>{
  for sliding window $w in $seq/stream/event 
    start $s when $s/person = "Anton" and $s/direction = "in"
    only end $e when $e/person = "Barbara" and $e/direction = "in"
  where xs:dateTime($e/@time) - xs:dateTime($s/@time) <
xs:dayTimeDuration("PT1H")
  return 
    <warning time="{ $e/@time }">Barbara: Anton arrived 1h ago</warning>
}</result>

Notice the "sliding" instead of tumbling.
Probably the "where" could also be replaced by a "and" with the "only end"
condition.


-- 
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 Wednesday, 19 November 2008 23:33:50 UTC