Re: [Moderator Action] Elements outside of a sequence tag

"Chris Mosbrucker" <chris@proworks.com> writes:

> Hello,
> 
> I am trying to write an xml schema, and am having some problem figuring out
> how to have elements present outside of <sequence> blocks. Every example I
> can find on w3 seems to contain the <element /> in <sequence> tags like the
> following.
> 
> <sequence>
>  <element name="anyElement" />
>  <element name="someElement" />
> </sequence>
> 
> But that implies that <anyElement> will always appear before <someElement>
> 
> what if anyElement and someElement can appear in any order and number. i.e.
> 
> <someElement />
> <anyElement />
> <anyElement />
> <someElement />

See the XML Schema Primer [1].  You want <choice> instead of
<sequence>

ht

[1] http://www.w3.org/TR/xmlschema-0/
-- 
  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 Tuesday, 5 December 2000 16:01:42 UTC