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

RE: Subtyping in XML

  • To: "Paul Prescod" <paulp@p...>
  • Subject: RE: Subtyping in XML
  • From: "Dare Obasanjo" <dareo@m...>
  • Date: Thu, 5 Sep 2002 11:17:25 -0700
  • Cc: <xml-dev@l...>
  • Thread-index: AcJUyj9lUasJCmtIRUigrZaMNWWDPgAONb1Q
  • Thread-topic: Subtyping in XML

RE:  Subtyping in XML

> -----Original Message-----
> From: Paul Prescod [mailto:paulp@p...] 
> Sent: Thursday, September 05, 2002 3:51 AM
> To: Dare Obasanjo
> Cc: Paul Prescod; xml-dev@l...
> 
> <xsl:if test="TRUE">
>    <positive-result/>
> </xsl:if>
> <xsl:if test="FALSE">
>    <negative-result/>
> </xsl:if>
> 
> And perhaps my output schema is basically:
> 
> (positive-result|negative-result)

Great example. 
 
> No, that's not the difference at all. The difference is that 
> the specification for object oriented languages very 
> carefully disallow any types of interface changes that could 
> break code at compile time and even to some extent at runtime 
> (consider Java's "throws" clause). Therefore applications can 
>be guaranteed of predictable input. If the first paramater is 
>supposed to have a .getfoo() method, it will. OO programs almost 
>never rely on the absence of methods (in fact this is very difficult
> to test for). 

I assume you mean statically typed Object Oriented languages since I
don't see how your example applies to Smalltalk or Python which are both
as OO as Java (actually Smalltalk is more OO than Java but I digress). 

Also I was thinking about it yesterday and the OO/XML comparison breaks
very early on for me because one is code and the other is data. Most
applications don't have to worry about interacting with code (i.e.
objects) from sources they have no control or foreknowledge off (unless
you are building libraries) while on the other hand most applications
have to handle data they receive from sources they have no control over.
This is why most security bugs are due to bad data and not malicious
code. 

Thus I agree that W3C XML Schema should have leaned towards blocking
type derivations and substitutions as the defualt behavior then having
the user specify them explicitly instead of the current status quo. 

-- 
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. 

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.