[Bug 10374] minor editorial improvement : subtype clarification of ENTITIES, IDREFS & NMTOKENS

http://www.w3.org/Bugs/Public/show_bug.cgi?id=10374

--- Comment #2 from C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com> 2010-11-27 01:42:09 UTC ---
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.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Saturday, 27 November 2010 01:42:12 UTC