W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2001

Simple Type Restriction(Facets)

From: Michael Anderson <michael@research.canon.com.au>
Date: Wed, 31 Jan 2001 13:12:18 +1100
Message-ID: <3A777482.5E72509E@research.canon.com.au>
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
The specifications [1] seem to say that in restricting a simpleType, any
duplicated facets between the base type and the restricted type are
resolved by throwing out the base type facet.  This seems to me that the
schema components

<simpleType name="baseType">
  <restriction base="integer">
    <minInclusive value="10"/>
  </restriction>
</simpleType>

<simpleType name="restrictedType">
  <restriction base="baseType">
    <minInclusive value="3"/>
  </restriction>
</simpleType>

Are OK (despite not restricting the value space) and the restrictedType
is equivalent to

<simpleType name="restrictedType">
  <restriction base="integer">      <!-- note base here -->
    <minInclusive value="3"/>
  </restriction>
</simpleType>

The Datatypes [2] spec says the value space should be restricted, but
[1] says you just throw out the base type's facets.  I assume [2] is the
correct way to do things as [1] is non-normative, but reference to [1]
is used as a normative schema representation constraint error-code.  Can
anyone point out to me which is correct, or alternatively what does [1]
really mean (can I really throw out base facets??)

cheers,
mick

[1] http://www.w3.org/TR/xmlschema-1/#st-restrict-facets
[2] http://www.w3.org/TR/xmlschema-2/#derivation-by-restriction
Received on Tuesday, 30 January 2001 21:12:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:19 GMT