summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2014-12-23 21:28:37 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2014-12-23 21:28:37 +0100
commit220a7baeeee484bbd356a506f23deb57c57e0056 (patch)
treeb56a120e27aeadf1a74b8ae4b9293326cc319c1b
parentfff8a6b87e05200a0ad0af6f86c2e859c7de9172 (diff)
downloadlibxml2-220a7baeeee484bbd356a506f23deb57c57e0056.tar.gz
Don't add IDs in xmlSetTreeDoc
This partially reverts my previous commit fixing bug #741919.
-rw-r--r--tree.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tree.c b/tree.c
index c6323b4c..6a158cec 100644
--- a/tree.c
+++ b/tree.c
@@ -2806,11 +2806,19 @@ xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc) {
prop->doc = doc;
xmlSetListDoc(prop->children, doc);
+ /*
+ * TODO: ID attributes should be also added to the new
+ * document, but this breaks things like xmlReplaceNode.
+ * The underlying problem is that xmlRemoveID is only called
+ * if a node is destroyed, not if it's unlinked.
+ */
+#if 0
if (xmlIsID(doc, tree, prop)) {
xmlChar *idVal = xmlNodeListGetString(doc, prop->children,
1);
xmlAddID(NULL, doc, idVal, prop);
}
+#endif
prop = prop->next;
}