- From: <zongaro@ca.ibm.com>
- Date: Wed, 16 May 2001 13:31:08 -0400
- To: www-xml-schema-comments@w3.org
Hello, Section 3.8.6 [1] of "XML Schema Part 1: Structures" defines The "Schema Component Constraint: All Group Limited". According to item 1. of that constraint, a model group whose {compositor} is "all" must either (1.1) appear as the model group of a model group definition or (1.2) appear in a particle with {min occurs}={max occurs}=1, with additional requirements placed on that particle. If I'm reading this correctly, it means that an "all" {compositor} can have {min occurs}=0 only if it appears in a model group definition. That's because an "all" schema component corresponds to a particle whose {term} is a model group with {compositor} all - so 1.2 would appear to apply to that particle, and {min occurs} must equal 1. So, the following fragment would be valid according to the "All Group Limited" constraint. <xs:group name="gp"> <xs:all minOccurs="0"> <xs:element ref="a"/> <xs:element ref="b"/> </xs:all> </xs:group> <xs:complexType> <xs:group ref="gp"/> </xs:complexType> But the following fragment would not be valid. <xs:complexType> <xs:all minOccurs="0"> <xs:element ref="a"/> <xs:element ref="b"/> </xs:all> </xs:complexType> Is my interpretation of that constraint correct? Or was the phrase "in a particle" intended only to refer to particles that contain the particle corresponding to the "all" schema component, which would mean that my second fragement would be valid, but the following would not be. <xs:group name="gp"> <xs:all> <xs:element ref="a"/> <xs:element ref="b"/> </xs:all> </xs:group> <xs:complexType> <xs:group ref="gp" minOccurs="0"/> </xs:complexType> Thanks, Henry [1] http://www.w3.org/TR/xmlschema-1/#coss-modelGroup ------------------------------------------------------------------------ Henry Zongaro XML Parsers development IBM SWS Toronto Lab Tie Line 778-6044; Phone (416) 448-6044 mailto:zongaro@ca.ibm.com
Received on Wednesday, 16 May 2001 13:30:06 UTC