Derivation of facet values

Hallo,
 
I would appreciate some clarification on the following points:
 
(a) If you take into account, that the Datatypes Spec states the following
for the minLength facet:
 
    Schema Component Constraint: minLength valid restriction 
 
----------------------------------------------------------------------------
----------
    It is an ·error· if minLength is among the members of {facets} 
    of {base type definition} and {value} is less than the {value} of the 
    parent minLength
 
It was ok for me, that MSXML Core Services SP1 cites the
above sentence, together with the following schema.
 
 --- snip ----
  
   <xsd:simpleType name="string_len8">
      <xsd:restriction base="xsd:string">
         <xsd:minLength value="8" />
         <xsd:maxLength value="8" />
      </xsd:restriction>
   </xsd:simpleType>
 
   <xsd:simpleType name="string_len4">
      <xsd:restriction base="string_len8">
         <xsd:minLength value="4" />
         <xsd:maxLength value="8" />
      </xsd:restriction>
   </xsd:simpleType>
</xsd:schema>
 
But if I use length, instead of minLength and maxLength, MSXML has got
no problems with it.
 
--- snip ---
 
   <xsd:simpleType name="string_len8">
      <xsd:restriction base="xsd:string">
         <xsd:length value="8" />
      </xsd:restriction>
   </xsd:simpleType>
   
    <xsd:simpleType name="string_len4">
      <xsd:restriction base="string_len8">
         <xsd:length value="4" />
      </xsd:restriction>
   </xsd:simpleType>
</xsd:schema>
 
If you take into account, that the Datatypes Spec has got the two following
Schema component constraints:
 
Schema Component Constraint: minLength valid restriction (cited above)
 
AND
 
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. 
 
These facts result in a couple of questions:
 
(1) I thought, that "Schema Component Constraints" were constraints
     on the "internal representation of the schema". But in case of the
     facets, doesnīt it make sense that these constraints "restrict"
     the XML Representation aswell?. In case of minLength it does.....
 
     Why does the headline say "Schema Component Constraint" ?
 
(2) Isnīt it at least inconsistent, if the Schema Component Constraint for
     a valid restriciton of minLength results in an error message, while the
     the same constraint for the length facet does not?
 
(3) Provided that, the behaviour for the "minLength valid restriction"
conforms
     to the spec, why would I need a fixed attribute on most facets?
     
 
Have a nice weekend,
 
Rainer Becker

Received on Monday, 29 July 2002 05:23:51 UTC