W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2002

Re: Schema Design: Composition vs Subclassing

From: Noah Mendelsohn/Cambridge/IBM <noah_mendelsohn@us.ibm.com>
Date: Wed, 3 Apr 2002 15:58:57 -0500
To: "Jeff Rafter" <jeffrafter@defined.net>
Cc: xmlschema-dev@w3.org
Message-ID: <OFF6DD741C.35A8F062-ON85256B90.0073A939@lotus.com>
Interesting thread.  One thing to keep in mind:  XML Infosets are 
inherently ordered, and our inheritance model is based on sequences, which 
tend to be ordered.  In my experience with object systems, composition or 
mix-in (as I prefer to call it) tends to be an unordered thought:  I want 
to know that I support interface I1 and I2, but in no sense does one come 
before the other.   Thus, these sorts of multiple inheritance idioms are 
particularly tricky in XML, in which order tends to be naturally 
significant.  Furthermore, as Jeni points out, it's quite nice to have 
answers that are reflected in the PSVI, so that downstream applications.

This is more an intuition than a formal proposal, but if I were trying to 
do this sort of mix-in/multiple-inheritance/composition in schema, I might 
be tempted to look at something like <all> as a starting point.    It 
validates content independent of order.  Not quite sure where I'd go from 
there, but I thought I'd mention it.  Of course, in its current form, it 
does nothing to sync up attributes with element content. 

------------------------------------------------------------------
Noah Mendelsohn                              Voice: 1-617-693-4036
IBM Corporation                                Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------
Received on Wednesday, 3 April 2002 16:09:33 GMT

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