<?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>21655</bug_id>
          
          <creation_ts>2013-04-10 09:11:07 +0000</creation_ts>
          <short_desc>[QT3TS] K2-SeqExprCastable-3, 4</short_desc>
          <delta_ts>2013-04-11 07:47:49 +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>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>INVALID</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="Tim Mills">tim</reporter>
          <assigned_to name="O&apos;Neil Delpratt">oneil</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>85854</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2013-04-10 09:11:07 +0000</bug_when>
    <thetext>XQuery 3.0 states that:

&quot;The expression E castable as T returns true if the result of evaluating E can be successfully cast into the target type T by using a cast expression; otherwise it returns false. If evaluation of E fails with a dynamic error, the castable expression returns false. The castable expression can be used as a predicate to avoid errors at evaluation time. It can also be used to select an appropriate type for processing of a given value, as illustrated in the following example:&quot;

Neither of the tests K2-SeqExprCastable-3 and -4 expect false, yet in each case the argument to castable raises an error.


   &lt;test-case name=&quot;K2-SeqExprCastable-3&quot;&gt;
      &lt;description&gt; Combine operator div with castable as. &lt;/description&gt;
      &lt;created by=&quot;Frans Englich&quot; on=&quot;2007-11-26&quot;/&gt;
      &lt;test&gt;(1 div 0) castable as xs:string&lt;/test&gt;
      &lt;result&gt;
          &lt;any-of&gt;
            &lt;assert-true/&gt;&lt;!-- permitted by errors-and-optimization --&gt;
            &lt;error code=&quot;FOAR0001&quot;/&gt;
          &lt;/any-of&gt;
      &lt;/result&gt;
   &lt;/test-case&gt;

   &lt;test-case name=&quot;K2-SeqExprCastable-4&quot;&gt;
      &lt;description&gt; Combine operator div with castable as(#2). &lt;/description&gt;
      &lt;created by=&quot;Frans Englich&quot; on=&quot;2007-11-26&quot;/&gt;
      &lt;test&gt;concat(&quot;2007-01-3&quot;, 1 div 0) castable as xs:date&lt;/test&gt;
      &lt;result&gt;
         &lt;error code=&quot;FOAR0001&quot;/&gt;
      &lt;/result&gt;
   &lt;/test-case&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85940</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2013-04-11 07:47:37 +0000</bug_when>
    <thetext>I&apos;m closing as a result of Bug 21664.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>