diff options
Diffstat (limited to 'c14n.c')
-rw-r--r-- | c14n.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -176,7 +176,13 @@ xmlC14NIsNodeInNodeset(xmlNodeSetPtr nodes, xmlNodePtr node, xmlNodePtr parent) xmlNs ns; memcpy(&ns, node, sizeof(ns)); - ns.next = (xmlNsPtr)parent; /* this is a libxml hack! check xpath.c for details */ + + /* this is a libxml hack! check xpath.c for details */ + if((parent != NULL) && (parent->type == XML_ATTRIBUTE_NODE)) { + ns.next = (xmlNsPtr)parent->parent; + } else { + ns.next = (xmlNsPtr)parent; + } /* * If the input is an XPath node-set, then the node-set must explicitly |