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/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);
/*