[whatwg] Configure Apache to send the right MIME type for XHTML

Alexey Feldgendler alexey at feldgendler.ru
Wed Mar 7 10:19:56 PST 2007


On Wed, 07 Mar 2007 19:14:25 +0100, Elliotte Harold <elharo at metalab.unc.edu> wrote:

> Neither is really my point. The problem with malformed HTML is that it
> has an inconsistent DOM. You get different DOMs in different browsers
> and tools. Making a document well-formed XHTML gives you a consistent,
> reproducible, predictable DOM.

Making a document conformant HTML gives you a consistent, reproducible, predictable DOM. Even more: a non-conformant document, when parsed with a HTML5 parser, also gives a predictable DOM.

> With HTML 5 parsers (which we don't have yet) the DOM of malformed
> documents may yet become predictable, but it won't ever be obvious. And
> it may well not be consistent across browsers unless Microsoft jumps on
> board. By contrast, valid strict XHTML (probably transitional too) has a
> reasonably consistent tree structure in all browsers today.

The DOM of valid HTML documents is predictable and consistent across browsers today.

> Once you achieve well-formedness you can begin looking at the document
> in  a new way. You get access to powerful tools like XPath and XSLT that
> you didn't have before. You can start doing more than merely tossing the
> page at a browser for rendering. And you don't have to wait for an HTML
> 5 parser to do it either. You can do it today with a large tool chain.

You can use XPath and XSLT on a DOM tree obtained by parsing HTML, can't you? If your HTML is valid, you don't even have to wait for an HTML5 parser -- a variety of HTML4 parsers is available today.


-- 
Alexey Feldgendler <alexey at feldgendler.ru>
[ICQ: 115226275] http://feldgendler.livejournal.com



More information about the whatwg mailing list