W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2005

[Bug 2089] R-099: Issue re: the length facet for NMTOKENS, IDREFS, ENTITIES

From: <bugzilla@wiggum.w3.org>
Date: Fri, 09 Sep 2005 03:32:44 +0000
To: www-xml-schema-comments@w3.org
Message-Id: <E1EDZd6-0005KY-B0@wiggum.w3.org>


           Summary: R-099: Issue re: the length facet for NMTOKENS, IDREFS,
           Product: XML Schema
           Version: 1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSD Part 2: Datatypes
        AssignedTo: cmsmcq@w3.org
        ReportedBy: sandygao@ca.ibm.com
         QAContact: www-xml-schema-comments@w3.org

According to the Schema for Schemas, the above types are defined as a 
restriction of another list type, by specifying a "minLength" facet. Then the 
following simple type:

<simpleType name="mylist">
  <restriction base="NMTOKENS">
    <length value="3"/>
is invalid according to the constraint "Schema Component Constraint: length and 
minLength or maxLength". Is this what was intended? If so, it'd be very 
inconvenient: the user has to specify both minLength and maxLength to the same 
value to achieve the result.

To solve this problem 

Don't include a "minLength" facet in the above 3 types. But this means empty 
lists are allowed by these types (which might not be proper); or 
Allow "length" to be specified even if "min/maxLength" are specified on the 
base type, as long as base.minLength <= length <= base.maxLength. 

See question 2 from:
Received on Friday, 9 September 2005 03:32:49 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:03 UTC