Re: request for new warning re name attributes

Agree.  Whenever copying a name attribute to an id, it probably makes sense 
to validate the id value.  Definitely for XHTML (or any XML), anyway.

At 12:44 AM 5/25/2002 +0200, Bjoern Hoehrmann wrote:
>* Dave Raggett wrote:
> >The following request arises from experience within W3C.
> >When tidying a document where there are links with name
> >attributes which start with digits, Tidy adds an id attribute
> >but doesn't warn about invalid values. ID values can't start
> >with digits.
>
>Yes, but running Tidy on the same document after adding the id, current
>Tidy will warn about the invalid id attribute...
>
>So you suggest adding something like the following?
>
>   if (name is no valid ID)
>     ReportWarning "cannot add id attribute, invalid ID '1foo'"
>   else
>     add_id_to_element
>
>Should we warn about names that cannot be IDs in general?

Received on Saturday, 25 May 2002 11:09:49 UTC