[Bug 27180] Various minor bugs and inconsistencies

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27180

--- Comment #16 from Michael Kay <mike@saxonica.com> ---
Another comment here, it's a wrong approach to read the list of error codes and
see which one has the best-fit description. The descriptions are often
hopelessly generic (e.g. err:FORG0006, Invalid argument type.). You have to
work from the rules for the construct in question. Here I started with the
rules in the XPath/XQuery book for numeric literals, which takes you to F+O
19.1.2.4 (casting to xs:integer) which takes you to 19.2 (casting from
xs:string), which takes you to

If the value is too large or too small to be accurately represented by the
implementation, it is handled as an overflow or underflow as defined in 4.2
Arithmetic operators on numeric values.

and 4.2 has

For xs:integer operations, implementations that support limited-precision
integer operations ·must· select from the following options:
They ·may· choose to always raise a dynamic error [err:FOAR0002].
They ·may· provide an ·implementation-defined· mechanism that allows users to
choose between raising an error and returning a result that is modulo the
largest representable integer value. See [ISO 10967].

An implementor who wants to take the second option could challenge the test on
those grounds (it would give a result of "true"!), but no-one has done so; the
only other option, if you don't support an integer of this size, seems to be
FOAR0002.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 19 December 2014 23:40:42 UTC