Re: The phrase: Node created by Document needs clarification

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