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

Derivation of facet values

From: Rainer Becker <r.becker@Nitro-Software.com>
Date: Fri, 26 Jul 2002 04:16:34 -0400 (EDT)
Message-ID: <819808E8E999D41196DA000102AF06CE0C63C5@SRV_KOM>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
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

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