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"/>
 </group>
</type>

?  Otherwise no sequence at all!

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

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

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

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

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

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:46 GMT