avoid ID error message if using HTML_PARSE_NOERROR should fix #130762

* valid.c HTMLparser.c: avoid ID error message if using
  HTML_PARSE_NOERROR should fix #130762
Daniel
diff --git a/valid.c b/valid.c
index d2774e7..b2eb375 100644
--- a/valid.c
+++ b/valid.c
@@ -2477,7 +2477,7 @@
 	/*
 	 * The id is already defined in this DTD.
 	 */
-	if (ctxt != NULL) {
+	if ((ctxt != NULL) && (ctxt->error != NULL)) {
 	    xmlErrValidNode(ctxt, attr->parent, XML_DTD_ID_REDEFINED,
 	                    "ID %s already defined\n",
 			    value, NULL, NULL);