On Sun, 15 Apr 2001, Erik Arvidsson wrote:

> Should the whitespaces really be this many? To me it seems like the empty
> whitespaces before and after the document element should not be there
> because you cannot have any text outside the root element and therefore
> empty text nodes should be ignored.

This is needed internally at least for the editor, so that it can output
documents without changing the whitespace.  It's also needed (although
not for children of the document itself) for 'white-space: pre' to work.
Whether it's correct depends on how one wants to interpret the rules for
whitespace parsing in SGML/XML, which have never been taken very
seriously by web browsers.  (I'm not an expert on them, either.)  See
http://mozilla.org/docs/dom/technote/whitespace/
for a discussion of some related issues at a basic level.

-David

L. David Baron        <URL: http://www.people.fas.harvard.edu/~dbaron/ >
Mozilla Contributor                      <URL: http://www.mozilla.org/ >
Invited Expert, W3C CSS WG          <URL: http://www.w3.org/Style/CSS/ >

Reply via email to