Re: HTML APIs

keshlam@us.ibm.com scripsit:

> If someone hands a parser a badly-formed HTML file without the <HTML>
> wrapper, does the DOM assume that an HTML element will be synthesized to be
> the single content root (DocumentElement)? Or should an HTML DOM accurately
> record the multiple-root structure of the broken file?

There is no such thing as an HTML document without an HTML element.
HTML, like HEAD and BODY and a few other elements, allows omission of
both the start-tag and the end-tag.  So a (minimal) HTML document:

	<TITLE>Foo</TITLE>Bar

has in fact the structure

	<HTML><HEAD><TITLE>Foo</TITLE></HEAD><BODY>Bar</BODY></HTML>

-- 
John Cowan					cowan@ccil.org
		e'osai ko sarji la lojban.

Received on Wednesday, 30 December 1998 13:06:25 UTC