1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-05-29 17:05:36 +03:00

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
This commit is contained in:
Daniel Veillard 2004-02-25 12:34:55 +00:00
parent f54cd533d8
commit d3669b2fd1
3 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Wed Feb 25 13:33:07 CET 2004 Daniel Veillard <daniel@veillard.com>
* 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 <daniel@veillard.com> Wed Feb 25 12:50:53 CET 2004 Daniel Veillard <daniel@veillard.com>
* debugXML.c relaxng.c valid.c xinclude.c xmllint.c xmlreader.c: * debugXML.c relaxng.c valid.c xinclude.c xmllint.c xmlreader.c:

View File

@ -5507,22 +5507,28 @@ htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options)
{ {
if (options & HTML_PARSE_NOWARNING) { if (options & HTML_PARSE_NOWARNING) {
ctxt->sax->warning = NULL; ctxt->sax->warning = NULL;
ctxt->vctxt.warning = NULL;
options -= XML_PARSE_NOWARNING; options -= XML_PARSE_NOWARNING;
ctxt->options |= XML_PARSE_NOWARNING;
} }
if (options & HTML_PARSE_NOERROR) { if (options & HTML_PARSE_NOERROR) {
ctxt->sax->error = NULL; ctxt->sax->error = NULL;
ctxt->vctxt.error = NULL;
ctxt->sax->fatalError = NULL; ctxt->sax->fatalError = NULL;
options -= XML_PARSE_NOERROR; options -= XML_PARSE_NOERROR;
ctxt->options |= XML_PARSE_NOERROR;
} }
if (options & HTML_PARSE_PEDANTIC) { if (options & HTML_PARSE_PEDANTIC) {
ctxt->pedantic = 1; ctxt->pedantic = 1;
options -= XML_PARSE_PEDANTIC; options -= XML_PARSE_PEDANTIC;
ctxt->options |= XML_PARSE_PEDANTIC;
} else } else
ctxt->pedantic = 0; ctxt->pedantic = 0;
if (options & XML_PARSE_NOBLANKS) { if (options & XML_PARSE_NOBLANKS) {
ctxt->keepBlanks = 0; ctxt->keepBlanks = 0;
ctxt->sax->ignorableWhitespace = xmlSAX2IgnorableWhitespace; ctxt->sax->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
options -= XML_PARSE_NOBLANKS; options -= XML_PARSE_NOBLANKS;
ctxt->options |= XML_PARSE_NOBLANKS;
} else } else
ctxt->keepBlanks = 1; ctxt->keepBlanks = 1;
ctxt->dictNames = 0; ctxt->dictNames = 0;

View File

@ -2477,7 +2477,7 @@ xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
/* /*
* The id is already defined in this DTD. * 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, xmlErrValidNode(ctxt, attr->parent, XML_DTD_ID_REDEFINED,
"ID %s already defined\n", "ID %s already defined\n",
value, NULL, NULL); value, NULL, NULL);