Hi Martin,

Or is that a new XQuery 4 feature that the "when" clause can be omitted

Exactly, window clauses have become more flexible: You can now omit the 'when' condition, as well as the 'start' clause [1].

Hope this helps,
Christian