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 2089 - R-099: Issue re: the length facet for NMTOKENS, IDREFS, ENTITIES
Summary: R-099: Issue re: the length facet for NMTOKENS, IDREFS, ENTITIES
Status: CLOSED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Datatypes: XSD Part 2 (show other bugs)
Version: 1.0 only
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-09 03:32 UTC by Sandy Gao
Modified: 2009-04-21 19:24 UTC (History)
0 users

See Also:


Attachments

Description Sandy Gao 2005-09-09 03:32:44 UTC
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"/>
  </restriction>
</simpleType>
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:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2001OctDec/0222.html
Comment 1 Sandy Gao 2005-09-09 03:33:11 UTC
At the March 8 telecon, the WG decided to classify this as an error.

April 5: The WG decided that the proposed erratum text needed to be revised to 
add the required constraints for the cases where length and one or more of 
minLength and maxLength are specified in the same derivation chain. 

Revised text:
http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2002Oct/0357.html
reviewed/approved at Nov. 1 telecon.

Erratum E2-35 added.