<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>20519</bug_id>
          
          <creation_ts>2012-12-26 23:10:11 +0000</creation_ts>
          <short_desc>[QT3TS] test cases with too many digits</short_desc>
          <delta_ts>2013-01-01 18:08:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQuery 3 &amp; XPath 3 Test Suite</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrew Eisenberg">andrew.eisenberg</reporter>
          <assigned_to name="Tim Mills">tim</assigned_to>
          <cc>mike</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80623</commentid>
    <comment_count>0</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2012-12-26 23:10:11 +0000</bug_when>
    <thetext>rangeExpr-28 to rangeExpr-32 contain queries with long strings of digits. The query in rangeExpr-28 is:

18446744073709551616 to 18446744073709551620


As XML Schema requires implementations to support only 18 digits, I suggest that either a) the test cases contains smaller integer values, or b) error FORG0001 be accepted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80634</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-12-27 08:19:30 +0000</bug_when>
    <thetext>I suspect FOCA0003 (Input value too large for integer) might be more appropriate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80635</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-12-27 08:51:48 +0000</bug_when>
    <thetext>Fixed to use FOCA0003.

It seems that currently we don&apos;t allow an implementation to raise a static error in such cases; it has to be a dynamic error - which has the virtue that you can use try/catch on it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80638</commentid>
    <comment_count>3</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2012-12-27 15:04:19 +0000</bug_when>
    <thetext>I don&apos;t think FOCA0003 is the correct error for this situation. The bullet that raises FOCA0003 begins with &quot;If ST is xs:decimal, xs:float or xs:double, then ...&quot;

I believe that the rules that apply are:


3.1.1 Literals

The value of the numeric literal is determined by casting it to the appropriate type according to the rules for casting from xs:untypedAtomic to a numeric type as specified in Section 18.2 Casting from xs:string and xs:untypedAtomic (FO30).


18.2 Casting from xs:string and xs:untypedAtomic

When casting to a numeric type:

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


4.2 Arithmetic operators on numeric values

o For xs:integer operations, implementations that support limited-precision integer operations ·must· select from the following options:

    o They ·may· choose to always raise an error [err:FOAR0002].

    o 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].


So, I now believe that FOAR0002 should be returned.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80788</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-12-31 09:57:32 +0000</bug_when>
    <thetext>Agreed. Will commit the change when I&apos;m on a better internet connection.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>