W3C home > Mailing lists > Public > public-html-comments@w3.org > April 2010

Re: Valid characters for the name attribute

From: T.J. Crowder <tj@crowdersoftware.com>
Date: Mon, 12 Apr 2010 08:29:32 +0100
Message-ID: <n2rc95470a1004120029v18fe9dfatfe05fbc408e807a0@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: public-html-comments <public-html-comments@w3.org>
Hi,

On 12 April 2010 07:57, Simon Pieters <simonp@opera.com> wrote:

>  FWIW, HTML4 does not use the NAME token forn name="".


>  <http://www.w3.org/TR/html4/interact/forms.html#adef-name-INPUT>
> http://www.w3.org/TR/html4/interact/forms.html#adef-name-INPUT


Crikey. Someone once pointed me at this[1] in the context of saying that a
form control name in something we were talking about was invalid, and I have
been reading right past the word "token" in it ever since, although I do
remember wondering why `id` was called out as being "name" when `name` was
called out as "cdata". (At least this explains how the PHP crowd have gotten
away with square brackets for so long...)

Thanks,

[1] http://www.w3.org/TR/html401/types.html#type-name
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com


On 12 April 2010 07:57, Simon Pieters <simonp@opera.com> wrote:

> On Sun, 11 Apr 2010 11:47:55 +0200, T.J. Crowder <tj@crowdersoftware.com>
> wrote:
>
>  Hi all,
>>
>> Does the HTML5 specification loosen the rules for the valid values in the
>> name attribute on form elements? The 4.01 specification said[1]:
>>
>> ID and NAME tokens must ...
>>
>
> FWIW, HTML4 does not use the NAME token forn name="".
>
> http://www.w3.org/TR/html4/interact/forms.html#adef-name-INPUT
>
>
> http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fe-name
>
> AFAICT, HTML4 says anything goes in name="", while HTML5 bans the empty
> string, so HTML5 actually makes the rules slightly stricter.
>
> --
> Simon Pieters
> Opera Software
>
Received on Monday, 12 April 2010 07:30:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 1 June 2011 00:14:02 GMT