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

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5459





------- Comment #3 from oliver@cbcl.co.uk  2008-02-13 15:00 -------
When I said xs:numeric I was referring to a union of the numeric types, which
is how I had been (wrongly) treating the word "numeric" in the F+O
declarations, and I agree that the rules for fn:abs, fn:ceiling, fn:floor,
fn:round, and
fn:round-half-to-even are fine.

The functions fn:min, fn:max, fn:avg and fn:sum however are defined for
xs:anyAtomicType*, and so this problem still occurs:
If you have an argument of type (xs:integer | xs:double)*, then (as far as I
can tell) the static analysis rules for these functions imply a return type of
xs:double, when it could also be xs:integer.

Received on Wednesday, 13 February 2008 15:00:43 UTC