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

Re: Substitution Groups?

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 05 Jan 2001 14:49:41 +0000
To: "Nick K. Aghazarian" <Ace@AceProgrammer.com>
Cc: www-xml-schema-comments@w3.org
Message-ID: <f5b8zoqawai.fsf@cogsci.ed.ac.uk>
"Nick K. Aghazarian" <Ace@AceProgrammer.com> writes:

> I've got element name="A" type="tA"
> I've got element name="B" extended from "A"
> I've got element name="C" extended from "B"
> 
> I need to have an element name="X" that can be of type "A", "B" or "C".
> 
> How can I do this?

Sorry for slow reply.

Presuming by 'element name="B" extended from "A"' you mean 'element
name="B" with type "bT" extended from "A"',  making X be of
type tC will be sufficient if the extensions are all optional.  If
they're not, you're stuck.  In general, XML Schema does not support
disjunction at the level of complex types as a whole.

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, 5 January 2001 09:49:49 GMT

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