Re: SimpleTypes derived by restriction

My apologies for the incorrect examples.  Here's what I meant...

<simpleType name="firstType" base="decimal">
  <minInclusive value="1"/>
  <maxInclusive value="10"/>
</simpleType>

<simpleType name="secondType" base="firstType">
  <minInclusive value="2"/>
  <maxInclusive value="5"/>
</simpleType>

<simpleType name="thirdType" base="firstType">
  <minInclusive value="0"/>
  <maxInclusive value="11"/>
</simpleType>

-Ray

> Hello,
>
> I have some questions and a comment concerning SimpleTypes derived "by
> restriction".  To illustrate:
>
> <simpleType name="firstType" base="decimal">
>   <minInclusive value="1"/>
>   <maxInclusive value="10"/>
> </simpleType>
>
> <simpleType name="secondType" base="firstType">
>   <minInclusive="2"/>
>   <maxInclusive="5"/>
> </simpleType>
>
> This seems perfectly acceptible as secondType is derived from firstType
"by
> restricting its value space", by specifying "more restrictive" values for
> some facets.  Here's a case that's not so obvious, using "less
restrictive"
> values:
>
> <simpleType name="thirdType" base="firstType">
>   <minInclusive="0"/>
>   <maxInclusive="11"/>
> </simpleType>
>
> My questions:
>
> Is this disallowed or just pointless?  In other words, should a schema
> processor regard this type derivation as an error, or simply produce a
> thirdType which is no more restrictive than firstType?
>
> What does "more restrictive" mean for the period and duration facets?  Can
> period and duration be re-specified in any meaningful way or is
> re-specifying either of these values disallowed?
>
> If a derived type re-specifies the pattern facet (as in the case of NCName
> and Name), are schema processors expected to:
>     A) ensure that a derived type specifies a "more restrictive" pattern
> than its base type, or
>     B) check all patterns in a type's derivation hierarchy when validating
> an instance of that type?
>
> My comment:
>
> The datatypes spec should elaborate on the expected behavior of schema
> processors when encountering derived types which re-specify values for
each
> facet.
>
> -Ray

Received on Wednesday, 26 April 2000 06:49:08 UTC