aboutsummaryrefslogtreecommitdiffstats
path: root/debugXML.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2005-08-25 14:03:56 +0000
committerDaniel Veillard <veillard@src.gnome.org>2005-08-25 14:03:56 +0000
commitcfa303ac7041128696eeb0d310ef3e72d9ff7f19 (patch)
tree52570a7fc5d45d17871c61319c16c596a5e5deb1 /debugXML.c
parent8874b94cd2e2086f4cefe026286e0f64cac6ec9a (diff)
downloadandroid_external_libxml2-cfa303ac7041128696eeb0d310ef3e72d9ff7f19.tar.gz
android_external_libxml2-cfa303ac7041128696eeb0d310ef3e72d9ff7f19.tar.bz2
android_external_libxml2-cfa303ac7041128696eeb0d310ef3e72d9ff7f19.zip
change verbosity depending on API get back to previous outputs Daniel
* debugXML.c: change verbosity depending on API * result/XPath/tests/* result/XPath/xptr/* result/xmlid/*: get back to previous outputs Daniel
Diffstat (limited to 'debugXML.c')
-rw-r--r--debugXML.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/debugXML.c b/debugXML.c
index 24c7c4df..1ae23960 100644
--- a/debugXML.c
+++ b/debugXML.c
@@ -34,6 +34,8 @@
#include <libxml/relaxng.h>
#endif
+#define DUMP_TEXT_TYPE 1
+
typedef struct _xmlDebugCtxt xmlDebugCtxt;
typedef xmlDebugCtxt *xmlDebugCtxtPtr;
struct _xmlDebugCtxt {
@@ -46,6 +48,7 @@ struct _xmlDebugCtxt {
int check; /* do just checkings */
int errors; /* number of errors found */
int nodict; /* if the document has no dictionnary */
+ int options; /* options */
};
static void xmlCtxtDumpNodeList(xmlDebugCtxtPtr ctxt, xmlNodePtr node);
@@ -905,11 +908,14 @@ xmlCtxtDumpOneNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
fprintf(ctxt->output, "TEXT no enc");
else
fprintf(ctxt->output, "TEXT");
- if (node->content == (xmlChar *) &(node->properties))
- fprintf(ctxt->output, " compact\n");
- else if (xmlDictOwns(ctxt->dict, node->content) == 1)
- fprintf(ctxt->output, " interned\n");
- else
+ if (ctxt->options & DUMP_TEXT_TYPE) {
+ if (node->content == (xmlChar *) &(node->properties))
+ fprintf(ctxt->output, " compact\n");
+ else if (xmlDictOwns(ctxt->dict, node->content) == 1)
+ fprintf(ctxt->output, " interned\n");
+ else
+ fprintf(ctxt->output, "\n");
+ } else
fprintf(ctxt->output, "\n");
}
break;
@@ -1495,6 +1501,7 @@ xmlDebugDumpDocumentHead(FILE * output, xmlDocPtr doc)
if (output == NULL)
output = stdout;
xmlCtxtDumpInitCtxt(&ctxt);
+ ctxt.options |= DUMP_TEXT_TYPE;
ctxt.output = output;
xmlCtxtDumpDocumentHead(&ctxt, doc);
xmlCtxtDumpCleanCtxt(&ctxt);
@@ -1515,6 +1522,7 @@ xmlDebugDumpDocument(FILE * output, xmlDocPtr doc)
if (output == NULL)
output = stdout;
xmlCtxtDumpInitCtxt(&ctxt);
+ ctxt.options |= DUMP_TEXT_TYPE;
ctxt.output = output;
xmlCtxtDumpDocument(&ctxt, doc);
xmlCtxtDumpCleanCtxt(&ctxt);
@@ -1535,6 +1543,7 @@ xmlDebugDumpDTD(FILE * output, xmlDtdPtr dtd)
if (output == NULL)
output = stdout;
xmlCtxtDumpInitCtxt(&ctxt);
+ ctxt.options |= DUMP_TEXT_TYPE;
ctxt.output = output;
xmlCtxtDumpDTD(&ctxt, dtd);
xmlCtxtDumpCleanCtxt(&ctxt);