<?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>1901</bug_id>
          
          <creation_ts>2005-08-29 15:46:28 +0000</creation_ts>
          <short_desc>Limitations on value ranges</short_desc>
          <delta_ts>2005-09-29 12:55:41 +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>XPath 2.0</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 2000</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="Andreas Behm">abehm</reporter>
          <assigned_to name="Don Chamberlin">chamberl</assigned_to>
          
          
          <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>5560</commentid>
    <comment_count>0</comment_count>
    <who name="Andreas Behm">abehm</who>
    <bug_when>2005-08-29 15:46:28 +0000</bug_when>
    <thetext>While working on the test suite, we found that limitations on value ranges
are not specified clear enough in order to write tests that can run
on any implementation. 
While there are some rules on overflow of numeric operators, it is not clear
whether for example constructors with high precision as in
1.00000000000000000000000001 should succeed or not. Other areas are
limitations on string lengths or precision for numeric types.

Since atomic values are used in virtually any part of the test suite,
it will often happen that an implementation fails a tests solely because
of a different limitation on value ranges.

We would like to ask the working group to clarify the rules for value
limitations, and define the range for conforming implementations.

On behalf of the XQuery Test Task Force

Andreas</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5561</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Cotton">pcotton</who>
    <bug_when>2005-08-29 16:37:43 +0000</bug_when>
    <thetext>Changing component to XPath since this impacts both XQuery and XPath.

/paulc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6515</commentid>
    <comment_count>2</comment_count>
    <who name="Don Chamberlin">chamberl</who>
    <bug_when>2005-09-28 10:36:15 +0000</bug_when>
    <thetext>Andreas,
On Sept. 28, 2005, the Query Working Group considered your comment and resolved 
it as follows:

In XQuery Section 5.3 (Data Model Conformance), the following new rule will be 
added:

4. Ranges of data values: In XQuery, the following limits are
implementation-defined:

(a) For the xs:decimal type, the maximum number of decimal digits 
(totalDigits facet) (must be at least 18)

(b) For the types xs:date, xs:time, xs:dateTime, xs:gYear, 
xs:gYearMonth: the maximum value of the year component, and the
maximum number of fractional second digits (must be at least 3).

(c) For the xs:duration type: the maximum absolute values of the 
years, months, days, hours, minutes, and seconds components.

(d) For the xdt:yearMonthDuration type: the maximum absolute value,
expressed as an integer number of months.

(e) For the xdt:dayTimeDuration type: the maximum absolute value,
expressed as a decimal number of seconds.

(f) For the types xs:string, xs:hexBinary, xs:base64Binary, xs:QName, 
xs:anyURI, xs:NOTATION, and types derived from them: limitations (if any)
imposed by the implementation on lengths of values. 

Note that all of the above limitations
need not be fixed, but may depend on environmental factors such as 
system resources.

In the specific example cited in your comment, the decimal literal 
1.00000000000000000000000001, the XQuery document specifies that the
literal is converted to a decimal value by the rules for casting from
string to decimal, which in turn are defined by the rules for XML Schema
validation. XML Schema validation states that a value 
that is not exactly equal to any point in the target value space is mapped into 
the nearest point in the value space. Therefore the correct handling of the 
literal in your example is to map it into the decimal value 1.0.

I have marked your comment as &quot;Resolved and fixed.&quot; If this resolution is 
acceptable to you, please change the status of this comment to &quot;Closed&quot;.

Regards,
Don Chamberlin</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>