W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2005

[Bug 2101] R-113: A question about all content models

From: <bugzilla@wiggum.w3.org>
Date: Fri, 09 Sep 2005 14:41:17 +0000
To: www-xml-schema-comments@w3.org
Cc:
Message-Id: <E1EDk45-00066C-S7@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2101

           Summary: R-113: A question about all content models
           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


"Schema Component Constraint: All Group Limited" states:

   When a model group has {compositor} "all" all of the following must
   be true:
     1 one of the following must be true:
       1.1 It appears as the model group of a model group definition.
       1.2 It appears in a particle with {min occurs}={max occurs}=1,
           and that particle must be part of a pair which constitutes
           the {content type} of a complex type definition.
     2 The {max occurs} of all the particles in the {particles} of the
       group must be 0 or 1.
Consider the following named model group and complex type definitions:

<xsd:group name="allGrp">
  <xsd:all>
    <xsd:element name="a"/>
    <xsd:element name="b"/>
  </xsd:all>
</xsd:group>

<xsd:complexType name="t1">
  <xsd:sequence>
    <xsd:element name="c"/>
    <xsd:group ref="allGrp"/>
  </xsd:sequence>
</xsd:complexType>

<xsd:complexType name="t2">
  <xsd:sequence>
    <xsd:group ref="allGrp"/>
  </xsd:sequence>
</xsd:complexType>
I believe it was intended that "t1" be considered invalid, but it contains a 
model group which I *think* satisfies constraint 1.1 above (although it 
violates constraint 1.2). Is "t1" invalid? If so, are there other constraints 
in Structures which support this? Do we need a clarification for the "All Group 
Limited" constraint? Is the same true for "t2"? 

See:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2002JanMar/0462.html
Received on Friday, 9 September 2005 14:41:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:09 GMT