Index: valid.c
===================================================================
--- valid.c	(revision 3625)
+++ valid.c	(working copy)
@@ -2724,7 +2724,7 @@
     } else if (doc->type == XML_HTML_DOCUMENT_NODE) {
         if ((xmlStrEqual(BAD_CAST "id", attr->name)) ||
 	    ((xmlStrEqual(BAD_CAST "name", attr->name)) &&
-	    ((elem == NULL) || (!xmlStrEqual(elem->name, BAD_CAST "input")))))
+	    ((elem == NULL) || (xmlStrEqual(elem->name, BAD_CAST "a")))))
 	    return(1);
 	return(0);    
     } else if (elem == NULL) {
