GNOME Bugzilla – Bug 715152
Type mismatch in xmlschemastypes.c and xmlschemas.c
Last modified: 2013-11-28 14:57:42 UTC
Created attachment 261422 [details] [review] Fix for Reported Bug. In File : https://git.gnome.org/browse/libxml2/tree/xmlschemastypes.c Function : xmlSchemaCompareValues if (y->type == XML_SCHEMAS_STRING) yws = XML_SCHEMA_WHITESPACE_PRESERVE; else if (x->type == XML_SCHEMAS_NORMSTRING) yws = XML_SCHEMA_WHITESPACE_REPLACE; else yws = XML_SCHEMA_WHITESPACE_COLLAPSE; In above else if condition, it should check y->type, instead of x->type. In File: https://git.gnome.org/browse/libxml2/tree/xmlschemas.c In function : xmlSchemaParseImport if (xmlSchemaPValAttr(pctxt, NULL, node, "schemaLocation", xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), &schemaLocation) != 0) { xmlSchemaPSimpleTypeErr(pctxt, XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, NULL, node, xmlSchemaGetBuiltInType (XML_SCHEMAS_ANYURI), NULL, namespaceName, NULL, NULL, NULL); It should be like: xmlSchemaPSimpleTypeErr(pctxt, XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, NULL, node, xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), NULL, schemaLocation, NULL, NULL, NULL); i.e value should be schemaLocation instead of namespaceName. Please find attached patches for this.
Created attachment 261423 [details] [review] Fix for Reported Bug.
Looks right indeed, thanks for the report, fixed upstream in https://git.gnome.org/browse/libxml2/commit/?id=e79226ccdb377cb61fdee69aaf366bb9c5838de9 and https://git.gnome.org/browse/libxml2/commit/?id=f3d79416d792ee879b952430fc8e3311c050e218 thanks ! Daniel