mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-30 22:43:14 +03:00
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
This commit is contained in:
19
debugXML.c
19
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);
|
||||
|
Reference in New Issue
Block a user