DOM & CORBA

[I had sent this yesterday to the XML mailing list, but probably this is a
better list for this -- sorry for the repetition!]


> Hi,
> 
> I imagine I'm missing something a bit obvious...  I'm confused by the
> differences between the IDL definitions
> (http://www.w3.org/TR/REC-DOM-Level-1/idl-definitions.html)  and the Java
> Language Binding
> (http://www.w3.org/TR/REC-DOM-Level-1/java-language-binding.html)
> provided along with the DOM spec.  
> 
> It seems to me that running any corba2.2-compliant idl-to-java compiler
> ought to generate the latter from the former (as well as a slew of stubs,
> skeletons and helper files).  This doesn't seem possible, though, as the
> IDL definitions define different attributes/methods than the Java language
> binding.  Example:
> 
> /// from org-w3c-dom/Attr.idl
> interface Attr : Node {
>   readonly attribute  DOMString            name;
>   readonly attribute  boolean              specified;
>            attribute  DOMString            value;
> };
> 
> /// from org.w3c.dom.Attr.java (comments removed)
> package org.w3c.dom;
> 
> public interface Attr extends Node {
>   public String             getName();
>   public boolean            getSpecified();
>   public String             getValue();
>   public void               setValue(String value);
> }
> 
> The idl and java certainly resemble each other, but one couldn't expect an
> IDL compiler to get the one from the other without some help.  By way of
> example, the idltojava compiler for JDK1.2 generates the following:
> 
> /// from org-w3c-dom (comments and attributes from Node.idl removed)
> 
> package org_w3c_dom;
> public interface Attr
>     extends org.omg.CORBA.Object,
> 	    org_w3c_dom.Node {
>     short[] name();
>     boolean specified();
>     short[] value();
>     void value(short[] arg);
> }
> 
> Both of the DOM-specified interfaces -- Attr.java and Attr.idl -- make
> sense; the java file should be based on public methods (the "atomic design
> element" in java), while the IDL version uses attributes for efficiency
> (do I really want to hit the network to find out an attribute's name or
> value? -- not likely!).  However, I'm missing how they're meant to be used
> together...
> 
> Is anybody using DOM objects in a CORBA environment?  How are you dealing
> with this "mis-match"?  What am I missing here?  
> 
> Many thanks for any help!  Regards,
> 
> 	Tito.
> 
> 
> 
> 

Received on Wednesday, 13 January 1999 11:10:21 UTC