[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] DOM & CORBA
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@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|