[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Inheritance in XML (was Re: Problems parsing XML)

  • From: "Michael Kay" <M.H.Kay@e...>
  • To: <xml-dev@i...>
  • Date: Fri, 17 Apr 1998 11:46:40 +0100

problems in xml database design
Matthew Gertner:
>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
>lacking.

I agree absolutely. I have found identity and subtyping to be the two
biggest
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
that
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
difficult
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
concept.
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:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.