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

Re: Schema Design: Composition vs Subclassing

From: Jeff Rafter <jeffrafter@defined.net>
Date: Wed, 3 Apr 2002 11:40:46 -0600
Message-ID: <003101c1db36$afb116e0$32f5d90c@C1980223A>
To: <xmlschema-dev@w3.org>

> I think it's fair to say that we haven't seen this advantage in the
> real world yet. There simply aren't parsers that make typing
> information available. Possibly XPath/XSLT 2.0 and DOM 3.0 AS will
> help here...
> Hmm... those turned out to be generally pro design-by-subclassing --
> perhaps that's just because I'm a natural devil's advocate ;) I
> suppose if I'm thinking in object-oriented terms, I think of the type
> hierarchy as being like the class hierarchy and groups as being like
> interfaces.

This is a very interesting analogy-- it would be really interesting if
complex type implementations supported something along the lines of
"implements" for groups. Although we still lose ordering info it allows
someone to treat the inclusion of a group in a complexType (or other model
group) in a fixed manner. Just as you mentioned that an application might
take advantage of  type hierarchy (acting on elements E1, E2, E3, E4) an
application could then act on a group inclusion in a similar fashion.


Jeff Rafter
Defined Systems
XML Development and Developer Web Hosting
Received on Wednesday, 3 April 2002 12:42:48 UTC

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