aboutsummaryrefslogtreecommitdiffstats
path: root/debugXML.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2002-01-14 17:11:53 +0000
committerDaniel Veillard <veillard@src.gnome.org>2002-01-14 17:11:53 +0000
commite6a5519cdcb6ccbecf64b17b7f72300c558bd376 (patch)
tree2a27a080db8de67ed87b59fc516456591506656f /debugXML.c
parentbc66f859d12d579b42ab31b7c3e9e436625b7fac (diff)
downloadandroid_external_libxml2-e6a5519cdcb6ccbecf64b17b7f72300c558bd376.tar.gz
android_external_libxml2-e6a5519cdcb6ccbecf64b17b7f72300c558bd376.tar.bz2
android_external_libxml2-e6a5519cdcb6ccbecf64b17b7f72300c558bd376.zip
some cleanup after an unsuccessful attempt at fixing #61290 :-( Daniel
* debugXML.c tree.c: some cleanup after an unsuccessful attempt at fixing #61290 :-( Daniel
Diffstat (limited to 'debugXML.c')
-rw-r--r--debugXML.c33
1 files changed, 25 insertions, 8 deletions
diff --git a/debugXML.c b/debugXML.c
index e3b5c3da..fa25c917 100644
--- a/debugXML.c
+++ b/debugXML.c
@@ -1111,17 +1111,22 @@ xmlLsOneNode(FILE *output, xmlNodePtr node) {
case XML_NOTATION_NODE:
fprintf(output, "N");
break;
+ case XML_NAMESPACE_DECL:
+ fprintf(output, "n");
+ break;
default:
fprintf(output, "?");
}
- if (node->properties != NULL)
- fprintf(output, "a");
- else
- fprintf(output, "-");
- if (node->nsDef != NULL)
- fprintf(output, "n");
- else
- fprintf(output, "-");
+ if (node->type != XML_NAMESPACE_DECL) {
+ if (node->properties != NULL)
+ fprintf(output, "a");
+ else
+ fprintf(output, "-");
+ if (node->nsDef != NULL)
+ fprintf(output, "n");
+ else
+ fprintf(output, "-");
+ }
fprintf(output, " %8d ", xmlLsCountNode(node));
@@ -1169,6 +1174,15 @@ xmlLsOneNode(FILE *output, xmlNodePtr node) {
break;
case XML_NOTATION_NODE:
break;
+ case XML_NAMESPACE_DECL: {
+ xmlNsPtr ns = (xmlNsPtr) node;
+
+ if (ns->prefix == NULL)
+ fprintf(output, "default -> %s", ns->href);
+ else
+ fprintf(output, "%s -> %s", ns->prefix, ns->href);
+ break;
+ }
default:
if (node->name != NULL)
fprintf(output, "%s", node->name);
@@ -1363,6 +1377,9 @@ xmlShellList(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED,
if ((node->type == XML_DOCUMENT_NODE) ||
(node->type == XML_HTML_DOCUMENT_NODE)) {
cur = ((xmlDocPtr) node)->children;
+ } else if (node->type == XML_NAMESPACE_DECL) {
+ xmlLsOneNode(stdout, node);
+ return (0);
} else if (node->children != NULL) {
cur = node->children;
} else {