W3C home > Mailing lists > Public > public-qt-comments@w3.org > April 2008

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

From: <bugzilla@farnsworth.w3.org>
Date: Wed, 02 Apr 2008 12:13:46 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1Jh1qc-0000ER-0I@farnsworth.w3.org>





------- 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:22 UTC