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 28588 - [QT3] Test K-SeqExprCast-422a expects FORG0001, but XPTY0117 should be thrown
Summary: [QT3] Test K-SeqExprCast-422a expects FORG0001, but XPTY0117 should be thrown
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3.1 (show other bugs)
Version: Recommendation
Hardware: PC Windows NT
: P2 trivial
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-01 00:58 UTC by Abel Braaksma
Modified: 2015-07-16 15:49 UTC (History)
2 users (show)

See Also:


Attachments

Description Abel Braaksma 2015-05-01 00:58:14 UTC
XPTY0117 is defined for XP30 as:

In a cast expression, if an item is of type xs:untypedAtomic and the expected type is namespace-sensitive, a type error [err:XPTY0117] is raised.

However, this test expects FORG0001. This seems incorrect. The test itself has the following expression:

xs:untypedAtomic("an arbitrary string(untypedAtomic source)") cast as xs:QName
Comment 1 Michael Kay 2015-05-01 07:24:07 UTC
I think the description of the error in XPath/XQuery Appendix F is incorrect.

The only time XPTY0117 is thrown is when this conversion is invoked in the course of applying the function conversion rules (i.e. when an untypedAtomic argument is supplied to a funcion expecting a QName. It is not raised "In a cast expression".

The rules for cast expressions are in F+O. For a cast from untypedAtomic to QName, two errors are defined: FORG0001 if the value is not a lexically-valid QName, and FONS0004 if the namespace prefix is not in scope.
Comment 2 O'Neil Delpratt 2015-05-05 16:00:20 UTC
The WG agreed that editorial change is required in the spec.
Comment 3 Michael Kay 2015-05-06 18:50:29 UTC
The change has been applied and committed.
Comment 4 Michael Kay 2015-07-06 09:26:28 UTC
The change has been applied in the current draft but does not appear with change highlighting.