W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1999

Re: DOM L2 comments, various

From: Stephen R. Savitzky <steve@rsv.ricoh.com>
Date: 05 Oct 1999 09:07:03 -0700
To: www-dom@w3.org
Message-ID: <qcn1txssew.fsf@congo.crc.ricoh.com>
Arnaud Le Hors <lehors@w3.org> writes:

> Jeff Mackay wrote:
> > 
> > Are implementors allowed to extend the NodeType and Exception lists?
> 
> Implementors can do whatever they want. However, the whole purpose of
> the DOM is to provide users with an interoperable API. Implementing
> and/or using any extension makes this pretty useless.

Interoperable should not mean non-extensible.  If I write an application
using an extended implementation, obviously I can't expect to be able to
port that application to another implementation.  If I avoid extensions,
obviously I _can_ expect my code to be portable.  I don't see the problem. 

Just saying that "implementors can do whatever they want" shouldn't prevent
an extended implementation from, for example, failing conformance tests. 
The DOM as it stands is unsuitable for several classes of applications; if
it can't be extended ``legitimately'' people will simply create incompatible
DOM-like implementations that do what they need. 

> So I don't see what the benefit of allowing extensions would be. Either
> you care about interoperability and all you can do is to stick with the
> standard, or you don't and you can use whatever you want. There is just no
> room for applications or implementations being partially interoperable.

Allowing extensions allows for experimentation.  For example, I may want to
experiment with representing the DTD, before the working group specifically
blesses this with some official node types.  It also leaves the working
group free to _use_ new Node types for this, instead of (for example) the
present kludge used for representing style sheet rules. 

Also, closing the node type list will encourage application-writers to
produce code that, by not checking for the default case, is guaranteed to
break the next time the working group decides to add a new node type.  Or
are you saying that no new node types will be added, ever?

> I added a note stating that all other codes are reserved to W3C for
> possible future use.

Then future implementations will not be interoperable with present
applications.  QED.

> > By closing the NodeType list, the DOM API
> > makes extensions available only to typed languages. (In Java, I can cast my
> > Element object to a SuperElement when I need to, but I can't access the
> > functionality of SuperElement from ECMAScript because I have no way to
> > determine that a node is a SuperElement).
> 
> I don't understand. If you're already up for using non standard
> extensions, why can't you simply use a non standard type attribute for
> that? In ECMAScript it is especially easy to add a property to an
> object.

It doesn't allow you to use a nonstandard node in a place where the standard
ones are currently not permitted (e.g. the DTD). 

-- 
Stephen R. Savitzky  <steve@rsv.ricoh.com>  <http://rsv.ricoh.com/~steve/>
Quote of the month:  Death is nature's way of telling you to slow down.
Chief Software Scientist, Ricoh Silicon Valley, Inc. Calif. Research Center
 voice: 650.496.5710  front desk: 650.496.5700  fax: 650.854.8740 
  home: <steve@theStarport.org> URL: http://theStarport.org/people/steve/
Received on Tuesday, 5 October 1999 12:07:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:46 GMT