XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] MicroXML

On Tue, Dec 14, 2010 at 10:27 AM, James Clark <jjc@jclark.com> 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

http://dev.w3.org/html5/spec/tokenization.html#parsing-main-inbody

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:

http://software.hixie.ch/utilities/js/live-dom-viewer/

James


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS