This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The query in Windowing Use Case Q12, 4.2.12 Q12, should produce a date attribute: return <alert date="{... The expected result contains a time attribute: <alert time="2006-01-02T14:00:00-00:00">Clara is suspicious</alert> I suggest that these be aligned by changing the attribute name in the query. Note: The content of the alert element has already been corrected via Bug #11761.
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>