- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 30 Dec 2002 13:09:52 +0000
- To: "Avin Patel" <vze49rz3@verizon.net>
- Cc: "xmlschema" <xmlschema-dev@w3.org>
"Avin Patel" <vze49rz3@verizon.net> writes:
> Hi All,
> I want to use all group in all group. As I know all group can't have one of
> the following:
> 1)can't contain other group
> 2)can't be contained in other group
> 3)must be at top level of complex type
> 4)can't occur multiple time
>
> But I can always use all group in all group as following definition, is it
> correct:
>
> <xsd:complexType name="Type1">
> <xsd:all>
> <xsd:element name="elem1" type="xsd:integer"/>
> <xsd:element name="elem2" type="Type2"/>
> </xsd:all>
> </complexType>
>
> <xsd:complexType name="Type2">
> <xsd:all>
> <xsd:element name="elem1" type="xsd:integer"/>
> <xsd:element name="elem2" type="xsd:boolean"/>
> </xsd:all>
> </complexType>
Sure, but the result will be to allow
<elem1>3</elem1>
<elem2><elem1>4</elem1>
<elem2>true</elem2>
</elem2>
etc., which may not be what you wanted.
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
W3C Fellow 1999--2002, 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/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Monday, 30 December 2002 08:09:48 UTC