Lists Home |
Date Index |
- From: "Michael Kay" <M.H.Kay@eng.icl.co.uk>
- To: <firstname.lastname@example.org>
- Date: Fri, 17 Apr 1998 11:46:40 +0100
>Some of the basic tenets of OO (encapsulation, polymorphism) are only
>applicable when behavior is modelled, but I would maintain that others
>(inheritance, identity) are equally applicable to data. The two last
>examples would both be of huge benefit to XML and are both currently
I agree absolutely. I have found identity and subtyping to be the two
benefits in using an object database over a relational database.
>Nevertheless, inheritance of some sort is absolutely vital if XML is to
>fulfill its promise. If we can't produce standard DTDs which can be
>extended, *without* modifying the base DTD, then many of the advantages of
>XML go out the window.
I agree that this is central. Let's leave identity out of the discussion, as
does, I think, fall into the XML Linking domain, and concentrate on what I
prefer to call subtyping.
There's a lot of stuff in the SGML culture that one could fall back on:
architectural forms etc, but I for one find it extremely arcane and
to relate to my own domain of object modelling and database design,
which I think is familiar to a much wider community.
I know some people will disagree, but the way I use XML, a DTD is a
schema, an element definition in a DTD is a class, a document is a
database, and an element within a document is an instance of a class.
What is missing is that we can't define one class (element type) as a
subtype of another.
Since we are only concerned with structural subtyping and not with
behaviour, I don't think it would actually be difficult to define this
The main thing that's tricky is that you can get the "is-a" the wrong way
round. If a PREFACE is-a-kind-of CHAPTER, that means you can find
anything (elements, attributes) in a PREFACE that you can find in a chapter,
and more besides. It also means you can reduce a PREFACE to a CHAPTER
by removing these extra bits. I'm not entirely sure what "removing the extra
bits" means: for example should it remove elements that cannot occur
in a CHAPTER, or should it just remove the tags that surround those
elements? This tends to show up the lack of semantics in the object
model underlying XML.
Just some thoughts...
Mike Kay, ICL
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)