W3C home > Mailing lists > Public > www-dom@w3.org > July to September 1998

Re: latest DOM spec 19980720

From: Ted Bashor <bashor@crossroute.com>
Date: Tue, 21 Jul 1998 09:53:45 -0700
Message-ID: <35B4C799.3A3EC047@crossroute.com>
To: "Stephen R. Savitzky" <steve@crc.ricoh.com>
CC: www-dom@w3.org
Stephen R. Savitzky wrote:
> o There is no type-safe way to convert a Node to any of its major
>   subclasses.  The newly-added nodeName, nodeValue, and attributes
>   attributes help a great deal, but it would be good to have conversion
>   methods as well.  We have, e.g., "asElement", which returns the node if it
>   is an Element, null otherwise.  This is _much_ more efficient than
>   casting, which involves run-time type checking in Java.

I would think that this API would be an extension useful in an
implementation that optimized specifically for Java runtime speed. 
However I'm guessing that the average consumer of the DOM is probably
going to be happy enough with their language's default type checking
The only reason I object to having it in the core spec is that from an
OO point of view it is kind of ugly to have base classes A) know about
all or even any of their subclasses B) have to be modified when a new
subclass comes along.

PS. I too am sad that there isn't at least an attempt at a Declaration
node for us to give feedback on.  It seems like a pretty "core" part of
an XML object model.  However, I am glad we have what we have now...

Received on Tuesday, 21 July 1998 12:50:30 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:04 UTC