This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
What error code do you get if you try to cast from a source type to a target type for which casting is not permitted (e.g. cast integer to anyURI)? The language book (3.12.3 4f) says: For any combination of input type and target type that is not in the above list, a cast expression raises a type error [err:XPTY0004]. F+O (section 17) says: If casting is attempted from an ST to a TT for which casting is not supported, an error is raised [err:FORG0001]. (Yet another illustration of the problems caused by describing casting in more than one place.) The casting tests in the test suite seem to assume the XPTY0004 is correct. Michael Kay
Casting are runtime errors and do not fall into the category of type errors, however, if no instance of a type can be cast to another type, you can raise the error statically...
This was discussed in the joint QT WG meeting on 5/19/2005 and it was decided to change the error code in the F&O to conform to the error code in the language documents: XPTY0004. Ashok Malhotra