W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2001

Re: Question about all, choice, and sequence

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 26 Feb 2001 17:06:12 +0000
To: "Weber, Heiko" <Heiko.Weber@softwareag.com>
Cc: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Message-ID: <f5bbsrpnzln.fsf@cogsci.ed.ac.uk>
"Weber, Heiko" <Heiko.Weber@softwareag.com> writes:

> I have a question about the "all"-, "choice"-, and "sequence"-sequences.
> What are the constraints on Schema definitions of these model groups?
> A choice which consists only of one element isn't really a choice but
> rather one required element, so is a choice with only one element allowed?
> Where do I find the constraints on model groups in the Schema spec? The
> section 3.7 "Model Group Definitions" didn't make it clear to me.

There are constraints on <all>, motivated by implementation concerns.
There are no constraints on <choice> or <sequence>, because type
derivation may need to do things like produce a single-element choice
in some circumstance.  Even empty groups are allowed.

  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 Monday, 26 February 2001 12:06:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:51 UTC