Fix an idness issue when building the tree
authorDaniel Veillard <veillard@redhat.com>
Fri, 24 Jul 2009 08:17:12 +0000 (10:17 +0200)
committerDaniel Veillard <veillard@redhat.com>
Fri, 24 Jul 2009 08:17:12 +0000 (10:17 +0200)
* libxslt/attributes.c: fix an IDness issue when building the tree

ChangeLog
libxslt/attributes.c

index 4e1d331..7761eb3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Jul 24 10:16:24 CEST 2009 Daniel Veillard <veillard@redhat.com>
+
+       * libxslt/attributes.c: fix an IDness issue when building the tree
+
 Tue May 12 09:03:46 CEST 2009 Daniel Veillard <veillard@redhat.com>
 
        * configure.in: adapt the extra version detection code to git
index 168dae6..ce47df7 100644 (file)
@@ -978,6 +978,13 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
        if (inst->children->name == xmlStringTextNoenc)
            copyTxt->name = xmlStringTextNoenc; 
 
+        /*
+         * since we create the attribute without content IDness must be
+         * asserted as a second step
+         */
+        if ((copyTxt->content != NULL) &&
+            (xmlIsID(attr->doc, attr->parent, attr)))
+            xmlAddID(NULL, attr->doc, copyTxt->content, attr);
     } else {
        /*
        * The sequence constructor might be complex, so instantiate it.