Changed xmlXPathCollectAndTest() to use xmlXPathNodeSetAddNs() when adding

* xpath.c: Changed xmlXPathCollectAndTest() to use
  xmlXPathNodeSetAddNs() when adding a ns-node in case of
  NODE_TEST_TYPE (the ns-node was previously added plainly
  to the list). Since for NODE_TEST_ALL and NODE_TEST_NAME
  this specialized ns-addition function was already used,
  I assume it was missed to be used with NODE_TEST_TYPE.
diff --git a/ChangeLog b/ChangeLog
index 48bd966..c106b4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Mon Jul  3 13:36:43 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+	* xpath.c: Changed xmlXPathCollectAndTest() to use
+	  xmlXPathNodeSetAddNs() when adding a ns-node in case of
+	  NODE_TEST_TYPE (the ns-node was previously added plainly
+	  to the list). Since for NODE_TEST_ALL and NODE_TEST_NAME
+	  this specialized ns-addition function was already used,
+	  I assume it was missed to be used with NODE_TEST_TYPE.
+
 Mon Jul  3 10:57:33 CEST 2006 Daniel Veillard <daniel@veillard.com>
 
 	* HTMLparser.c: applied const'ification of strings patch from
diff --git a/xpath.c b/xpath.c
index 00a2536..4f05477 100644
--- a/xpath.c
+++ b/xpath.c
@@ -12195,7 +12195,10 @@
 				break;
 			}
 		    } else if (cur->type == type) {
-			XP_TEST_HIT
+			if (type == XML_NAMESPACE_DECL)
+			    XP_TEST_HIT_NS
+			else
+			    XP_TEST_HIT
 		    } else if ((type == NODE_TYPE_TEXT) &&
 			 (cur->type == XML_CDATA_SECTION_NODE))
 		    {