<?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>5694</bug_id>
          
          <creation_ts>2008-05-16 10:07:41 +0000</creation_ts>
          <short_desc>K2-SeqExprCast-22,78,90 may raise FOAR0002</short_desc>
          <delta_ts>2008-05-21 20:22:45 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Query Test Suite</product>
          <component>XML Query Test Suite</component>
          <version>unspecified</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="Ivan Shcheklein">vano_msu</reporter>
          <assigned_to name="Frans Englich">frans.englich</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>20139</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Shcheklein">vano_msu</who>
    <bug_when>2008-05-16 10:07:41 +0000</bug_when>
    <thetext>I believe K2-SeqExprCast-22,78,90 may raise FOAR0002 due to the following rule (F&amp;O 11.1.7):

&quot;In casting to numerics, 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 6.2 Operators on Numeric Values.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20166</commentid>
    <comment_count>1</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2008-05-20 10:54:21 +0000</bug_when>
    <thetext>Added FOAR0002 to K2-SeqExprCast-22.

Regarding K2-SeqExprCast-78 and K2-SeqExprCast-90: these doesn&apos;t run into implementation defined limits, they are invalid values no matter what. For that reason they expect FORG0001.

Does this sound correct?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20175</commentid>
    <comment_count>2</comment_count>
    <who name="Ivan Shcheklein">vano_msu</who>
    <bug_when>2008-05-20 17:06:41 +0000</bug_when>
    <thetext>I&apos;m not sure actually.

It seems that xs:unsignedLong, xs:long. xs:integer built in datatypes don&apos;t have pattern facets defined by default. They have only restrictions through maxInclusive/minInclusive and similar facets.

So, in K2-SeqExprCast-78 for example we follow the specification (F&amp;O 17.5):

-----------------------------------
&quot;... Casting across the type hierarchy is logically equivalent to three separate steps performed in order. Errors can occur in either of the latter two steps.

...
   2.Cast the value to the primitive type of TT, as described in 17.1 Casting from primitive types to primitive types.&quot;
-----------------------------------
   
It means we should perform the following casting operation in the intermediate step:

&quot;-9223372036854775809&quot; cast as xs:integer

which may raise FOAR0002.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20200</commentid>
    <comment_count>3</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2008-05-21 11:13:31 +0000</bug_when>
    <thetext>Should be fixed in CVS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20208</commentid>
    <comment_count>4</comment_count>
    <who name="Ivan Shcheklein">vano_msu</who>
    <bug_when>2008-05-21 20:22:45 +0000</bug_when>
    <thetext>Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>