From 51b5874c38cd703842d4b2faf644a68e1eab3133 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 11 Nov 2016 10:04:54 +0100 Subject: [PATCH] ignore unknown attributes from the xsi: namespace --- lasso/xml/xml.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index 6475d6eb..e99bb1fd 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -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); }