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

Re: Multiple inheritance again

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 11 Mar 2000 22:12:39 +0000
To: Qiong Chen <qiong@cs.washington.edu>
Cc: www-xml-schema-comments@w3.org
Message-ID: <f5bitytgnqf.fsf@cogsci.ed.ac.uk>
Qiong Chen <qiong@cs.washington.edu> writes:

> Dear Henry Thompson,
> 
> another problem is raised .  If we have two groups that both have elements with
> the same name in them, will there be any conflict ? Accroding to the W3C's
> document, there should be no conflict if elements in the different group have
> the same name. But pls see:
> 
> <group name="A">
>     <element name="E" type="string" minOccurs="0" />
> </group>
> 
> <group name="B">
>     <element name="E" type="string" minOccurs="0" />
> </group>
> 
> <complexType name="C">
>     <group ref="A"/>
>     <group ref="B"/>
> </complexType>

The result is

<complexType name="C">
 <element name="E" type="string" minOccurs="0" />
 <element name="E" type="string" minOccurs="0" />
</complexType>

which is an ambiguous content model, so ruled out.

model groups are _not_ an inheritance mechanism, simply a means of
structured reuse of element declarations.

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 Saturday, 11 March 2000 17:12:44 GMT

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