Re: DOM L2 comments, various

Arnaud Le Hors <lehors@w3.org> writes:

> "Stephen R. Savitzky" wrote:
> > 
> > interfaces, as Java does.  In a compiled language which does not support
> > interfaces, for example C++, printOutElementsWithNS will fail to compile, or
> > may compile against header files but fail to link against the DOM
> > implementation actually in use.
> 
> Obviously. But what can we do about this?

Very little, but the comment I was replying to suggested that you might have
missed the point.  

> > My solution is to use node types and exception codes less than zero; this is
> > a direction in which the DOM is unlikely to go, and it seems better to
> > reserve negative codes for implemention-specific uses than to completely
> > prevent extensions.  The only possible effect of the latter would be to
> > force those of us who find the present specification too limited to
> > abandon the DOM altogether.
> 
> Given that node types and exception codes are defined in IDL as unsigned
> short, you can be sure we'll never use any negative value. What you do
> with what's outside the spec is completely up to you. I don't see the
> need for the spec to state that.

Blast it--I missed that.  I've been working with the Java bindings almost
exclusively, and rarely look at the IDL.  Java doesn't have unsigned
integers, of course, so it worked for me. 

It's a problem -- there _has_ to be some extension mechanism defined in the
spec.  The simplest thing would be to set aside for the implementation all
values with the high-order bit set; these would map into the negative values
in languages that don't have unsigned integers.

-- 
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 13:03:49 UTC