applied patch from Alexander Pohoyda fixing xmlGetNodePath on namespaced

* tree.c: applied patch from Alexander Pohoyda fixing xmlGetNodePath
  on namespaced attributes #310417.
Daniel
diff --git a/ChangeLog b/ChangeLog
index e5130b2..10ca24b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jul 19 12:33:31 CEST 2005  Daniel Veillard <daniel@veillard.com>
+
+	* tree.c: applied patch from Alexander Pohoyda fixing xmlGetNodePath
+	  on namespaced attributes #310417.
+
 Mon Jul 18 23:01:15 CEST 2005 Daniel Veillard <daniel@veillard.com>
 
 	* doc/xmllint.1 doc/xmllint.html doc/xmllint.xml: --nonet was
diff --git a/tree.c b/tree.c
index 4d12746..6bd8d4e 100644
--- a/tree.c
+++ b/tree.c
@@ -4332,6 +4332,16 @@
         } else if (cur->type == XML_ATTRIBUTE_NODE) {
             sep = "/@";
             name = (const char *) (((xmlAttrPtr) cur)->name);
+            if (cur->ns) {
+	        if (cur->ns->prefix != NULL)
+                    snprintf(nametemp, sizeof(nametemp) - 1, "%s:%s",
+		    	(char *)cur->ns->prefix, (char *)cur->name);
+		else
+		    snprintf(nametemp, sizeof(nametemp) - 1, "%s",
+		    	(char *)cur->name);
+                nametemp[sizeof(nametemp) - 1] = 0;
+                name = nametemp;
+            }
             next = ((xmlAttrPtr) cur)->parent;
         } else {
             next = cur->parent;