- From: Ray Waldin <rwaldin@pacbell.net>
- Date: Wed, 26 Apr 2000 03:45:10 -0700
- To: <www-xml-schema-comments@w3.org>
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:42:26 UTC