W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2002

Re: DOM 2 Spec vs. Java Binding

From: Ray Whitmer <rayw@netscape.com>
Date: Wed, 07 Aug 2002 08:17:25 -0700
Message-ID: <3D513A05.80605@netscape.com>
To: "WEBBERJIM (HP-UnitedKingdomex1)" <jim_webber@hp.com>
CC: www-dom@w3.org

An interface inherits from all the types the superclasses do, just as I 
inherit not only from my parents, but from my grandparents.  If you use 
the Java "instanceof" operator, you will find that Text is indeed an 
instance of CharacterData.  The IDL interface definitions appear to me 
to be identical to the Java in this respect, unless I missed something 
you are trying to point out.

Ray Whitmer

WEBBER,JIM (HP-UnitedKingdom,ex1) wrote:

>Hello DOMers,
>I have been looking at the DOM level two interfaces from the W3C site, and
>am a little confused by what (in my na´ve view) seems to be a contradiction
>between the DOM spec and the Java bindings. If this is unutterably trivial,
>then please excuse me!
>http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html in section
>1.1. states "Finally, the interfaces Text, Comment, and CDATASection all
>inherit from the CharacterData interface."
>http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/java-binding.html in
>the "org/w3c/dom/CDATASection.java" section, the following appears:
>package org.w3c.dom;
>public interface CDATASection extends Text{
>Which clearly does not extend the CharacterData interface but in fact the
>Text interface (which itself extends the CharacterData interface).
>Are the Java language bindings definitive on the Java platform and was there
>some good reason for tweaking the spec in these bindings which I haven't
>figured out? Should I assume that the spec or the Java bindings are
Received on Wednesday, 7 August 2002 11:17:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:10 UTC