W3C home > Mailing lists > Public > www-dom-ts@w3.org > July 2003

Re: Should Node.getChildNodes return Text of Attr?

From: Fred L. Drake, Jr. <fdrake@acm.org>
Date: Wed, 2 Jul 2003 13:37:00 -0400
Message-ID: <16131.6204.606643.628004@grendel.zope.com>
To: Min Lee <minwoo75@hotmail.com>
Cc: www-dom-ts@w3.org

Min Lee writes:
 > For the following XML:
 >   <?xml version='1.0'?><foo f='100'></foo>
 > when getChildNodes() is called on the root element, different 
 > implementations of DOM return NodeList of different length.
 > Xerces2-J and Crimson return a NodeList which contains 1 Text node of value 
 > "100"

I can't imagine why they'd do this; attributes are not children of the
element node, and their children certainly are not.  This strikes me
as a bug in Xerces2-J and Crimson.

 > This could be a problem if one's doing a comparison between two DOM 
 > implementations.  Unfortunately, this case is not covered by the current 
 > DOM-TS, and I couldn't find anything on DOM spec.  What should be the 
 > correct haviour?

A comprehensive test suite is *incredibly* hard to write.  ;-(  I wish
I had more time to participate in the DOM-TS efforts.


Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation
Received on Wednesday, 2 July 2003 13:37:13 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:34:06 UTC