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

RE: XML Schemas: Best Practices (touches XHTML modularization als o)

From: Arnold, Curt <Curt.Arnold@hyprotech.com>
Date: Tue, 9 Jan 2001 10:55:13 -0700
Message-ID: <B2C1451A181BD411B88A00E018C1C19C08A9A0@THOR>
To: "'xml-dev@lists.xml.org'" <xml-dev@lists.xml.org>
Cc: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>, "'mtbryan@sgml.u-net.com'" <mtbryan@sgml.u-net.com>
I had suggested making substitutionGroups a list of QNames as part of the feedback of the suggestion that became LC-96.  I don't have access to the schema WG's discussions on why an element being a
member of multiple substitution groups was considered undesireable.

If there was some compelling reason that the membership in substitution groups needed to exclusive, then providing open choice groups allows that to remain while providing an extensible content model
for those instances where member elements do not come from a single heirarchy.  If multiple substitution group memberships are allowed and the substitution group examplar has a type urType, then the
two become equivalent and there is no need for open choice groups.

Hard to tell from your description, you might be doing the equivalent of the adapter pattern from the Gang of Four or bring in generic behavior by aggregation instead of inheritance (probably more
likely).  I don't think that your composite elements are substituable any place the more generic components can appear.

If is definitely possible to design a system that uses adapters and aggregation to conform to a strictly single inheritance language.  The convolutions are such that most OOP languages have some sort
of support for one class being substituable for multiple more general bases.  Just try asking a Java developer if he would want to build a complex system using java if he were forbidden to use
"implements".  If is possible, but definitely not desirable.
Received on Tuesday, 9 January 2001 13:02:06 GMT

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