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 textual description of windowing query q18 (see 4.2.18) says "Calculate the time needed to process an order from the request up to the shipping.". However, in the query "and" has a higher priority than "or". 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("cxml.xml"); <result>{ 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 "reject" or $e[self::ShipNotice] ) where $e[self::ShipNotice] return <timeToShip orderID="{ $s/@orderID}">{xs:dateTime($e/@date) - xs:dateTime($s/@date) }</timeToShip> }</result>
Closing as duplicate of bug #11762 *** This bug has been marked as a duplicate of bug 11762 ***