[whatwg] HTML 5 parsing - not just for browsers?

Ian Hickson ian at hixie.ch
Mon Feb 13 11:33:32 PST 2006


On Mon, 13 Feb 2006, dolphinling wrote:
> 
> So, will the HTML 5 parsing section be of use here? Will it be of use to 
> things other than browsers?

The idea is that the spec will be usable for all HTML parsing needs. It 
should provide the be-all and end-all of HTML parsing. If we can get 
Mozilla/Opera/Safari to implement it, then we'd have browsers implementing 
a single parsing model, which would make all of this much easier.

I intend to write at least two tools in due course that implement the 
parsing part of the spec, and neither is a browser.


> Are there small differences needed because what's being parsed is a 
> document fragment instead of a document?

There will probably be, in due course, a section that explains how to do 
that. Basically it will amount to pushing fake HTML and BODY elements onto 
the stack of open elements, then parsing that, then taking the children of 
the BODY node as the parse tree, or something.


> And when it's re-serialized, how closely will today's browsers interpret 
> the original and the new?

This question is too vague for me to answer it. Can you give examples?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list