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 11336 - Permitted usage of xs:anyAtomicType
Summary: Permitted usage of xs:anyAtomicType
Status: RESOLVED DUPLICATE of bug 11103
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Datatypes: XSD Part 2 (show other bugs)
Version: 1.1 only
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: David Ezell
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: resolved
Depends on:
Blocks:
 
Reported: 2010-11-17 17:28 UTC by Michael Kay
Modified: 2011-05-30 18:21 UTC (History)
2 users (show)

See Also:


Attachments

Description Michael Kay 2010-11-17 17:28:06 UTC
We don't allow a user-defined type to be derived by restriction from xs:anyAtomicType.

But we do allow a user-defined type to be derived by restriction from union(xs:anyAtomicType, xs:integer), or even from union(xs:anyAtomicType) (a singleton union), which appears to have exactly the same semantics.

This seems inconsistent...

I cannot see any reason for allowing xs:anyAtomicType (or xs:anySimpleType) to appear as a member type of a union or as an item type of a list.
Comment 1 Michael Kay 2010-11-17 17:28:45 UTC
Note, Saxonica test simple053.xsd relates to this.
Comment 2 Mukul Gandhi 2010-11-17 23:32:06 UTC
(In reply to comment #0)

I think this bug report is related to the bug http://www.w3.org/Bugs/Public/show_bug.cgi?id=11335 you've opened.

> We don't allow a user-defined type to be derived by restriction from
> xs:anyAtomicType.

In the bug 11335 my opinion is to retain the qualifier MAY for this feature. So as per my understanding we must not say for e.g "we *don't* allow" (since MAY is specifying a lax implementation behavior).
 
> But we do allow a user-defined type to be derived by restriction from
> union(xs:anyAtomicType, xs:integer), or even from union(xs:anyAtomicType) (a
> singleton union), which appears to have exactly the same semantics.
> 
> This seems inconsistent...

If we retain MAY for the point I've mentioned above, then the above examples shall be allowable as well.

> I cannot see any reason for allowing xs:anyAtomicType (or xs:anySimpleType) to
> appear as a member type of a union or as an item type of a list.

Again an MAY qualifier allows implementers to have a lax implementation (and ideally be implementation defined) in this regard.

Summarizing: I don't see these issues as significant design hole in the spec at the moment, so I'm in favor of keeping the status-quo.

But I'll be fine with the eventual decision of the WG about this bug report and the bug 11335.

Thanks.
Comment 3 David Ezell 2010-12-03 17:04:44 UTC
From the telcon --

MSM: we believe that anySimpleType and all of the specials have always been ruled as base types of restrictions, member types for unions, and item types for lists.

...: someone needs to send an email or paper that makes an argument that this premise is either true or false, and finds issues that have hinged on this premise over the years.

SG took an action to start email to this effect.
Comment 4 David Ezell 2010-12-03 19:29:13 UTC
Sandy Gao has started a discussion thread at
http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2010Dec/0001.html
Comment 5 David Ezell 2011-02-07 16:02:53 UTC
Possibly fulfilled by 11103.
Comment 6 C. M. Sperberg-McQueen 2011-02-07 16:04:17 UTC
I think this point has been made sufficiently explicit by the change we adopted for bug 11103.  If others agree, we can close this without further action.
Comment 7 Michael Kay 2011-02-07 16:55:24 UTC

*** This bug has been marked as a duplicate of bug 11103 ***