W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2000

Re: xmlschema does not support principle of substitutability of subty pe for its supertype

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 30 Nov 2000 12:45:40 +0000
To: Michael Burns <Michael.Burns@sas.com>
Cc: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Message-ID: <f5baeah4oi3.fsf@cogsci.ed.ac.uk>
There are various namespace-related problems with your example files
as they stand at the moment, but correcting for those, the principle
you are addressing is clear and the problem likewise:  type
substitutability is not the same as element substitutability.
(Element) substitution groups provide the functionality you want.

Make all your vertebrates substitutable for Vertebrate (:-) and your
problem will be solved:

<xsd:element name="Bird" type="BirdType" substitutionGroup="Vertebrate"/>
<xsd:element name="BirdOfPrey" type="BirdOfPreyType" substitutionGroup="Bird"/>

You'll probably also want to make at least Vertebrate, if not Bird
etc. as well, abstract='true'.

  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 Thursday, 30 November 2000 07:45:47 UTC

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