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

Re: The phrase: Node created by Document needs clarification

From: Ray Whitmer <rayw@netscape.com>
Date: Thu, 30 Aug 2001 09:47:26 -0700
Message-ID: <3B8E6E1E.8030007@netscape.com>
To: Razvan Costea-Barlutiu <cbrazvan@baltan.bsd.uchicago.edu>
CC: www-dom@w3.org
Razvan Costea-Barlutiu wrote:

> At 10:24 AM 8/30/01 -0500, you wrote:
>> There should be a text node between <bold> and <italic> elements.  It 
>> would
>> seem to a bug in the implementation that you are using, which,
>> unfortunately, you did not specify either the implementation or version.
>> You might look for a different version of the parser or a parser
>> configuration flag like ignoreWhitespace or 
>> ignoreElementContentWhitespace
>> and set that to false in case the behavior was an overaggressive 
>> elimination
>> of whitespace.  It is also possible that the text node but was 
>> wrongfully
>> eliminated when written out to a file.
> Or, the DOM implementation uses node->normalize() function which 
> removes the whitespaces and joins all adjacent text nodes. An expected 
> normalization of the nodes is taken into considereation by I18N 
> Working Group, as is stated on the DOM core website.
> Is the user's job to preserve whitespaces (e.g) for correct output 
> when using DOM implementations?
> I'm new on this mail-list, so forgive me if i'm asking something that 
> already was asked, but i didn't quite finished browsing all the 
> articles in the mail-list...

If normalize behaves as described, I believe it is broken.  While it may 
consolidate adjacent text to a single text node and remove empty text 
nodes, it should not remove white space, according to the specification.

Ray Whitmer
Received on Thursday, 30 August 2001 12:42:01 UTC

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