W3C home > Mailing lists > Public > public-html@w3.org > March 2007

DOMObject.firstChild inconsistencies

From: Dailey, David P. <david.dailey@sru.edu>
Date: Tue, 20 Mar 2007 22:24:51 -0400
Message-ID: <1835D662B263BC4E864A7CFAB2FEEB3D258B82@msfexch01.srunet.sruad.edu>
To: "Jim Barraud" <jim.barraud@gmail.com>
Cc: <public-html@w3.org>

DOMObject.firstChild inconsistencies* - there are more examples I can point to (given a couple of hours to scour) in which Opera, FF and IE all find different children of nodes. 


The most obvious example is presented by all the little white space nodes between tags in the XML (or not)  parsing of a nicely typeset HTML document. By way of example, compare http://srufaculty.sru.edu/david.dailey/javascript/DOMProbe.html <http://srufaculty.sru.edu/david.dailey/javascript/DOMProbe.html>  in the above three browsers. 


Or, for one simple example, consider the following simple code in which FF and IE return (via alert) "HEAD", but Opera returns "SCRIPT". 









I do not mean to pick on Opera here. I believe I could find examples in which any of the three pairs of above-mentioned browsers agree to the exclusion of the other one.


The total number of children in a given document is usually entirely different. If we wish to be able to parse a document according to what I surmise are W3C standards, then it would be nice if our browsers could agree on how many nodes there are. 


While XML will wish us to view all the little white space nodes as nodes, HTML has a tradition of ignorning them. I don't really care so long as the tally is the same.


David Dailey


Note: thanks to Jim Barraud and Lachlan Hunt for suggesting a nice solution to my dilemma of how to address a bundle of concerns (see related thread "preferences for blocks of unrelated comments"). I'll post with separate subject lines and spread them out over a few days so as to avoid graph-theoretic clumping.
Received on Wednesday, 21 March 2007 02:24:48 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:21:34 UTC