[libxslt] Fix an idness issue when building the tree



commit 157e6d278bf3371cc9a96e53dfda82d5f2c268ae
Author: Daniel Veillard <veillard redhat com>
Date:   Fri Jul 24 10:17:12 2009 +0200

    Fix an idness issue when building the tree
    
    * libxslt/attributes.c: fix an IDness issue when building the tree

 ChangeLog            |    4 ++++
 libxslt/attributes.c |    7 +++++++
 2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4e1d331..7761eb3 100644
--- 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
diff --git a/libxslt/attributes.c b/libxslt/attributes.c
index 168dae6..ce47df7 100644
--- a/libxslt/attributes.c
+++ b/libxslt/attributes.c
@@ -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.



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