Andy, Thanks for the clarification.
Can you make sure to let us know on the list if and when other APIs change? We'll need to be on top of this, as it will break Xalan. Thanks, Dave "Andy Heninger" <[EMAIL PROTECTED]> on 01/27/2000 10:45:47 PM Please respond to [EMAIL PROTECTED] To: <[EMAIL PROTECTED]> cc: <[EMAIL PROTECTED]> (bcc: David N Bertoni/CAM/Lotus) Subject: Re: *::item() and *::getLength() <David_N_Bertoni@lotus.com> asks > > Maybe I missed the email that explained this, but why did the formal > parameter of the various item() functions change from int to unsigned long? > This (silently) broke a bunch of the Xalan code. > > Given that it _was_ changed, why wasn't getLength() changed to return an > unsigned long? It seems inconsistent. > > Dave The parameter to item() was changed because the definition of the function in the W3C DOM specification is this: > interface NodeList { > Node item(in unsigned long index); > readonly attribute unsigned long length; > }; You are completely right about getLength(). It should (and will) be changed too. The use of int originated in the Java code that was the base for the C++ DOM. The problem surfaced in a test that was failing when a negative index was passed to item. We need to review all of the DOM API functions for similar problems. -- Andy