DOM & CORBA
Ingargiola, Tito
ti64877 at imcnam.sbi.com
Tue Jan 12 17:40:38 GMT 1999
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.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list