Re: [VE][122] Error Message Feedback

On Fri, 15 Oct 2004, Bjoern Hoehrmann wrote:

> >Line 3701, column 35: character "'" is not allowed in the value of attribute "name"
> >
> ><h5><a name="_RCA_VICS_&#8216;PLUM &#8217;"></a>RCA VICS
>
> Why are these strange? After reading the relevant specification
> (which, btw?) which result did you expect instead?

If you asked me, I would say that I find it strange that the validator
issues an error message about an attribute that is declared with a CDATA
value. I don't know what DTD is used; but in all published DTDs for
different versions of HTML, the name attribute of an <a> element is
declared CDATA.

Surely a value like the above is very unwise, since the most important use
for the attribute is to put it into a fragment of a URL reference, for
linking, and there is no defined way for handling non-ASCII characters
there. The safe approach is to use only lowercase letters a through z,
digits, and possibly hyphens in anchor names; other characters cause
various practical problems. But this is not a syntactic restriction
imposed in DTDs in HTML specifications.

Maybe someone has constructed a DTD of his own, with the name attribute of
<a> declared as NAME. A good idea, if you know what you are doing.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Saturday, 16 October 2004 08:12:04 UTC