W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2003

<complexContent> extending <simpleContent> (clarification/erratum?)

From: Sandy Gao <sandygao@ca.ibm.com>
Date: Fri, 6 Jun 2003 14:27:05 -0400
To: www-xml-schema-comments@w3.org
Message-ID: <OF517B625A.B8A4FC23-ON85256D3D.0063E16D@torolab.ibm.com>


<complexType name="derived" mixed="false">
 <complexContent mixed="false">
  <extension base="base"/>

where "base" is a complex type whose {content type} is a simple type

Then according to structure 3.4.2, "derived" has the same content type as
base, which is a simple type definition. But it specified <complexContent>
explicitly, and mixed = false. This seems confusing.

And if mixed was true on <complexType> and <complexContent>, then the rule
actually says that "derived" has a content of a sequence of an empty
sequence, following the particle from "base". But "base" doesn't have a
particle. (Rules from 3.4.6 says this is invalid, but those are at the
component level. Here we are talking about the mapping.)

IMO, it shouldn't be allowed for <complexContent> to extend a complex type
with simple content. That is, change bullet 1 of the constraint "Complex
Type Definition Representation OK" [1] to

1 If the <complexContent> alternative is chosen, then all of the following
must be true:
1.1 The type definition ·resolved· to by the ·actual value· of the base
[attribute] must be a complex type definition;
1.2 If the <extension> alternative is also chosen, then the type definition
·resolved· to by the ·actual value· of the base [attribute] must not be a
complex type definition whose {content type} is a simple type definition;


Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
Received on Friday, 6 June 2003 14:27:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:09:00 UTC