W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2003

Re: Deriving by restriction then extension

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 17 Mar 2003 08:37:26 +0000
To: Graham Mann <gmann@adobe.com>
Cc: xmlschema-dev@w3.org
Message-ID: <f5bisui9ynt.fsf@erasmus.inf.ed.ac.uk>

Graham Mann <gmann@adobe.com> writes:

> I have a global element G based upon complexType B that contains
> (optionally in a sequence) ChildX
> 
> ChildX in turn (again optionally in a sequence) has many grand
> children GranChild1 ... GranChildN
> 
> There is another complexType D, derived by restriction from B that
> removes ChildX. This type is abstract.
> 
> Finally there is another complexType F, (one of several similar
> types) derived by extension from D.  This adds a sequence containing
> locally defined ChildX that has only GranChild1
> 
> Does the XML Schema spec, section 3.4.6: imply this is not permitted.
> It does appear to work for Xerces J, Xerces C and for XMLSpy parsers.

I think you're fine.  That constraint is at best confusing, and
probably should be removed, but as I read it you're OK -- it allows
for three types in total -- a type derived from the ur-type (your B),
an extension thereof, and a restriction of that.  Your F is a
restriction of your B, so call the extension vacuous, as you're
allowed to, and you're OK.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                      Half-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/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Monday, 17 March 2003 03:37:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:36 GMT