diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | debugXML.c | 19 | ||||
-rw-r--r-- | result/XPath/tests/chaptersbase | 4 | ||||
-rw-r--r-- | result/XPath/tests/idsimple | 2 | ||||
-rw-r--r-- | result/XPath/tests/langsimple | 16 | ||||
-rw-r--r-- | result/XPath/tests/mixedpat | 32 | ||||
-rw-r--r-- | result/XPath/tests/simpleabbr | 8 | ||||
-rw-r--r-- | result/XPath/tests/simplebase | 4 | ||||
-rw-r--r-- | result/XPath/tests/usr1check | 4 | ||||
-rw-r--r-- | result/XPath/xptr/strrange | 14 | ||||
-rw-r--r-- | result/xmlid/id_err2.xml | 2 | ||||
-rw-r--r-- | result/xmlid/id_tst1.xml | 2 | ||||
-rw-r--r-- | result/xmlid/id_tst2.xml | 2 | ||||
-rw-r--r-- | result/xmlid/id_tst3.xml | 2 | ||||
-rw-r--r-- | result/xmlid/id_tst4.xml | 2 |
15 files changed, 67 insertions, 52 deletions
@@ -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 @@ -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); diff --git a/result/XPath/tests/chaptersbase b/result/XPath/tests/chaptersbase index 10636c30..03c65670 100644 --- a/result/XPath/tests/chaptersbase +++ b/result/XPath/tests/chaptersbase @@ -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= ======================== diff --git a/result/XPath/tests/idsimple b/result/XPath/tests/idsimple index 76d9286f..891b52e5 100644 --- a/result/XPath/tests/idsimple +++ b/result/XPath/tests/idsimple @@ -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 diff --git a/result/XPath/tests/langsimple b/result/XPath/tests/langsimple index 02544625..d8d7afdb 100644 --- a/result/XPath/tests/langsimple +++ b/result/XPath/tests/langsimple @@ -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 ======================== diff --git a/result/XPath/tests/mixedpat b/result/XPath/tests/mixedpat index f3d746ac..3be0c497 100644 --- a/result/XPath/tests/mixedpat +++ b/result/XPath/tests/mixedpat @@ -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 diff --git a/result/XPath/tests/simpleabbr b/result/XPath/tests/simpleabbr index 61378127..85da41a2 100644 --- a/result/XPath/tests/simpleabbr +++ b/result/XPath/tests/simpleabbr @@ -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=... diff --git a/result/XPath/tests/simplebase b/result/XPath/tests/simplebase index 3ba17493..38fa1449 100644 --- a/result/XPath/tests/simplebase +++ b/result/XPath/tests/simplebase @@ -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= ======================== diff --git a/result/XPath/tests/usr1check b/result/XPath/tests/usr1check index f284198b..03089916 100644 --- a/result/XPath/tests/usr1check +++ b/result/XPath/tests/usr1check @@ -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 diff --git a/result/XPath/xptr/strrange b/result/XPath/xptr/strrange index 9c0096d5..c14ed917 100644 --- a/result/XPath/xptr/strrange +++ b/result/XPath/xptr/strrange @@ -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 diff --git a/result/xmlid/id_err2.xml b/result/xmlid/id_err2.xml index c7956dca..33ee896d 100644 --- a/result/xmlid/id_err2.xml +++ b/result/xmlid/id_err2.xml @@ -2,5 +2,5 @@ Object is a Node Set : Set contains 1 nodes: 1 ELEMENT foo ATTRIBUTE id - TEXT compact + TEXT content=bar diff --git a/result/xmlid/id_tst1.xml b/result/xmlid/id_tst1.xml index c7956dca..33ee896d 100644 --- a/result/xmlid/id_tst1.xml +++ b/result/xmlid/id_tst1.xml @@ -2,5 +2,5 @@ Object is a Node Set : Set contains 1 nodes: 1 ELEMENT foo ATTRIBUTE id - TEXT compact + TEXT content=bar diff --git a/result/xmlid/id_tst2.xml b/result/xmlid/id_tst2.xml index c7956dca..33ee896d 100644 --- a/result/xmlid/id_tst2.xml +++ b/result/xmlid/id_tst2.xml @@ -2,5 +2,5 @@ Object is a Node Set : Set contains 1 nodes: 1 ELEMENT foo ATTRIBUTE id - TEXT compact + TEXT content=bar diff --git a/result/xmlid/id_tst3.xml b/result/xmlid/id_tst3.xml index bf020eb2..e2f82286 100644 --- a/result/xmlid/id_tst3.xml +++ b/result/xmlid/id_tst3.xml @@ -2,5 +2,5 @@ Object is a Node Set : Set contains 1 nodes: 1 ELEMENT o:o ATTRIBUTE id - TEXT compact + TEXT content=bar diff --git a/result/xmlid/id_tst4.xml b/result/xmlid/id_tst4.xml index c7956dca..33ee896d 100644 --- a/result/xmlid/id_tst4.xml +++ b/result/xmlid/id_tst4.xml @@ -2,5 +2,5 @@ Object is a Node Set : Set contains 1 nodes: 1 ELEMENT foo ATTRIBUTE id - TEXT compact + TEXT content=bar |