W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2002

Re: request for new warning re name attributes

From: Charles Reitzel <creitzel@rcn.com>
Date: Sat, 25 May 2002 11:11:23 -0400
Message-Id: <4.3.2.7.2.20020525110844.02dbaeb8@pop.rcn.com>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: Dave Raggett <dsr@w3.org>, html-tidy@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:52 GMT