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

 


Help: OASIS Mailing Lists Help | MarkMail Help

wsdm message

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


Subject: Schema extension vs OO


I have an AI to write a blurb about the differences between schema
extension and OO inheritance, so here we go:

XML instance documents and object instances often have widely different
usages, requirements and constraints. In the general case, one can't
introspect an XML instance document to discover its schema, the entire
set of schema documents might not be readily available like a class
library is, XML schemas may have much higher requirements of
extensibility without coordination (they are the foundation for loose
coupling). For these reasons and because of certain aspects of the
schema language (for example the fact that derivation by restriction
requires the repetition of the parent type and other reasons that make
extension by composition more flexible and robust), extension by
composition is often a preferable approach for XML than extension by
subclassing. It is therefore not recommended in the general case to map
OO classes to XML documents by replicating the class hierarchy using
schema subclassing.

Until Andrea corrects me... :-)

William




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