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:
8
parser.c
8
parser.c
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user