Re: [xml-dev] MicroXML
On Tue, Dec 14, 2010 at 10:27 AM, James Clark <[email protected]> wrote:
We have two distinct cases:(a) Allowing something like <br></br>(b) Allowing something like <a/>For (a), wouldn't existing parsers simply ignore the end-tag?
It turns out that they do not. HTML5 says that the error recovery for
<br></br>
is to treat it as
<br><br>
(I find this bizarre in the extreme.) The spec is hard to read but you can see it in
An end tag whose tag name is "br"
Parse error. Act as if a start tag token with the tag name "br" had been seen. Ignore the end tag token.
There is a handy tool for seeing how the HTML5 spec recovers from errors:
James