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

Re: Anonymous group?

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 06 Dec 2000 20:12:18 +0000
To: Jasmin Wason <jlw98r@ecs.soton.ac.uk>
Cc: xmlschema-dev@w3.org
Message-ID: <f5b7l5d71i5.fsf@cogsci.ed.ac.uk>
Jasmin Wason <jlw98r@ecs.soton.ac.uk> writes:

> Is it alright to have a group element with no name in a Schema? 
> 
> E.g.
> 
> <complexType name="data">
>  <sequence>
>   <element name="number" type="integer"/>
>    <group minOccurs="0">
>     <sequence>
>       <element name="anotherNumber" type="integer"/>
>     ...
>    </group>

No.  The <group> element is only for defining named model groups or
referencing them.  Just put the min on the sequence:

<complexType name="data">
 <sequence>
  <element name="number" type="integer"/>
  <sequence minOccurs="0">
   <element name="anotherNumber" type="integer"/>
   ...
 </sequence>
</complexType>

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 Wednesday, 6 December 2000 15:12:23 GMT

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