This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21655 - [QT3TS] K2-SeqExprCastable-3, 4
Summary: [QT3TS] K2-SeqExprCastable-3, 4
Status: CLOSED INVALID
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: O'Neil Delpratt
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-10 09:11 UTC by Tim Mills
Modified: 2013-04-11 07:47 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2013-04-10 09:11:07 UTC
XQuery 3.0 states that:

"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:"

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


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

   <test-case name="K2-SeqExprCastable-4">
      <description> Combine operator div with castable as(#2). </description>
      <created by="Frans Englich" on="2007-11-26"/>
      <test>concat("2007-01-3", 1 div 0) castable as xs:date</test>
      <result>
         <error code="FOAR0001"/>
      </result>
   </test-case>
Comment 1 Tim Mills 2013-04-11 07:47:37 UTC
I'm closing as a result of Bug 21664.