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

Re: Error recovery

From: James Clark <jjc@jclark.com>
Date: Sun, 18 Nov 2012 05:49:04 +0700
Message-ID: <CANz3_Ea4uSaG1PSgzwX1XzNxauNBb4Wkr1YUxEKcQOsQgRWsFg@mail.gmail.com>
To: liam@w3.org
Cc: Uche Ogbuji <uche@ogbuji.net>, "public-microxml (public-microxml@w3.org)" <public-microxml@w3.org>
On Sun, Nov 18, 2012 at 5:05 AM, 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>

I see this example as the best argument for (b). Other minor considerations
in favour for (b)

- if the parser defaults to (b), the user can easily get the (a)
interpretation by inserting a space <e a=x />; but if the parser defaults
to (a), the user has to use quotes to get (b)

- it's slightly simpler: assuming you are allowing / in unquoted attribute
values, it's simplest to say that unquoted attribute values are terminated
by whitespace or >.

Since MicroXML is/was aimed at Web usage, I think (b) the better choice,

I agree that representing HTML-based markup languages is an important use
case for MicroXML. However, it seems a bit of a leap to argue for a
particular interpretation for all MicroXML documents based on one HTML
example. There are HTML examples that go the other way, such as:

<img src=socks.jpeg/>

*or* build-in to the parser a list of empty HTML elements and use (a)
> for those and (b) for the rest.

I don't like this at all. I think it's important for MicroXML to handle
empty element syntax in an XML-like way rather than an HTML-like way. That
means that <x></x> and <x/> should always equivalent for all x; empty
element syntax can be used for all element types not just for element types
that are always empty. If <img src=socks.jpg/> means <img
src="socks.jpg"/>, then <script src=socks.js/> should mean <script

Overall, (a) seems the best choice to me.

Received on Saturday, 17 November 2012 22:49:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:12:12 UTC