Removed a memcpy if xmlXPathNodeSetMerge(); it seems we really need to

* xpath.c: Removed a memcpy if xmlXPathNodeSetMerge(); it
  seems we really need to walk the whole list, since those
  nastly namespace nodes need to be added with
  xmlXPathNodeSetDupNs(); thus a pure memcpy is not possible.
  A flag on the node-set indicating if namespace nodes are in
  the set would help here; this is the 3rd flag which would
  be usefull with node-sets. The current flags I have in mind:
  1) Is a node-set already sorted?
     This would allow for rebust and optimizable sorting
     behaviour.
  2) Of what type are the nodes in the set (or of mixed type)?
     This would allow for faster merging of node-sets.
  3) Are namespace nodes in the set?
     This would allow to skipp all the namespace node specific
     special handling. Faster node-set merging if the first
     set is empty; just memcpy the set.
diff --git a/xpath.c b/xpath.c
index 2a33db2..9c0ff6f 100644
--- a/xpath.c
+++ b/xpath.c
@@ -2141,6 +2141,7 @@
     return(ret);
 }
 
+#if 0 /* enable if needed */
 /**
  * xmlXPathNodeSetCreateSize:
  * @val:  an initial xmlNodePtr, or NULL
@@ -2175,6 +2176,7 @@
     }
     return(ret);
 }
+#endif
 
 /**
  * xmlXPathNodeSetContains:
@@ -2399,14 +2401,22 @@
 
     if (val2 == NULL) return(val1);
     if (val1 == NULL) {
-	/*
-	* Optimization: Create an equally sized node-set
-	* and memcpy the content.
-	*/
-	val1 = xmlXPathNodeSetCreateSize(val2->nodeNr);
-	if (val1 == NULL)
-	    return(NULL);
-	if (val2->nodeNr != 0) {
+	val1 = xmlXPathNodeSetCreate(NULL);
+#if 0
+        /*
+        * TODO: The optimization won't work in every case, since
+        *  those nasty namespace nodes need to be added with
+        *  xmlXPathNodeSetDupNs() to the set; thus a pure
+        *  memcpy is not possible.
+        */
+        /*
+        * Optimization: Create an equally sized node-set
+        * and memcpy the content.
+        */
+        val1 = xmlXPathNodeSetCreateSize(val2->nodeNr);
+        if (val1 == NULL)
+            return(NULL);
+        if (val2->nodeNr != 0) {
 	    if (val2->nodeNr == 1)
 		*(val1->nodeTab) = *(val2->nodeTab);
 	    else {
@@ -2414,8 +2424,9 @@
 		    val2->nodeNr * sizeof(xmlNodePtr));
 	    }
 	    val1->nodeNr = val2->nodeNr;
-	}
+	}			
 	return(val1);
+#endif /* if 0 */
     }
 
     /* @@ with_ns to check whether namespace nodes should be looked at @@ */