[Bug 5459] [FS] Static type analysis for the fn:abs, fn:ceiling, fn:floor, fn:round, and fn:round-half-to-even functions

------- Comment #12 from tim@cbcl.co.uk  2008-04-02 12:13 -------
One further observation on fn:sum...

>From F&O

"Returns a value obtained by adding together the values in $arg. If $zero is
not specified, then the value returned for an empty sequence is the xs:integer
value 0."

Therefore

fn:sum( $arg as xs:dayTimeDuration* ) 

should be typed as xs:dayTimeDuration | xs:integer

I can't believe that this result is in any way desirable!  It make more sense
for the unary version of fn:sum to return empty sequence.

Received on Friday, 4 April 2008 09:59:09 UTC