[imps] Tree construction question

Jonas Sicking jonas at sicking.cc
Fri Feb 5 14:37:31 PST 2010

On Fri, Feb 5, 2010 at 2:22 PM, Anne van Kesteren <annevk at opera.com> wrote:
> On Fri, 05 Feb 2010 23:03:02 +0100, Rob Jellinghaus <rjelling at microsoft.com>
> wrote:
>> Is this known?  Already planned to be fixed?  Or is this a known bug that
>> will ship?
>> My apologies if this example has already been discussed; pointers on
>> finding that earlier discussion will help me learn to fish.
> The idea of the parsing algorithm is not that any input yields a valid
> output. It just gives back a tree. Whether that tree is conforming is
> orthogonal. A simple example of this would be unknown elements not being
> removed (or transformed).

Also note that Firefox does not yet by default attempt to implement
the HTML5 parsing algorithm. We still use the parser we've used since
Firefox 1.0. Back in the days this parser indeed tried to always
output a valid HTML DOM. This idea was eventually abandoned because it
turned out not to be practical and just caused more confusion and
trouble than it helped anyone. So even this parser can these days
output invalid DOM trees.

However with Firefox 3.6 there is a not-yet-finished alternative
parser that implements the HTML5 algorithm. If you go to
"about:config" and flip the "html5.enable" pref to true you should see
a result very much like what the HTML5 spec states. We expect to ship
this as the default parser for the next release of firefox if all goes

/ Jonas

More information about the Implementors mailing list