OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Multiple Inheritance in XML Schema

On Wed, 24 Dec 2008 08:18:00 -0000, Ramkumar Menon  
<ramkumar.menon@gmail.com> wrote:

> Why isn't there a straightforward mechanism for multiple inheritance
> in XML Schemas?
> What are the rationales for that design decision? Is it because it
> adds unnecessary complexity?
> I am sure there are strong reasons for this - am interested in knowing  
> them.
> Ram

I think the more fundamental question is "Why isn't there a  
straightforward mechanism for multiple inheritance".  The C++ experiment  
with this was so disappointing that Java and C# dumped direct multiple  
inheritance.  I've never been a member of the W3C XML Schema Working  
Group, but I suspect they were influenced by this.

Additionally, with XML you have content order to worry about, and that  
complicates things.  You could append the content from one parent type to  
that of the other, but that would give you something very different to  
what multiple inheritance produces in C++.  Some people would say that it  
isn't multiple inheritance, and that is true - it's more composition that  
inheritance (and you can effectively implement it now using model groups).

I'm not sure there is a single reason why XML Schema doesn't support  
multiple inheritance, but I can see multiple reasons that would have  
weighted against the idea.

Cheers, Tony.
Anthony B. Coates
Director and CTO
Londata Ltd
UK: +44 (20) 8816 7700, US: +1 (239) 344 7700
Mobile/Cell: +44 (79) 0543 9026
Data standards participant: genericode, ISO 20022 (ISO 15022 XML),  

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS