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

Re: HTML attribute with no value

From: Aharon (Vladimir) Lanin <aharon@google.com>
Date: Mon, 20 Sep 2010 07:11:47 +0200
Message-ID: <AANLkTimQgB3O4EQ8Z0qbd=omZp9BmbLusruLTH9Sgi7n@mail.gmail.com>
To: Martin J. Dürst <duerst@it.aoyama.ac.jp>
Cc: Tab Atkins <tabatkins@google.com>, public-i18n-bidi@w3.org
Thanks, that's very helpful! It explains why we need the empty string value.
The question then is whether the non-empty true value really needs to be
"ubi" or can be "on", and we should indeed raise it in the HTML5 bug. The
reason we want it at all is XHTML, where valueless attributes are not
allowed. Even there, though, it could be given as ubi="", but obviously
ubi="on" is a lot clearer.

Aharon

On Mon, Sep 20, 2010 at 6:41 AM, "Martin J. Dürst"
<duerst@it.aoyama.ac.jp>wrote:

> 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.
>
> http://dev.w3.org/html5/spec/syntax.html#attributes-0
> >>>>
> 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 05:12:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 September 2010 05:12:38 GMT