Compound Documents - necessary for success?
Roger L. Costello
costello at mail11.mitre.org
Wed Jan 27 18:00:47 GMT 1999
Could we discuss the pros and cons of compound documents? First let me
define what I mean by "compound document":
compound-document ::= (compound-document | valid-document)
valid-document ::= <a document that conforms to a schema>
In words, a compound document is a "document of documents", where each
document conforms to a schema; i.e, a nested document conforms to a schema
as well as does its parent document. I will use the term composition and
compound document interchangeably.
I would like to make two assertions:
(1) Compound documents are necessary for the success of XML.
(2) Focusing on inheritance is of lesser importance than focusing on
composition.
I base these assertions upon an analogy to objects in programming
languages. Suppose that we consider a document to be analogous to a
programming object. Clearly, programming objects can be composed of
objects; i.e., objects within objects. Object composition enables
separation of concerns, extensibility, all the "ilities". Each
(well-written) object is independent, with a well defined interface, and
verifiable (with a compiler). Programming languages that did not support
object composition would be intolerable. Analogously, documents should be
composable, where each document is independently verifiable.
Also the object community has come to the consensus that composition (black
box reuse) enables more robust development than does inheritance (white box
reuse). Analogously, I would assert that the focus in XML should be on
enabling compound documents rather than on enabling inheritance.
Thoughts/discussion? /Roger
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list