Replce xmlSchemaValidateStream with xmlSchemaValidateDoc
I'm the maintainer of libxml2 and noticed that you're using xmlSchemaValidateStream
. This is an ill-designed API function which will soon be deprecated. I think xsd_data_validate_doc
could be rewritten like this:
gboolean
xsd_data_validate_doc (XSDData *xsd_data,
xmlDoc *doc)
{
gboolean result = FALSE;
if (xsd_data == NULL)
return TRUE;
if (!xmlSchemaValidateDoc (xsd_data->valid_context, doc))
result = TRUE;
return result;
}