Re: IDL errors in Level 2

"Martin v. Loewis" wrote:
> 
> I just compiled the Level 2 DOM specification with a recent IDL
> compiler, and noticed a number of problems.

We discovered the errors a few weeks ago after the upgrade of our IDL
validator.
 
> 1. Keywords are used as identifiers, namely:
> 
>    supports readOnly valueType object
> 
>    This did not get caught by earlier compilers for two reasons:
>    a) supports and valuetype were added only in CORBA 2.3
>    b) even though IDL was case insensitive all the time, compilers
>       often did not check whether an identifier was the same as a
>       keyword except for case.
>    If possible, I recommend to rename these things.

Node.supports is now Node.isSupported
CSSValue.valueType is now CSSValue.cssValueType

>    Otherwise, the escape mechanism introduced in CORBA 2.3 should be
>    used: Keywords can be used as if prefixed with "_" (i.e. _supports,
>    _readOnly, etc). The underscore only tells that this is meant as an
>    identifier; in the programming languages, the underscore is removed
>    (unless the name is a keywords in the programming language also).

We didn't change the DOM HTML since the errors come from DOM Level 1.
Unfortunately, we didn't catch the problem with the null values (especially
on DOMString) so this needs more considerations.

> 2. range::Range (of range.idl) is ill-formed 2.3 IDL; a name must not
>    be re-used in its immediate content. The rationale is that some
>    languages (C++, Java) disallow using a name in the immediate scope
>    of a class with the same name;

We renamed the module from "range" to "ranges".

Thank you for the errors report. The OMG caught the errors a long time ago but
didn't report to us (see "XMLDOM: DOM/Value Mapping" OMG Document
orbos/2000-08-10).

Regards,
Philippe

Received on Monday, 18 September 2000 12:39:23 UTC