- From: <bugzilla@wiggum.w3.org>
- Date: Wed, 14 Sep 2005 19:13:49 +0000
- To: www-xml-schema-comments@w3.org
- Cc:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2210
Summary: R-218: Clarification required for complexContent
extending simpleContent
Product: XML Schema
Version: 1.0
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: XSD Part 1: Structures
AssignedTo: ht@w3.org
ReportedBy: sandygao@ca.ibm.com
QAContact: www-xml-schema-comments@w3.org
Consider
<complexType name="derived" mixed="false">
<complexContent mixed="false">
<extension base="base"/>
</complexContent>
</complexType>
where "base" is a complex type whose {content type} is a simple type
definition.
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, <complexContent> shouldn't be allowed 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;
[1] http://www.w3.org/XML/Group/2002/09/xmlschema-1/structures-with-
errata.html#src-ct
See:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2003JanMar/0048.html
Received on Wednesday, 14 September 2005 19:13:51 UTC