> >The DOM spec states that negative values for the count value should throw
> an INDEX_SIZE_ERR
> >exception.  In Xerces-C, the arguments are defined as unsigned int which
> results in
> >the negative values in the tests being interpreted as very large values.
>
> If the binding defines the arguments as unsigned int, then by definition
> they aren't negative, and trying to pass in a signed value should be
caught
> by your compiler as a type mismatch. So as far as I can tell, Xerces isn't
> out of line here; the fact that an exception may be needed in some
> bindings/implementation does not mean it will actually arise in all
> bindings.

I agree that Xerces-C is doing the best it can given the IDL signature for
those methods and the tests should not applicable for bindings where the
arguments are unsigned.  As a practical matter, I haven't been able to get
MSVC to give me warnings when casting from signed to unsigned without
generating tons of messages from the STL.  It does seem like an area that
could catch the wary off guard.  Having additional methods that took signed
ints and threw exceptions when appropriate before deferring to the unsigned
methods would really be helpful if you porting real code from Java that
depended on this behavior.





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to