<?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>5706</bug_id>
          
          <creation_ts>2008-05-21 15:41:03 +0000</creation_ts>
          <short_desc>[F&amp;O] Overflow errors in casting to gYear, gYearMonth.</short_desc>
          <delta_ts>2008-07-09 14:20:19 +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>Functions and Operators 1.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</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="Oliver Hallam">oliver</reporter>
          <assigned_to name="Michael Kay">mike</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>20205</commentid>
    <comment_count>0</comment_count>
    <who name="Oliver Hallam">oliver</who>
    <bug_when>2008-05-21 15:41:03 +0000</bug_when>
    <thetext>The range of gYear and gYearMonth are implementation defined (XQuery 5.3.4).

Section 17.1.1 of functions and operators says (re. casting from strings):

In casting to a date or time value, if the value is too large or too small to be represented by the implementation, error [err:FODT0001] is raised.

In casting to a duration value, if the value is too large or too small to be represented by the implementation, error [err:FODT0002] is raised.

For xs:anyURI, the extent to which an implementation validates the lexical form of xs:anyURI is ·implementation dependent·.

If the cast fails for any other reason, error [err:FORG0001] is raised.

If the phrase &quot;date or time value&quot; was intended to include gYear and gYearMonth, then this could have been phrased more clearly.

Otherwise it does not seem desirable to raise a FORG0001 error when a value is too large for gYear or gYearMonth (especially since this case is covered for all other types with implementation defined limits).  Ideally this should be either covered by FODT0001, or by a new error code (e.g. FODT0004).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20206</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-05-21 16:23:21 +0000</bug_when>
    <thetext>I propose changing the sentence from 

In casting to a date or time value, if the value is too large or too small to
be represented by the implementation, error [err:FODT0001] is raised.

to

In casting to xs:date, xs:dateTime, xs:gYear, or xs:gYearMonth (or types derived from these), if the value is too large or too small to be represented by the implementation, error [err:FODT0001] is raised.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21097</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-07-08 22:24:05 +0000</bug_when>
    <thetext>On 27 May 2008 (recorded in the minutes but sadly not here), the joint WGs agreed to accept the change proposed in comment #1.

Oliver, if you accept this resolution, I would be grateful if you would mark the bug as closed.

This will be the subject of erratum E28</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21103</commentid>
    <comment_count>3</comment_count>
    <who name="Oliver Hallam">oliver</who>
    <bug_when>2008-07-09 14:20:19 +0000</bug_when>
    <thetext>I agree with this resolution.  Thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>