[xml] Namespace Nodes in XPath Nodesets & Deleting NsNodes


I'm investigating an xmlstarlet bug when deleting namespace nodes.
Currently deletion is implemented by calling xmlUnlinkNode() on every
node in the nodeset returned from an XPath query. This doesn't work
for namespace nodes because the nodeset holds a pointer to a duplicate
instead of the original:

 * xmlXPathNodeSetDupNs:

 * Namespace node in libxml don't match the XPath semantic. In a node set
 * the namespace nodes are duplicated and the next pointer is set to the
 * parent node in the XPath semantic.

So I'd appreciate if someone could point me to or provide an
explanation as to why namespace nodes are treated specially. Also, any
advice on how to go about deleting namespace nodes.

Noam Postavsky

(I'm ccing xmlstar-devel list)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]