mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-09 04:58:16 +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:
parent
8874b94cd2
commit
cfa303ac70
@ -1,3 +1,9 @@
|
||||
Thu Aug 25 16:03:05 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* debugXML.c: change verbosity depending on API
|
||||
* result/XPath/tests/* result/XPath/xptr/* result/xmlid/*: get back
|
||||
to previous outputs
|
||||
|
||||
Thu Aug 25 15:14:56 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* HTMLparser.c parser.c SAX2.c debugXML.c tree.c valid.c xmlreader.c
|
||||
|
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);
|
||||
|
@ -72,10 +72,10 @@ Set contains 1 nodes:
|
||||
Expression: /child::EXAMPLE/child::head/node()
|
||||
Object is a Node Set :
|
||||
Set contains 3 nodes:
|
||||
1 TEXT compact
|
||||
1 TEXT
|
||||
content=
|
||||
2 ELEMENT title
|
||||
3 TEXT compact
|
||||
3 TEXT
|
||||
content=
|
||||
|
||||
========================
|
||||
|
@ -5,7 +5,7 @@ Object is a Node Set :
|
||||
Set contains 1 nodes:
|
||||
1 ELEMENT EXAMPLE
|
||||
ATTRIBUTE id
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=root
|
||||
ATTRIBUTE prop1
|
||||
TEXT
|
||||
|
@ -5,30 +5,30 @@ Object is a Node Set :
|
||||
Set contains 9 nodes:
|
||||
1 ELEMENT b
|
||||
ATTRIBUTE lang
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=en
|
||||
2 ELEMENT x
|
||||
3 ELEMENT x
|
||||
4 ELEMENT para
|
||||
ATTRIBUTE lang
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=en
|
||||
5 ELEMENT div
|
||||
ATTRIBUTE lang
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=en
|
||||
6 ELEMENT para
|
||||
7 ELEMENT para
|
||||
ATTRIBUTE lang
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=EN
|
||||
8 ELEMENT para
|
||||
ATTRIBUTE lang
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=en-us
|
||||
9 ELEMENT para
|
||||
ATTRIBUTE lang
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=EN-US
|
||||
|
||||
========================
|
||||
@ -37,11 +37,11 @@ Object is a Node Set :
|
||||
Set contains 2 nodes:
|
||||
1 ELEMENT para
|
||||
ATTRIBUTE lang
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=en-us
|
||||
2 ELEMENT para
|
||||
ATTRIBUTE lang
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=EN-US
|
||||
|
||||
========================
|
||||
|
@ -5,7 +5,7 @@ Object is a Node Set :
|
||||
Set contains 1 nodes:
|
||||
1 ELEMENT s
|
||||
ATTRIBUTE p
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=root
|
||||
|
||||
========================
|
||||
@ -14,11 +14,11 @@ Object is a Node Set :
|
||||
Set contains 2 nodes:
|
||||
1 ELEMENT s
|
||||
ATTRIBUTE p
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=root
|
||||
2 ELEMENT s
|
||||
ATTRIBUTE p
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=p1
|
||||
|
||||
========================
|
||||
@ -27,11 +27,11 @@ Object is a Node Set :
|
||||
Set contains 2 nodes:
|
||||
1 ELEMENT s
|
||||
ATTRIBUTE p
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=root
|
||||
2 ELEMENT s
|
||||
ATTRIBUTE p
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=p1
|
||||
|
||||
========================
|
||||
@ -40,11 +40,11 @@ Object is a Node Set :
|
||||
Set contains 2 nodes:
|
||||
1 ELEMENT s
|
||||
ATTRIBUTE p
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=root
|
||||
2 ELEMENT s
|
||||
ATTRIBUTE p
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=p1
|
||||
|
||||
========================
|
||||
@ -53,15 +53,15 @@ Object is a Node Set :
|
||||
Set contains 3 nodes:
|
||||
1 ELEMENT s
|
||||
ATTRIBUTE p
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=root
|
||||
2 ELEMENT s
|
||||
ATTRIBUTE p
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=p1
|
||||
3 ELEMENT s
|
||||
ATTRIBUTE p
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=p2
|
||||
|
||||
========================
|
||||
@ -70,16 +70,16 @@ Object is a Node Set :
|
||||
Set contains 4 nodes:
|
||||
1 ELEMENT s
|
||||
ATTRIBUTE p
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=root
|
||||
2 ELEMENT p1
|
||||
3 ELEMENT s
|
||||
ATTRIBUTE p
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=p1
|
||||
4 ELEMENT s
|
||||
ATTRIBUTE p
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=p2
|
||||
|
||||
========================
|
||||
@ -88,14 +88,14 @@ Object is a Node Set :
|
||||
Set contains 4 nodes:
|
||||
1 ELEMENT s
|
||||
ATTRIBUTE p
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=root
|
||||
2 ELEMENT p1
|
||||
3 ELEMENT s
|
||||
ATTRIBUTE p
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=p1
|
||||
4 ELEMENT s
|
||||
ATTRIBUTE p
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=p2
|
||||
|
@ -45,7 +45,7 @@ Object is a Node Set :
|
||||
Set contains 2 nodes:
|
||||
1 TEXT
|
||||
content=bla bla bla ...
|
||||
2 TEXT compact
|
||||
2 TEXT
|
||||
content=...
|
||||
|
||||
========================
|
||||
@ -54,7 +54,7 @@ Object is a Node Set :
|
||||
Set contains 2 nodes:
|
||||
1 TEXT
|
||||
content=bla bla bla ...
|
||||
2 TEXT compact
|
||||
2 TEXT
|
||||
content=...
|
||||
|
||||
========================
|
||||
@ -63,7 +63,7 @@ Object is a Node Set :
|
||||
Set contains 2 nodes:
|
||||
1 TEXT
|
||||
content=bla bla bla ...
|
||||
2 TEXT compact
|
||||
2 TEXT
|
||||
content=...
|
||||
|
||||
========================
|
||||
@ -77,5 +77,5 @@ Set contains 1 nodes:
|
||||
Expression: (//p/text())[position()=last()]
|
||||
Object is a Node Set :
|
||||
Set contains 1 nodes:
|
||||
1 TEXT compact
|
||||
1 TEXT
|
||||
content=...
|
||||
|
@ -53,10 +53,10 @@ Set contains 1 nodes:
|
||||
Expression: /child::EXAMPLE/child::head/node()
|
||||
Object is a Node Set :
|
||||
Set contains 3 nodes:
|
||||
1 TEXT compact
|
||||
1 TEXT
|
||||
content=
|
||||
2 ELEMENT title
|
||||
3 TEXT compact
|
||||
3 TEXT
|
||||
content=
|
||||
|
||||
========================
|
||||
|
@ -5,8 +5,8 @@ Object is a Node Set :
|
||||
Set contains 1 nodes:
|
||||
1 ELEMENT ITEM
|
||||
ATTRIBUTE monto
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=50.12
|
||||
ATTRIBUTE divisa
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=DOL
|
||||
|
@ -44,7 +44,7 @@ Expression: xpointer(string-range(//p, 'difficult'))
|
||||
Object is a Location Set:
|
||||
1 : Object is a range :
|
||||
From index 3 in node
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=a diff
|
||||
To index 4 in node
|
||||
TEXT
|
||||
@ -56,10 +56,10 @@ Expression: xpointer(string-range(//p, 'spanning'))
|
||||
Object is a Location Set:
|
||||
1 : Object is a range :
|
||||
From index 3 in node
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=a span
|
||||
To index 3 in node
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=ing one
|
||||
|
||||
|
||||
@ -80,17 +80,17 @@ Expression: xpointer(string-range(//seq, ''))
|
||||
Object is a Location Set:
|
||||
1 : Object is a collapsed range :
|
||||
index 1 in node
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=123
|
||||
2 : Object is a collapsed range :
|
||||
index 2 in node
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=123
|
||||
3 : Object is a collapsed range :
|
||||
index 3 in node
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=123
|
||||
4 : Object is a collapsed range :
|
||||
index 4 in node
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=123
|
||||
|
@ -2,5 +2,5 @@ Object is a Node Set :
|
||||
Set contains 1 nodes:
|
||||
1 ELEMENT foo
|
||||
ATTRIBUTE id
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=bar
|
||||
|
@ -2,5 +2,5 @@ Object is a Node Set :
|
||||
Set contains 1 nodes:
|
||||
1 ELEMENT foo
|
||||
ATTRIBUTE id
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=bar
|
||||
|
@ -2,5 +2,5 @@ Object is a Node Set :
|
||||
Set contains 1 nodes:
|
||||
1 ELEMENT foo
|
||||
ATTRIBUTE id
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=bar
|
||||
|
@ -2,5 +2,5 @@ Object is a Node Set :
|
||||
Set contains 1 nodes:
|
||||
1 ELEMENT o:o
|
||||
ATTRIBUTE id
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=bar
|
||||
|
@ -2,5 +2,5 @@ Object is a Node Set :
|
||||
Set contains 1 nodes:
|
||||
1 ELEMENT foo
|
||||
ATTRIBUTE id
|
||||
TEXT compact
|
||||
TEXT
|
||||
content=bar
|
||||
|
Loading…
x
Reference in New Issue
Block a user