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 1825 - Contradictory statements for casting from xs:QName to xs:QName
Summary: Contradictory statements for casting from xs:QName to xs:QName
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 1.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Ashok Malhotra
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
Depends on:
Reported: 2005-07-28 16:12 UTC by Frans Englich
Modified: 2005-09-29 12:51 UTC (History)
0 users

See Also:


Description Frans Englich 2005-07-28 16:12:58 UTC

The Casting table in section 17.1 allows casting xs:QName to itself, but in
section 17.1.1, one can read:

"A static error is raised [err:XPST0083]XP if the argument to a cast for
xs:QName or a type derived from xs:QName or xs:NOTATION is not an xs:string

Hence, the latter disallows casting from xs:QName, since xs:QName is not a
xs:string literal. I think it makes sense and should be allowed to cast from
xs:QName to xs:QName, and hence that the latter clause should be loosened to
allow casting from an xs:string literal or xs:QName.

This bug is similar to "[Bug 1515] Contradictory statement: casting to
xs:notation permitted/allowed",

Comment 1 Ashok Malhotra 2005-07-28 18:37:28 UTC
Casting from a type to itself is a special case -- a noop -- and everyone
recognizes this.  I don't think a special exception is required.
I suggest we close this without action.
Comment 2 Frans Englich 2005-07-28 18:39:55 UTC
Sure, go ahead and close(resolution INVALID, I guess).

Comment 3 Ashok Malhotra 2005-07-28 21:04:24 UTC
Closed with approval of the commentor.