1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-27 03:21:26 +03:00

trying to fix a problem in namespaced attribute handling raised by

* tree.c: trying to fix a problem in namespaced attribute handling
  raised by Christian Glahn
Daniel
This commit is contained in:
Daniel Veillard 2002-08-01 12:52:24 +00:00
parent 6f46f6c5b8
commit a57c26ec0c

8
tree.c
View File

@ -4915,8 +4915,6 @@ xmlHasNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace) {
* One need to have
* - same attribute names
* - and the attribute carrying that namespace
* or
* no namespace on the attribute and the element carrying it
*/
if ((xmlStrEqual(prop->name, name)) &&
((prop->ns != NULL) && (xmlStrEqual(prop->ns->href, nameSpace)))) {
@ -5210,13 +5208,9 @@ xmlSetNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name,
* One need to have
* - same attribute names
* - and the attribute carrying that namespace
* or
* no namespace on the attribute and the element carrying it
*/
if ((xmlStrEqual(prop->name, name)) &&
(((prop->ns == NULL) && (node->ns != NULL) &&
(xmlStrEqual(node->ns->href, ns->href))) ||
((prop->ns != NULL) && (xmlStrEqual(prop->ns->href, ns->href))))) {
(prop->ns != NULL) && (xmlStrEqual(prop->ns->href, ns->href))) {
if (prop->children != NULL)
xmlFreeNodeList(prop->children);
prop->children = NULL;