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

RE: Subtyping in XML

  • To: "Paul Prescod" <paul@p...>,<xml-dev@l...>
  • Subject: RE: Subtyping in XML
  • From: "Dare Obasanjo" <dareo@m...>
  • Date: Tue, 3 Sep 2002 18:17:47 -0700
  • Thread-index: AcJTAaDt1eBpTtr0TVmFVolqXxd8TwArWgUQ
  • Thread-topic: Subtyping in XML

subtyping xml
 Your assertion implies a naïve view of OOP. There are many examples in the various class libraries that I have used of classes that could not withstand changes to their subtypes without serious breakage occuring in applications. Why else do you think the java.lang.String or System.String classes in the Java platform and the .NET Framework respectively are final/sealed? 

I can rattle of a number of Java and .NET framework classes where subclassing them and overriding a few key methods would cause significant breakage to apps that process the base type. This is even worse when you throw interfaces into the mix, try passing an Oracle XDK implementation of the org.w3c.dom.Element interface to one expecting a Excelon implementation and see how many apps can withstand the change. 

The main difference is that we've been practicing OOP for years and now know how to utilize classes in a manner that avoids breakage. That's why I said I'll hold my judgement until type aware processing of XML becomes widespread.  

PS: Sorry for the brusque email, I'm late for dinner. :) 

-- 
PITHY WORDS OF WISDOM 
In any contest between power and patience, bet on patience.      

This posting is provided "AS IS" with no warranties, and confers no rights. 

 
-----Original Message-----
From: Paul Prescod [mailto:paul@p...] 
Sent: Monday, September 02, 2002 9:20 PM
To: xml-dev@l...



Let me try to summarize the problem with XML Schema inheritance this
way: The defining characteristic of subtyping in OO languages is that if the subtype is properly designed it *will not break code* written for the supertype, whether the supertype predicted your extensions or not.
This can be achieved with XML Schema inheritance only if the people writing code for the supertype practiced a high level of discipline. In other words, subtyping "just works" for clients in OO languages. It takes (IMO) unacceptable levels of discipline in XML Schema.


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.