1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

warn if version is not 1.0 but it's not strictly speaking an error after

* parser.c: warn if version is not 1.0 but it's not
  strictly speaking an error after analyzing the spec
Daniel
This commit is contained in:
Daniel Veillard
2001-09-05 15:51:05 +00:00
parent 04685003cd
commit a050d23085
2 changed files with 13 additions and 0 deletions

View File

@ -7263,6 +7263,14 @@ xmlParseXMLDecl(xmlParserCtxtPtr ctxt) {
version = xmlParseVersionInfo(ctxt);
if (version == NULL)
version = xmlCharStrdup(XML_DEFAULT_VERSION);
else if (!xmlStrEqual(version, (const xmlChar *) XML_DEFAULT_VERSION)) {
/*
* TODO: Blueberry should be detected here
*/
if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
ctxt->sax->warning(ctxt->userData, "Unsupported version '%s'\n",
version);
}
ctxt->version = xmlStrdup(version);
xmlFree(version);