newline handling changes to pass more W3C DOM Level 1 Core tests
David Faure
dfaure at klaralvdalens-datakonsult.se
Tue Oct 7 19:03:37 CEST 2003
On Tuesday 07 October 2003 17:48, Darin Adler wrote:
> One of the areas causing failures was the change of newline characters
> into spaces. Here's the KHTML part of changing that.
Oh. Didn't they change the tests recently to make them more tolerant wrt this?
See forwarded mail below.
> This change causes the newlines to be left as-is in the DOM.
The whole question is whether we really want to do this.
AFAIK (Dirk will correct me if I'm wrong) the KHTML behavior was
done to map IE, whereas your changes tend to resemble more Mozilla.
Well - I have no opinion on whitespace handling at all, I just wanted to
point out that those changes might not be necessary to conform to the
latest DOM tests.
David.
---------- Forwarded Message ----------
Subject: Re: Bugs in bugzilla
Date: Tuesday 23 September 2003 21:11
From: Philippe Le Hegaret <plh at w3.org>
To: Curt Arnold <carnold at houston.rr.com>
Cc: www-dom-ts at w3.org
On Mon, 2003-09-22 at 22:18, Curt Arnold wrote:
> The third bug, http://www.w3.org/Bugs/Public/show_bug.cgi?id=261,
> involved hc_nodeinsertbefore.xml which was a transliteration of the
> XML-specific test nodeinsertnode.xml. The setup of the test depended on
> the preservation of the whitespace between the p and em elements in the
> following fragment:
>
> <p>
> <em>EMP0002</em>
>
> XML processors and Mozilla's HTML implementation would preserve the
> whitespace node, Konqueror and IE would eliminate the whitespace node.
From an XML point of view, Mozilla's XHTML implementation is correct.
HTML does handle whitespaces differently though. Konqueror and IE might
use their HTML parser to load the XHTML. It might be a media type issue
actually: if the XHTML document is parsed as "application/xhtml+xml"
then the implementation must follow the rules of XML. If the document is
parsed as "text/html", then HTML must followed. If the document is
loaded from the disk, it does not have a media type, so Mozilla,
Konqueror and IE are not wrong.
Philippe
-------------------------------------------------------
--
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
More information about the Khtml-devel
mailing list