- From: <zongaro@ca.ibm.com>
- Date: Thu, 2 Aug 2001 17:21:50 -0400
- To: www-xml-schema-comments@w3.org
- Message-ID: <OF139F17B2.4FE86DF9-ON85256A9C.0069E5E3@torolab.ibm.com>
Hello, The following schema document came from Kohsuke Kawaguchi. My reading of 3.4.2 of the Schema recommendation [1], is that the type rrr is a restriction of the ur-type, and according to "Complex Type Definition with complex content" in the table in 3.4.2, the {content type} of rrr is empty. That should mean that the restriction of rrr is not a valid restriction. <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'> <xs:element name="dummy"/> <xs:complexType name="rrr" /> <xs:complexType name="sss"> <xs:complexContent> <xs:restriction base="rrr"> <xs:sequence> <xs:element name="dummy"/> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:schema> I believe that it was intended that this document violate the "Schema Component Constraint: Derivation Valid (Restriction, Complex)" defined in 3.4.6 of the Schema recommendation [2]. It appears that, of cases 5.1 to 5.3 in that constraint, case 5.3 applies. I've copied it below. However, that case requires that the particle of the complex type definition be a valid restriction of the particle of the {content type} of the {base type definition}; but in this schema, the {base type definition} has no particle, so it doesn't appear truly to violate case 5.3. 5.3 If the {content type} of the {base type definition} is mixed or the {content type} of the complex type definition itself is element-only, then the particle of the complex type definition itself must be a ·valid restriction· of the particle of the {content type} of the {base type definition} as defined in Particle Valid (Restriction) (§3.9.6). Is there something else that makes it clear that the restriction is not a valid restriction? Or does the use of the definite article in the phrase "the particle of the {content type} of the {base type definition}" imply that the {content type} must have a particle, and so must not be empty? Thanks, Henry [1] http://www.w3.org/TR/xmlschema-1/#declare-type [2] http://www.w3.org/TR/xmlschema-1/#derivation-ok-restriction ------------------------------------------------------------------------ Henry Zongaro XML Parsers development IBM SWS Toronto Lab Tie Line 778-6044; Phone (416) 448-6044 mailto:zongaro@ca.ibm.com
Received on Thursday, 2 August 2001 17:21:54 UTC