Re: NAME and ID attribute types content model

On Tuesday, December 18, 2001 at 20:50, christian.remillard@umontreal.ca
(Christian Rémillard) wrote:

> If i am not mistaken, the HTML 4.0 and following versions define the ID
> and NAME attributes content type as CDATA with some limitations:

Not quite. The data types ID and NAME are defined in a restricted
fashion, but the attribute "name" is generally defined as being of type
CDATA where as the attribute "id" is always defined as being of type ID.

The exception to this is that the attribute "name" of the element "meta"
is defined as being of type NAME.

The validator does catch this

valid   - <a name="1234">
invalid - <meta name="1234" content="some numbers">

Confusing, no doubt, to have an attribute "name" which is defined as
being of type CDATA when it must share the same name space as another
attribute "id" which is defined as being of type ID. Made more so by
there being a data type NAME defined the same as ID.

-- 
Christian Smith  |  csmith@barebones.com  |  http://web.barebones.com

He who dies with the most friends... Is still dead!

Received on Wednesday, 19 December 2001 06:41:01 UTC