W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2001

ComplexType derivation by restriction

From: <afo@zurich.ibm.com>
Date: Fri, 23 Mar 2001 10:51:44 +0100
To: www-xml-schema-comments@w3.org
Message-ID: <C1256A18.0035F702.00@d12mta01.de.ibm.com>


Part I section3.4.3 Constraints on XML Representations of Complex Type
Definitions says:
"2 If the <simpleContent> alternative is chosen, the type definition
resolved to by the
actual value of the base [attribute] must be either a complex type
definition *WHOSE
 {BASE TYPE DEFINITION}* is a simple type definition or,
only if the <extension> alternative is also chosen, a simple type

I think this is too restrictive. It should say " ... * WHOSE CONTENT TYPE *
is a simple type definition ..." . Otherwise in the following example, type
c3, which I think should be valid, would be considered invalid.

     <xsd:compleType name="c1">
               <xsd:restriction base="xsd:string"/>

     <xsd:compleType name="c2">
               <xsd:restriction base="c1">
                    <xsd:maxLength value="10"/>

     <xsd:compleType name="c3">
               <xsd:restriction base="c2">
                    <xsd:maxLength value="5"/>

Received on Friday, 23 March 2001 04:56:56 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:54 UTC