Re: Fwd: HTML5 and XHTML2 combined (a new approach)

Philip Taylor wrote:

> 
> You can write a streaming SAX parser for HTML5 without buffering 
> anything into a tree, as long as you treat some errors as fatal (e.g. 

I thought it was one of the key design principles of HTML5 that all 
parsers treat parsing "errors" alike.  That means that, if a DOM based 
parser can recover from an error, all conforming parsers must do so.

> "<table>foo" is non-streamable because the text "foo" comes before the 
> <table> in the parsed document). If you don't hit a non-streamable 
> error, the output from the SAX parser has to be equivalent to what you'd 
> get by parsing into a DOM and then emitting it as SAX, but there's no 
> need to actually create a DOM.

-- 
David Woolley
Emails are not formal business letters, whatever businesses may want.
RFC1855 says there should be an address here, but, in a world of spam,
that is no longer good advice, as archive address hiding may not work.

Received on Monday, 23 February 2009 07:55:34 UTC