Re: Substitution Groups?

"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 UTC