[omniORB] W3C's IDL...

Duncan Grisby dgrisby@uk.research.att.com
Mon, 15 Jan 2001 16:09:55 +0000


On Monday 15 January, Daniel von Tabouillot wrote:

>     W3C have generated some so-called OMG IDL for the SMIL and SVG standards
> ( attached as zip file ). First of all, there are name clashes ( readOnly
> and readonly keyword ), and secondly, omniidl has some trouble, as seen
> below. We are only using the C++ binding, so is there any way to make
> omniidl case sensitive ? What can I do about error below ? I'm running
> omniORB 3.0.2 on Win2000, SP1 & MS Visual Studio 6, SP4.

There is a bug in omniidl's C++ back-end which causes the
AttributeError problem you are seeing. You can get the fix from CVS or
the bugfixes patch.

The problems with name clashes should really be solved by the W3C
using valid IDL. You can avoid the clashes with the following patch
which adds _ escapes to the clashing identifiers:


diff -u idl_old/dom.idl idl/dom.idl
--- idl_old/dom.idl     Tue Mar  7 16:45:41 2000
+++ idl/dom.idl Mon Jan 15 14:47:43 2001
@@ -114,7 +114,7 @@
     // Introduced in DOM Level 2:
     void               normalize();
     // Introduced in DOM Level 2:
-    boolean            supports(in DOMString feature, 
+    boolean            _supports(in DOMString feature, 
                                 in DOMString version);
     // Introduced in DOM Level 2:
     readonly attribute DOMString        namespaceURI;
diff -u idl_old/html.idl idl/html.idl
--- idl_old/html.idl    Tue Mar  7 16:45:45 2000
+++ idl/html.idl        Mon Jan 15 14:48:35 2001
@@ -187,7 +187,7 @@
              attribute boolean          disabled;
              attribute long             maxLength;
              attribute DOMString        name;
-             attribute boolean          readOnly;
+             attribute boolean          _readOnly;
              attribute DOMString        size;
              attribute DOMString        src;
              attribute long             tabIndex;
@@ -207,7 +207,7 @@
              attribute long             cols;
              attribute boolean          disabled;
              attribute DOMString        name;
-             attribute boolean          readOnly;
+             attribute boolean          _readOnly;
              attribute long             rows;
              attribute long             tabIndex;
     readonly attribute DOMString        type;
@@ -379,7 +379,7 @@
              attribute DOMString        name;
              attribute DOMString        type;
              attribute DOMString        value;
-             attribute DOMString        valueType;
+             attribute DOMString        _valueType;
   };
 
   interface HTMLAppletElement : HTMLElement {
@@ -391,7 +391,7 @@
              attribute DOMString        height;
              attribute DOMString        hspace;
              attribute DOMString        name;
-             attribute DOMString        object;
+             attribute DOMString        _object;
              attribute DOMString        vspace;
              attribute DOMString        width;
   };


Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --