diff --git a/ChangeLog b/ChangeLog index d602adc6..272f2cf8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Feb 25 13:33:07 CET 2004 Daniel Veillard + + * valid.c HTMLparser.c: avoid ID error message if using + HTML_PARSE_NOERROR should fix #130762 + Wed Feb 25 12:50:53 CET 2004 Daniel Veillard * debugXML.c relaxng.c valid.c xinclude.c xmllint.c xmlreader.c: diff --git a/HTMLparser.c b/HTMLparser.c index db7a485a..c428ead2 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -5507,22 +5507,28 @@ htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options) { if (options & HTML_PARSE_NOWARNING) { ctxt->sax->warning = NULL; + ctxt->vctxt.warning = NULL; options -= XML_PARSE_NOWARNING; + ctxt->options |= XML_PARSE_NOWARNING; } if (options & HTML_PARSE_NOERROR) { ctxt->sax->error = NULL; + ctxt->vctxt.error = NULL; ctxt->sax->fatalError = NULL; options -= XML_PARSE_NOERROR; + ctxt->options |= XML_PARSE_NOERROR; } if (options & HTML_PARSE_PEDANTIC) { ctxt->pedantic = 1; options -= XML_PARSE_PEDANTIC; + ctxt->options |= XML_PARSE_PEDANTIC; } else ctxt->pedantic = 0; if (options & XML_PARSE_NOBLANKS) { ctxt->keepBlanks = 0; ctxt->sax->ignorableWhitespace = xmlSAX2IgnorableWhitespace; options -= XML_PARSE_NOBLANKS; + ctxt->options |= XML_PARSE_NOBLANKS; } else ctxt->keepBlanks = 1; ctxt->dictNames = 0; diff --git a/valid.c b/valid.c index d2774e70..b2eb375d 100644 --- a/valid.c +++ b/valid.c @@ -2477,7 +2477,7 @@ xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value, /* * 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);