Re: Error recovery

On Sat, Nov 17, 2012 at 3:05 PM, Liam R E Quin <liam@w3.org> wrote:

> On Sat, 2012-11-17 at 13:27 -0700, Uche Ogbuji wrote:
>
> > > (a) <e a="x"/>, or
> > >
> > > (b) <e a="x/">
>
> > I prefer (a) since it's the likeliest interpretation of the author's
> > intention.
>
> <p><a href=/socks/>more interesting articles</a></p>
>
> (a) is not unreasonable; a better implementation would look ahead and
> find the </a>, although in HTML one could perhaps omit the </a> because
> of the </p> and have the "right thing" happen, because of the
> domain-specific knowledge in the parser. (b) is the right answer here of
> course.
>

Nice, contrived example, but note my use of "likeliest."  I stand by my
characterization.



> Since MicroXML is/was aimed at Web usage, I think (b) the better choice,
> *or* build-in to the parser a list of empty HTML elements and use (a)
> for those and (b) for the rest.
>

I think it's fair to agree to disagree (for my part I agree with others who
have repudiated the HTML5 insanity), and the most important thing is that
the behavior is documented.


-- 
Uche Ogbuji                       http://uche.ogbuji.net
Founding Partner, Zepheira        http://zepheira.com
http://wearekin.org
http://www.thenervousbreakdown.com/author/uogbuji/
http://copia.ogbuji.net
http://www.linkedin.com/in/ucheogbuji
http://twitter.com/uogbuji

Received on Saturday, 17 November 2012 22:22:51 UTC