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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: Inheritance/defaulting of attributes

[ Lists Home | Date Index | Thread Index ]
  • From: "Rick Jelliffe" <ricko@allette.com.au>
  • To: <xml-dev@ic.ac.uk>
  • Date: Thu, 9 Oct 1997 20:53:05 +1000

> From: Paul Prescod <papresco@technologist.com>

> I know that the concept of subclassing has expression in fields much
> broader than object oriented programming. It is a fundamental
> mathematical concept that goes back to -- I dunno, Aristotle? It is an
> accident of history that we now associate it with OOP.

The orginal targets of SGML DTD design were supposed to be editorial
people, I think, not programmers. 

Editorial people have the idea of text replacement well and truly 
in their minds: it is what they do, and what they think they are
doing when they do it.  

So the PE mechanism, being akin to macros or text replacement,
is very appropriate.  The ideas of inheritance and classing
are not appropriate for editorial people for the same reason.

Now XML is being much more targeted at database kind of systems,
where the DTD designer is clearly more of a programmer.  It may
be that such programmers cannot think in terms of text replacement
or symbolic computing, but in terms of whatever the fashionable
OOP and framework are at the time.  So it may be that they want
a less text-based style of declarations.

A push for OO constructs for element declarations actually creates
a new distinction between declarations and the instance: the
declarations would act by inheritance and magic and the document
acts by text replacement: or is there some meaningful extension of
inheritance to include instance data?  

Has anyone come up with a good solution for what order element
types can be in if you have inheritance?  

<!ELEMENT cat  (head, whiskers, paw+, tail)>
<!ELEMENT kitty  (cry) INHERITS cat>

is all very well, but what is the resulting content model?
It sounds like people expect it to be (using the SGML "&" 
connector, which is not in XML):

<!ELEMENT kitty (( head, whiskers, paw+, tail ) & cry )>
which is not very satisfactory IMHO. 

Rick Jelliffe

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS