fixing bug #59946 on xmlns="" Daniel

* SAX.c: fixing bug #59946 on xmlns=""
Daniel
diff --git a/ChangeLog b/ChangeLog
index 72dfc4b..c41e0c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Sep 10 20:13:09 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+	* SAX.c: fixing bug #59946 on xmlns=""
+
 Mon Sep 10 16:39:42 CEST 2001 Daniel Veillard <daniel@veillard.com>
 
 	* include/libxml/xmlerror.h SAX.c: fixing bug 59732, simple
diff --git a/SAX.c b/SAX.c
index 5466c01..6f3683c 100644
--- a/SAX.c
+++ b/SAX.c
@@ -1134,7 +1134,13 @@
 	    ctxt->sax->warning(ctxt->userData, 
 		 "Namespace prefix %s is not defined\n", prefix);
     }
-    xmlSetNs(ret, ns);
+
+    /*
+     * set the namespace node, making sure that if the default namspace
+     * is unbound on a parent we simply kee it NULL
+     */
+    if ((ns != NULL) && (ns->href[0] != 0))
+	xmlSetNs(ret, ns);
 
     /*
      * process all the other attributes