- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 07 Sep 2001 13:09:42 +0100
- To: www-xml-schema-comments@w3.org
Short summary: The elt derived from choice case of particle
restriction checking rules out the derivation of the type of <xs:all>
from xs:explicitGroup in the sForS.
Long statement:
In essence the question is, is
<xs:sequence>
<xs:element ref="xs:annotation" minOccurs="0"/>
<xs:element name="element" minOccurs="0" maxOccurs="unbounded">
. . .
</xs:element>
</xs:sequence>
a valid restriction of
<xs:sequence>
<xs:element ref="xs:annotation" minOccurs="0"/>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="element" type="xs:localElement"/>
<xs:element name="group" type="xs:groupRef"/>
<xs:element ref="xs:choice"/>
<xs:element ref="xs:sequence"/>
<xs:element ref="xs:any"/>
</xs:choice>
</xs:sequence>
The recursion through sequence takes us to
<xs:element name="element" minOccurs="0" maxOccurs="unbounded">
. . .
</xs:element>
vs.
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="element" type="xs:localElement"/>
<xs:element name="group" type="xs:groupRef"/>
<xs:element ref="xs:choice"/>
<xs:element ref="xs:sequence"/>
<xs:element ref="xs:any"/>
</xs:choice>
which is covered by Elt:All/Choice/Sequence, and recurses
with
<xs:choice>
<xs:element name="element" minOccurs="0" maxOccurs="unbounded">
. . .
</xs:element>
</xs:choice>
vs.
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="element" type="xs:localElement"/>
<xs:element name="group" type="xs:groupRef"/>
<xs:element ref="xs:choice"/>
<xs:element ref="xs:sequence"/>
<xs:element ref="xs:any"/>
</xs:choice>
which fails because the max/min is in the wrong place.
I think the right solution would be to handle elt vs. choice
differently, and promote the min/max, but I'll have to think about it.
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
W3C Fellow 1999--2001, part-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
Received on Friday, 7 September 2001 08:09:13 UTC