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

RE: DOM 2 Spec vs. Java Binding

From: WEBBER,JIM (HP-UnitedKingdom,ex1) <jim_webber@hp.com>
Date: Wed, 7 Aug 2002 16:54:43 +0100
Message-ID: <72FAAE98015DD511B42600D0B747AC7F07AAE844@kipling.br.itc.hp.com>
To: www-dom@w3.org

Guys,

Thanks for the responses they were most instructive. The reason this arose
was because I was playing with some stuff on the .Net platform casting from
System.Xml.XmlCDataSection (the child class according to the Java bindings)
to System.Xml.XmlText (the alledged parent class according to the Java DOM 2
bindings):

// xc is an instance of System.Xml.XmlCDataSection
System.Xml.XmlText xt = (System.Xml.XmlText)xc; // Can't do this cast

But when I try to cast from CDATASection to CharacterData:

System.Xml.XmlCharacterData cd = (System.Xml.XmlCharacterData)xc;

things work just fine which I would have expected from the spec, but not
from the Java bindings.

Therefore perhaps my question should have been: Is the Microsoft
interpretation of the DOM spec compatible with that of the Java camp? If
not, which is authoritative (W3C I assume)? And how is DOM's cross-platform
nature not compromised by this?

Jim
Received on Wednesday, 7 August 2002 11:54:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:56 GMT