ignore unknown attributes from the xsi: namespace

This commit is contained in:
Benjamin Dauvergne 2016-11-11 10:04:54 +01:00
parent f0733e145f
commit 51b5874c38
1 changed files with 5 additions and 2 deletions

View File

@ -1636,8 +1636,11 @@ lasso_node_impl_init_from_xml(LassoNode *node, xmlNode *xmlnode)
g_hash_table_insert(*any_attribute, key, g_strdup((char*)content));
lasso_release_xml_string(content);
} else if (! ok) {
warning("lasso_node_impl_init_from_xml: Unexpected attribute: {%s}%s = %s",
attr->ns ? attr->ns->href : NULL, attr->name, content);
if (! attr->ns || (lasso_strisnotequal((char*)attr->ns->href, LASSO_XSI_HREF) &&
lasso_strisnotequal((char*)attr->ns->href, LASSO_XML_HREF))) {
warning("lasso_node_impl_init_from_xml: Unexpected attribute: {%s}%s = %s",
attr->ns ? attr->ns->href : NULL, attr->name, content);
}
}
lasso_release_xml_string(content);
}