This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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.
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.