[
Lists Home |
Date Index |
Thread Index
]
> -----Original Message-----
> From: Paul Prescod [mailto:paulp@prescod.net]
> Sent: Thursday, September 05, 2002 3:51 AM
> To: Dare Obasanjo
> Cc: Paul Prescod; xml-dev@lists.xml.org
>
> <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.
|