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 19090 - [XQ30] casting to xs:anySimpleType
Summary: [XQ30] casting to xs:anySimpleType
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.0 (show other bugs)
Version: Working drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
Depends on:
Reported: 2012-09-27 09:57 UTC by Tim Mills
Modified: 2012-10-09 16:18 UTC (History)
1 user (show)

See Also:


Description Tim Mills 2012-09-27 09:57:04 UTC
In XQ10, it was an error (XPST0080) to cast to xs:anyAtomicType.

Since casting to simple types is now permitted, this error condition should be extended to casting to xs:anySimpleType.

This affects cast and castable in XQ30 and XP30.

This is tested in K-SeqExprCastable-5a and  K-SeqExprCast-4a.
Comment 1 Jonathan Robie 2012-09-30 19:57:13 UTC
Requires Working Group agreement. I'm leaving this open until the next telcon.
Comment 2 Jonathan Robie 2012-10-02 17:03:23 UTC
The Working Group agrees. The F&O spec is definitive here, and already raises an error in this case. The language specifications need to be revised to agree with F&O.
Comment 3 Jonathan Robie 2012-10-02 22:38:09 UTC
Changing the resolution to INVALID. As I started adding this to the spec, I found that this error is already defined in 3.16.3 Cast: 

"the target type cannot be xs:NOTATION or xs:anyAtomicType [err:XPST0080]."
Comment 4 Tim Mills 2012-10-03 06:09:51 UTC
I presume you marked this as invalid because F&O doesn't mention anySimpleType for XPST0080.

I'm therefore reopening it against F&O
Comment 5 Jonathan Robie 2012-10-09 16:18:38 UTC
In XQuery/XPath/F&O, we will add xs:anySimpleType to the list:

"the target type cannot be xs:NOTATION or xs:anyAtomicType or xs:anySimpleType[err:XPST0080]."