W3C home > Mailing lists > Public > www-html@w3.org > July 2001

On id and name attributes

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Mon, 16 Jul 2001 04:04:42 +0200
To: www-html@w3.org
Message-ID: <pbi4ltglcefvhg364dt6e9cpaj4mmhhap3@4ax.com>
Hi,

   HTML 4.01 section 12.2.3 states: "The id and name attributes share
the same name space". Is this true for _all_ name attributes?

The same section states further:

  "It is permissible to use both [id and name] attributes to specify an
   element's unique identifier for the following elements: A, APPLET,
   FORM, FRAME, IFRAME, IMG, and MAP".

Why does this not apply to BUTTON, TEXTAREA, SELECT, INPUT, OBJECT and
PARAM? Are the values of their name attribure in the same namespace,
though?

Section 7.5.2 reads:

[...]
  id = name [CS] 

    This attribute assigns a name to an element. This name must be
    unique in a document. 
[...]

Why 'id = name'? It is defined as ID in the DTD while the token name is
identified by CDATA in the DTD, they are only constrained to the same
values by section 6.2, but I see no reason why the difference isn't
expressed by section 7.5.2.

regards,
-- 
Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de
am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/
Received on Sunday, 15 July 2001 22:05:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:49 GMT