W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2000

Re: Sequences

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 18 Feb 2000 09:30:45 +0000
To: www-xml-schema-comments@w3.org
Message-ID: <f5bg0uqrh6i.fsf@cogsci.ed.ac.uk>
Matthew Merlo <matthew.j.merlo@lmco.com> writes:

> <type name="item-seq">
>   <element name = "title" type="string"/>
>   <element name="id" type="float"/>
>  </type>

Did you mean

<type name="item-seq">
 <group minOccurs="0" maxOccurs="*" order="seq">
  <element name = "title" type="string"/>
  <element name="id" type="float"/>

?  Otherwise no sequence at all!

Then you could have
<type name="item" source="ns:item-seq" derivedBy="restriction">
 <group minOccurs="1" maxOccurs="1"/>

But I wouldn't recommend that.  Rather just be explicit about

<type name="item">
  <element name = "title" type="string"/>
  <element name="id" type="float"/>

<type name="itemSeq">
 <element name="item" type="item" minOccurs="0" maxOccurs="*"/>

  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, 18 February 2000 04:30:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:52 UTC