Commit 84d83e34 authored by William M. Brack's avatar William M. Brack
Browse files

inhibited production of "(null):" in xmlGetNodePath when node has default

* tree.c: inhibited production of "(null):" in xmlGetNodePath
  when node has default namespace (Bug 129710)
parent e8d1bd9d
Tue Dec 23 11:41:42 HKT 2003 William Brack <wbrack@mmm.com.hk>
* tree.c: inhibited production of "(null):" in xmlGetNodePath
when node has default namespace (Bug 129710)
Tue Dec 23 09:29:14 HKT 2003 William Brack <wbrack@mmm.com.hk>
 
* xpath.c: small enhancement to xmlXPathCmpNodes to assure
......
......@@ -4161,8 +4161,12 @@ xmlGetNodePath(xmlNodePtr node)
sep = "/";
name = (const char *) cur->name;
if (cur->ns) {
snprintf(nametemp, sizeof(nametemp) - 1,
if (cur->ns->prefix != NULL)
snprintf(nametemp, sizeof(nametemp) - 1,
"%s:%s", cur->ns->prefix, cur->name);
else
snprintf(nametemp, sizeof(nametemp) - 1,
"%s", cur->name);
nametemp[sizeof(nametemp) - 1] = 0;
name = nametemp;
}
......
Markdown is supported
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