W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2008

[Bug 6202] New: All group extending "empty mixed" content

From: <bugzilla@wiggum.w3.org>
Date: Sun, 02 Nov 2008 20:03:45 +0000
To: www-xml-schema-comments@w3.org
Message-ID: <bug-6202-703@http.www.w3.org/Bugs/Public/>


           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 name="E" mixed="false">
  <xs:extension base="B">
    <xs:element name="P"/>
    <xs:element name="Q"/>

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

    <xs:element name="P"/>
    <xs:element name="Q"/>

which is not valid under 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 clause from 

" If the {term} of the ·base particle· has {compositor}  all and the
{term} of the ·effective content· also has {compositor}  all, ..."


" If the {term} of the ·effective content· has {compositor}  all and one
of the following conditions is true: the {term} of the ·base particle· also has {compositor}  all, 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

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