<[email protected]> 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