This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2210 - R-218: Clarification required for complexContent extending simpleContent
Summary: R-218: Clarification required for complexContent extending simpleContent
Status: NEW
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.0 only
Hardware: All Windows 3.1
: P2 normal
Target Milestone: ---
Assignee: David Ezell
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: decided
Depends on: 4275
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-14 19:13 UTC by Sandy Gao
Modified: 2012-12-04 00:54 UTC (History)
0 users

See Also:


Attachments

Description Sandy Gao 2005-09-14 19:13:49 UTC
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
Comment 1 Sandy Gao 2005-09-14 19:13:59 UTC
HT proposed a resolution to R-218 which was discussed at the 2003-10-10 
telecon. Proposed errata text approved (but the WG allows him to edit the text 
to express it more formally).
Comment 2 Sandy Gao 2005-10-06 17:59:13 UTC
Link to the original message should be:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2003AprJun/0048.html
Comment 3 Sandy Gao 2007-01-24 14:58:15 UTC
Link to the approved proposal:
http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2003Sep/0070.html