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

Valid characters for the name attribute

From: T.J. Crowder <tj@crowdersoftware.com>
Date: Sun, 11 Apr 2010 10:47:55 +0100
Message-ID: <s2rc95470a1004110247v8f3ec681p10e50744c112a028@mail.gmail.com>
To: public-html-comments <public-html-comments@w3.org>
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 begin with a letter ([A-Za-z]) and may be followed
> by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"),
> colons (":"), and periods (".").


I can't find similar language in the current HTML5 specification. The
attribute index[2] says the value must be "Text*" with the * indicating that
"...the actual rules are more complicated than indicated in the table...".
In that table, "name" itself is not a link but on the row "input" is a link
to the forms page's name definition[3] which describes what the name
attribute means (and says it can't be blank if given), but doesn't provide
any other rules. Is that really the only rule?

To the extent I can ("name" is a very generic and common word), I've also
had a look through section 2.4 (Common Microsyntaxes), section 3 (Semantics,
structure, ...), section 8 (The HTML Syntax), and others.

Is this defined somewhere I missed?

[1] http://www.w3.org/TR/html401/types.html#type-name
[2] http://www.w3.org/TR/html5/index.html#attributes-0
[3] http://www.w3.org/TR/html5/forms.html#attr-fe-name

Thanks in advance,
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com
Received on Sunday, 11 April 2010 09:48:47 GMT

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