W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2002

Is the fixed-attribute on length-facet useless?

From: Rainer Becker <r.becker@Nitro-Software.com>
Date: Tue, 13 Aug 2002 11:54:13 -0400 (EDT)
Message-ID: <819808E8E999D41196DA000102AF06CE0C63D9@SRV_KOM.NITRO>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Hallo NG,
I know, that I have asked a similar question before, but I would
like to reach some sort of final conclusion on the question.
if the fixed-Attribute on the length-facet is useless or not.
The Datatype-Spec states: Constraints on length Schema Components
Schema Component Constraint: length valid restriction 
    It is an ·error· if length is among the members of 
    {facets} of {base type definition} and {value} is 
    not equal to the {value} of the parent length. 

If you take it for granted, that 
<xsd:length value="3" />
is internally treated as 
<xsd:minLength value="3" />
<xsd:maxLength value="3" />
a simple type, that would be derived by restriction
from the type above, can not increase the minLength
value or decrease the maxLength value for a valid restriction,
because it would surely violate the rule that minOccurs must 
be less than or equal to maxOccurs. 
As a result, there is no other chance then keeping the values
of the base type.
On the other hand, the Datatype-Spec states:
If {fixed} is true, then types for which the current 
type is the {base type definition} cannot specify a 
value for length other than {value}. 
(1) Would you agree, that the fixed-attribute is useless
     in connection with length?
(2) What good is length anyways, is there a reason, why
     XML Schema 1.1 should still use it? 
I see, that the fixed-attribute on minLength und maxLength is
vitally important. 
Have a nice day
Rainer Becker
Received on Tuesday, 13 August 2002 12:03:55 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:57 UTC