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

Inheritance (was: Access Languages are Tied to Schemas)

  • From: Paul Prescod <papresco@t...>
  • To: xml-dev@i...
  • Date: Fri, 21 Nov 1997 13:09:22 -0500

explicit inheritance
Rick Jelliffe wrote:
> The best idea I have some up with is the following: to allow a new keyword
>         #OTHER  (or #ANY)
> to be allowed in content models, to represent any one unambiguous element type.
> This allows the creator of the original content model the ability to
> declare points in content models which are publically available for extension
> by derived element types (declared or undeclared).
> 
> I currently think that any inheritance-based declaration system must presuppose
> such explicit inheritance points.  I think it is merely a matter of strong typing
> and interface control.

Strong typing and interface control are issues of subclassing, not
inheritance. Inheritance is just a code reuse mechanism. Unlike
subclassing, it does not allow more expressive DTDs to be created (which
is, presuamably, what you are talking about). I think that we must keep
these ideas separate in our mind if we are to make progress on either
front. Their conflation is, (IMO) just a historical mistake driven by
early compiler limitations and performance considerations that do not
apply to SGML. Both concepts are useful in SGML, but they should be
separate, just as they are in most modern OO programming languages (C++,
Java, CLOS, Python, etc.), even those which conflate them in the syntax.

I described the difference in: 
http://www.lists.ic.ac.uk/hypermail/xml-dev/9710/0077.html

Anyhow, you can emulate OTHER using subclassing without a first class
OTHER construct.

<!ELEMENT CITATION (name, author, date, OTHER-CIT* )>
<!ELEMCLASS OTHER-CIT> <!-- no constraints on subclasses -->

<!ELEMENT URL (#PCDATA) SUBCLASSES OTHER-CIT>

Now URLs can go in CITATONS after the date.

 Paul Prescod

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.