[libxml2] Don't add IDs in xmlSetTreeDoc
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Don't add IDs in xmlSetTreeDoc
- Date: Tue, 23 Dec 2014 20:31:23 +0000 (UTC)
commit 220a7baeeee484bbd356a506f23deb57c57e0056
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Tue Dec 23 21:28:37 2014 +0100
Don't add IDs in xmlSetTreeDoc
This partially reverts my previous commit fixing bug #741919.
tree.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/tree.c b/tree.c
index c6323b4..6a158ce 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]