Commit c0fef774 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

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
parent 79426f2b
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:
......
......@@ -884,6 +884,11 @@ attribute(void *ctx, const xmlChar *fullname, const xmlChar *value)
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 @@ startElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
* 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);
/*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment