Fixed #72346, about handling of xmlns:foo="", this could actually change
* SAX.c: Fixed #72346, about handling of xmlns:foo="", this could
actually change in a future XML Namespace revision.
Daniel
diff --git a/ChangeLog b/ChangeLog
index 08f93fe..5ce6481 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Mar 1 17:14:42 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: Fixed #72346, about handling of xmlns:foo="", this could
+ actually change in a future XML Namespace revision.
+
Fri Mar 1 17:12:15 CET 2002 Daniel Veillard <daniel@veillard.com>
* python/types.c python/tests/Makefile.am python/tests/xpathret.py:
diff --git a/SAX.c b/SAX.c
index b6e368a..a80db8b 100644
--- a/SAX.c
+++ b/SAX.c
@@ -884,6 +884,11 @@
ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc,
ctxt->node, ret, value);
*/
+ if (value[0] == 0) {
+ if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
+ ctxt->sax->error(ctxt->userData,
+ "Empty namespace name for prefix %s\n", name);
+ }
/* a standard namespace definition */
xmlNewNs(ctxt->node, value, name);
xmlFree(ns);
@@ -1277,7 +1282,8 @@
* 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 != NULL) && (ns->href[0] != 0))
+ if ((ns != NULL) && (ns->href != NULL) &&
+ ((ns->href[0] != 0) || (ns->prefix != NULL)))
xmlSetNs(ret, ns);
/*