Re: DOM L2 comments, various 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  <>  <>
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: <> URL:

Received on Monday, 4 October 1999 17:02:45 UTC