W3C home > Mailing lists > Public > public-microxml@w3.org > November 2012

Re: Error recovery

From: Uche Ogbuji <uche@ogbuji.net>
Date: Sat, 17 Nov 2012 17:49:37 -0700
Message-ID: <CAPJCua3--9DosQXJaskBpdPk=cwetK24yz+zK_MgqXh+XZxxzA@mail.gmail.com>
To: Michael Kay <mike@saxonica.com>
Cc: "public-microxml (public-microxml@w3.org)" <public-microxml@w3.org>
On Sat, Nov 17, 2012 at 5:36 PM, Michael Kay <mike@saxonica.com> wrote:

>
> On 17/11/2012 20:27, Uche Ogbuji wrote:
>
> On Fri, Nov 16, 2012 at 7:53 PM, James Clark <jjc@jclark.com> 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/">
>>
>>  ?
>>
>
>  I prefer (a) since it's the likeliest interpretation of the author's
> intention.
>
>
> That was my first instinct too, but it you changed it to
>
> <p:command xmlns:p=http://saxon.sf.net/>
>
> would that change your view?
>

Yes.  If given the additional information that the expected attribute value
was a URI ref, I would change my impression of likely intent from (a) to
(b).  But absent any other information I do not believe that URI refs are
such a dominant proportion of attribute values in general.  I don't even
believe that's the case in HTML, where I bet you see many more CSS class
names and the like than URLs.  Of course, if you have added schematic
information such as the fact that in HTML an href attribute is almost
always a URI ref, that changes the impression of likely intent again.  But
that would be relevant to an HTML parser, not a MicroXML parser.

And that's the bottom line.  As I read it (and as I think his latest
response confirms), James is not asking about HTML.  He is asking about
MicroXML.  In that general context, I still believe (a) to be the
likelier interpretation
of the author's intent.


-- 
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 Sunday, 18 November 2012 00:50:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 18 November 2012 00:50:06 GMT