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: 04 Oct 1999 14:01:15 -0700
To: keshlam@us.ibm.com
Cc: jmackay@yahoo.com, www-dom@w3.org
Message-ID: <qcwvt2suw4.fsf@congo.crc.ricoh.com>
keshlam@us.ibm.com writes:

> >Many argued in vain against the use of NodeType to
> >begin with. The argument was that it was redundant,
> >since each node type was represented by a unique
> >interface.
> 
> Not all languages support runtime type ID. nodeType is required by those that
> don't.
> 
> Extending the exceptions doesn't bother me; that shouldn't break
> applications.  Encountering an unexpected/undefined node type seems more
> likely to cause breakage in code that conforms to the DOM spec, and I'm
> still not really comfortable with it. I'm willing to refrain from
> explicitly forbidding the use of negative numbers for user-created nodes;
> I'm not convinced that we should bless this use by mentioning it in the
> spec, since that places a requirement on all application authors to
> recognize and ignore those nodes ... and the semantics of ignoring them
> may be nontrivial.

Something that returns an unknown node type is still a Node, and can be
treated as such without loss of generality by an application.

Every properly-written application still has to check NodeType explicitly
for the cases it can handle, and ignore the rest -- otherwise it will break
the next time the DOM specification is extended.  Or are you suggesting that
the set of node types is now completel and none will ever be added?

And in any case it's unlikely that an application will be using an extended
version of the DOM unless it's prepared to deal with the extensions. 

-- 
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 Monday, 4 October 1999 17:02:45 GMT

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