On Wed, 2003-07-16 at 15:46, Christophe Cornu wrote: > The w3c dom provides a java binding. Does the DOM specification > require to suppport model 1 or model 2 below? > > org.w3c.dom.Node node; > org.w3c.dom.html2.HTMLAnchorElement anchor; > ... > anchor = (HTMLAnchorElement)node.getFirstChild(); /* model 1 */ > or > anchor = CustomClass.queryInterface(node.getFirstChild(), > "HTMLAnchorElement"); /* model 2 */ > > Model 1 is more familiar in a java world. However, Model 2 can be more > natural when the java binding is implemented over a C++ native dom > library. Thanks for any pointer on this. Model 1 is required by the DOM specification, up to DOM Level 3. DOM Level 3 introduces the getFeature method and the "+" mechanism for features (see section 1.3.6 of DOM Level 3 Core). In other words, your CustomClass approach needs to be hidden inside the implementation of getFeature. PhilippeReceived on Wednesday, 16 July 2003 18:02:11 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 3 May 2007 00:17:16 GMT