Re: Attribute values

On Tue, 2012-08-14 at 12:59 -0400, Murray Maloney wrote:
> On 2012-08-14, at 12:45 PM, Liam R E Quin <liam@w3.org> wrote:

> > HTML also "allows"
> > 
> > <a href=http://www.w3.org/ style="color: red; font-size: 64pt;">W3C</a>
> 
> I don't see what is wrong with either example.  The href attribute
> value contains no spaces. That would have worked in SGML, not in XML,
> yes in HTML, so why not uXML?

The SGML rule was (is) that attribute value delimiters can be dropped if
the value contains only name characters.

Indeed, explaining the rules of SGML minimization is pretty complex :-)

I agree that a simpler rule about no spaces could allow e.g.
  <a href=http://www.example.org/search?kw=no spaces>
to have a URI and also to add spaces="spaces" as an attribute, but it
would not be compatible with XML, SGML or HTML.


> If empty elements make it easier for authors, then so do attribute
> values without quotes.  I'm just saying.

And so does DATATAG and OMITTAG and CDATA sections, and having an expert
system thousands of lines of code long to try and parse the input, but
it diminishes the value of the language for interchange.

The HTML 5 approach is a possibility - e.g. Anne's xml5 parsing
proposal. Downsides -
. µXML documents would not usually be XML documents
. µXML documents would typically be full of errors, if the tools
silently "corrected" them
. autocorrection isn't a good thing in all contexts.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml

Received on Tuesday, 14 August 2012 18:50:09 UTC