W3C home > Mailing lists > Public > public-i18n-bidi@w3.org > July to September 2010

Re: HTML attribute with no value

From: Martin J. Dürst <duerst@it.aoyama.ac.jp>
Date: Mon, 20 Sep 2010 13:41:26 +0900
Message-ID: <4C96E5F6.8000307@it.aoyama.ac.jp>
To: "Aharon (Vladimir) Lanin" <aharon@google.com>
CC: Tab Atkins <tabatkins@google.com>, public-i18n-bidi@w3.org
Hello Aharon,

Mati gave some background from HTML4. In my understanding, the 
convention of being able to use just the attribute name
(i.e. <elem attr1 />) to represent the same attribute value as the 
attribute name (i.e. <elem attr1='attr1' />) goes back to SGML.

On the other side, below is what HTML5 says. It seems to be extremely 
dry, and especially not too helpful for people designing new attributes 
(like us). Therefore, I think the best thing is to contact the HTML WG 
and get some additional information.

Empty attribute syntax

     Just the attribute name. The value is implicitly the empty string.

     In the following example, the disabled attribute is given with the 
empty attribute syntax:

     <input disabled>

     If an attribute using the empty attribute syntax is to be followed 
by another attribute, then there must be a space character separating 
the two.

Regards,   Martin.

On 2010/09/19 23:25, Aharon (Vladimir) Lanin wrote:
> In the f2f, we said:
> ubi syntax is ubi=”ubi”|””|”off”. The “ubi” and empty string values are
> equivalent, and mean that bidi isolation is on for the element.
> I am confused about why we needed two values meaning "on", and if so, why
> neither one of them is named "on".
> The crux of my question is what, exactly, does the HTML spec say about an
> attributes with no value, e.g.<span foo>? Is it always equivalent to<span
> foo=foo>, or to<span foo="">, or something else?
> If<span foo>  is equivalent to<span foo=foo>, I do not see why we need an
> empty string value.
> If, on the other hand,<span foo>  is equivalent to<span foo="">, I
> understand why we need an empty value as well as an equivalent non-empty
> value, but I do not understand why the latter has to be the meaningless
> "ubi". I would prefer ubi=”on”|””|”off”.
> Aharon

#-# Martin J. Dürst, Professor, Aoyama Gakuin University
#-# http://www.sw.it.aoyama.ac.jp   mailto:duerst@it.aoyama.ac.jp
Received on Monday, 20 September 2010 04:42:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 September 2010 04:42:19 GMT