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 21664 - [XP30] Castable expresssion
Summary: [XP30] Castable expresssion
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 3.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-11 07:47 UTC by Tim Mills
Modified: 2013-05-07 16:22 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2013-04-11 07:47:08 UTC
In XP20/XQ10:

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 as a whole fails. 

In XP30/XQ30:

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

This apparent change appears to be a mistake, since the resolution of Bug 4873 has not been applied to XP30/XQ30.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=4873

Note that the change logs also record this change:

In E castable as T, if E raises a dyanmic error, castable returns false, it does not "fail". See 3.13.3 Castable.
Comment 1 Jonathan Robie 2013-05-07 16:16:31 UTC
I believe the correct language should be that found here:

http://www.w3.org/XML/2007/qt-errata/xquery-errata.html#E5

http://www.w3.org/XML/2007/qt-errata/xpath20-errata.html#E5

If the WG agrees, I will make sure this is reflected in the text.