RE: Error recovery

> There is an argument that doing what html5 does causes the least amount of confusion overall, but on the 
> other hand if you do what html5 does in all cases you are not speccing an xml error recovery, just 
> implementing an html5 parser.

I would not use HTML5 as a data point in this case because I suspect the driving decision for why HTML5 does what it does is the lack of the need of <elem/> in the first place.
So it is reasonable to assume a user typing  <e a=x/> meant <e a="x/"> 

Whereas with MicroXML that reason doesn't hold much weight.



-----------------------------------------------------------------------------
David Lee
Lead Engineer
MarkLogic Corporation
dlee@marklogic.com
Phone: +1 812-482-5223
Cell:  +1 812-630-7622
www.marklogic.com


-----Original Message-----
From: David Carlisle [mailto:davidc@nag.co.uk] 
Sent: Saturday, November 17, 2012 5:12 AM
To: public-microxml@w3.org
Subject: Re: Error recovery

On 17/11/2012 02:53, James Clark wrote:
> I have been writing a parser that does error recovery.
>
> I have a case where I can't make up my mind which behaviour I prefer 
> and I would like to get this group's input.
>
> Do you prefer
>
> <e a=x/>
>
> to be treated as
>
> (a) <e a="x"/>, or
>
> (b) <e a="x/">
>
> ?
>
> James
>




I don't think it matters too much so long as it's a documented behaviour.

My personal inclination would be (a) but html5 (as often the case:-) makes the opposite choice and does (b).

There is an argument that doing what html5 does causes the least amount of confusion overall, but on the other hand if you do what html5 does in all cases you are not speccing an xml error recovery, just implementing an html5 parser.


David

Received on Saturday, 17 November 2012 13:11:02 UTC