This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In XSD 1.1 data types spec, the base type of ENTITIES, IDREFS and NMTOKENS is anySimpleType (this is reflected in the type hierarchy diagram available at, http://www.w3.org/TR/xmlschema11-2/#built-in-datatypes). But this particular type/subtype relationship is not described anywhere in the XSD 1.1 data types spec prose. Whereas for many of the other built-in schema types, texts like following is provided in the spec: "The ·base type· of xx is yy" I think it would be good if the spec provides text like following for the types ENTITIES, IDREFS and NMTOKENS: 3.4.12 ENTITIES -> The ·item type· of ENTITIES is ENTITY and base type is anySimpleType (the current text being -- The ·item type· of ENTITIES is ENTITY). 3.4.10 IDREFS -> The ·item type· of IDREFS is IDREF and base type is anySimpleType (the current text being -- The ·item type· of IDREFS is IDREF). 3.4.5 NMTOKENS -> The ·item type· of NMTOKENS is NMTOKEN and base type is anySimpleType (the current text being -- The ·item type· of NMTOKENS is NMTOKEN). This change in text would particularly be helpful to readers, because in XSD 1.0 data types spec base types of ENTITIES, IDREFS and NMTOKENS were ENTITY, IDREF and NMTOKEN respectively.
discussed on the conference call 2010-08-20
First a quick note on the final sentence of the problem description: in XSD 1.0 data types spec base types of ENTITIES, IDREFS and NMTOKENS were ENTITY, IDREF and NMTOKEN respectively. It's easy to understand how the diagram at the beginning of section 3, and the general informality of the prose in Datatypes 1.0, might have led to this view. But in fact I have not found anything in 1.0 that actually says, when a type is derived by list or union, what its base type is. (It's possible I overlooked something.) In the case of ENTITIES, IDREFS, and NMTOKENS, there is a slight complication in that they are derived from anySimpleType not in a single step but in two steps: the declaration of ENTITIES in the schema for schema documents is given as <xs:simpleType name="ENTITIES" id="ENTITIES"> <xs:annotation> ... <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#ENTITIES"/> </xs:annotation> <xs:restriction> <xs:simpleType> <xs:list itemType="xs:ENTITY"/> </xs:simpleType> <xs:minLength value="1" id="ENTITIES.minLength"/> </xs:restriction> </xs:simpleType> so strictly speaking its base type is not anySimpleType but the anonymous type declared in the lines <xs:simpleType> <xs:list itemType="xs:ENTITY"/> </xs:simpleType> Perhaps instead of simply saying "The base type of ... is anySimpleType", we need to say something more detailed, for example ENTITIES is derived in two steps from anySimpleType: an anonymous list type is defined with item type ENTITY; ENTITIES restricts the value space of this anonymous type to list of length greater than zero. This may be more elaborate than is useful.
At the XML Schema working group call of 14 January 2011, the group agreed to add sentences along the lines of the text shown in comment 2 to the sections on the three datatypes in question. This change has now been made in the status-quo documents at http://www.w3.org/XML/Group/2004/06/xmlschema-2/datatypes.diff.html http://www.w3.org/XML/Group/2004/06/xmlschema-2/datatypes.diff-1.0.html http://www.w3.org/XML/Group/2004/06/xmlschema-2/datatypes.diff-wd.html (member-only links) Accordingly, I'm marking the bug resolved. As the originator of the issue, Mukul Gandhi should in the normal course of events get an email notification of this change of status. It would be helpful if you would examine the resolution of the issue and indicate by closing the bug that you are happy with the resolution, or by reopening it that you are not happy. If we don't hear from you in the next two weeks we will assume that you are content with the resolution of the issue. The WG thanks you for helping us make the spec clearer.
Thanks for the resolution of this bug. I'm happy with the resolution, therefore I'm marking the issue closed. Thanks.