W3C home > Mailing lists > Public > www-html-editor@w3.org > April to June 1999

Re: Liaison statement on fragment identifiers from Linking WG

From: Lauren Wood <lauren@sqwest.bc.ca>
Date: Tue, 18 May 1999 09:56:30 -0700
Message-ID: <37419BBE.B23A8101@sqwest.bc.ca>
To: w3c-xml-cg@w3.org
CC: w3c-html-wg@w3.org, www-html-editor@w3.org, w3c-xml-linking-wg@w3.org
[BTW: please copy only the lists on this; I only need one copy of
any replies.]

"Shane P. McCarron" wrote:

> HTML 4.0 requires that the NAME and ID attributes share a namespace. It
> further defines the ID attribute as type ID. While the DTD does not
> explicitly define the type ID, I infer it to mean the SGML/XML
> definition of that type. This is backed up by the fact that the HEADERS
> attribute of the TD element and the FOR attribute of the LABEL element
> are both of type IDREF.

No inferring is necessary; type ID means type ID.

> Therefore, the allowable set of identifiers in HTML 4.0 for the ID
> attribute should, necessarily, be the same as the allowable set of
> identifiers for the NAME attribute in HTML 4.0. Even though NAME is
> declared as CDATA, its set needs to be constrained by the set for ID or
> fragment references from LABEL and TD would not work as expected.

Not quite. In HTML 4.0, the SGML declaration means that the IDs are
case-insensitive, whereas the NAME attributes are case-sensitive,
and can contain different characters. XHTML is also case-sensitive,
therefore the ID character space is larger in XHTML than  HTML in
terms of defining unique labels for items. And allowing NAME to have
a larger character space than ID was certainly desirable in HTML 4.0
from some people's perspective, to allow, e.g., a digit as the first

Bill's example is valid HTML 4.0. The "NAME and ID share the same
namespace" bit was put in the HTML 4.0 spec to make it clear that
using the NAME or ID should be effectively interchangeable. At one
stage it was discussed that the first "foo" found in the document
should be linked to, regardless of whether it was NAME or ID, for
example, even if more than one "foo" was defined, regardless of
whether defined as NAME or ID. It certainly does not mean in HTML
4.0 that NAME and ID on a single element must have the same value.

Received on Tuesday, 18 May 1999 12:56:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:08:21 UTC