W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2002

Re: all group

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>
Message-ID: <f5by967ps9r.fsf@erasmus.inf.ed.ac.uk>

"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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:35 GMT