- From: <bugzilla@wiggum.w3.org>
- Date: Sun, 02 Nov 2008 20:03:45 +0000
- To: www-xml-schema-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=6202
Summary: All group extending "empty mixed" content
Product: XML Schema
Version: 1.1 only
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: normal
Priority: P2
Component: Structures: XSD Part 1
AssignedTo: cmsmcq@w3.org
ReportedBy: mike@saxonica.com
QAContact: www-xml-schema-comments@w3.org
As far as I can see, it is valid to do this:
<xs:complexType name="B" mixed="false">
<xs:all/> <!-- or equivalently <xs:sequence/> -->
</xs:complexType>
<xs:complexType name="E" mixed="false">
<xs:complexContent>
<xs:extension base="B">
<xs:all>
<xs:element name="P"/>
<xs:element name="Q"/>
</xs:all>
</xs:extension>
</xs:complexContent>
</xs:complexType>
But it becomes invalid if both the mixed attributes are changed to
mixed="true". In the former case, xs:all extending empty is allowed. But in the
latter case, the variety of B is mixed, with content type being an empty group
with compositor = sequence. The extension will then be constructed with a
content model of
<sequence>
<sequence/>
<all>
<xs:element name="P"/>
<xs:element name="Q"/>
</all>
</sequence>
which is not valid under 3.8.6.2 All Group Limited.
The underlying problem here is that the varieties (empty, mixed, element-only,
simple) are not fully orthogonal. Really there should be two orthogonal boolean
properties: can-contain-elements and can-contain-text. But short of a radical
remodelling, I think it can be fixed by changing 3.4.2.3.3 clause 4.2.3.2 from
"4.2.3.2 If the {term} of the ·base particle· has {compositor} all and the
{term} of the ·effective content· also has {compositor} all, ..."
to
"4.2.3.2 If the {term} of the ·effective content· has {compositor} all and one
of the following conditions is true:
4.3.2.3.1 the {term} of the ·base particle· also has {compositor} all,
4.3.2.3.2 the {term} of the ·base particle· is a model group whose {compositor}
is sequence and whose {particles} is empty, ....
(alternatively, introduce a new case into the 4.3.2.x list)
--
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Sunday, 2 November 2008 20:03:54 UTC