more bug-hunting added --tree to dump the intermediate rng tree patch from
* relaxng.c: more bug-hunting
* testRelax.c include/libxml/relaxng.h: added --tree to dump the
intermediate rng tree
* python/generator.py: patch from Stephane Bidoul to fix the generator
on python < 2.2
Daniel
diff --git a/testRelax.c b/testRelax.c
index 354e71e..c930b51 100644
--- a/testRelax.c
+++ b/testRelax.c
@@ -48,6 +48,7 @@
static int debug = 0;
#endif
static int noout = 0;
+static int tree = 0;
#ifdef HAVE_SYS_MMAN_H
static int memory = 0;
#endif
@@ -71,6 +72,9 @@
#endif
if ((!strcmp(argv[i], "-noout")) || (!strcmp(argv[i], "--noout"))) {
noout++;
+ } else
+ if ((!strcmp(argv[i], "-tree")) || (!strcmp(argv[i], "--tree"))) {
+ tree++;
}
}
xmlLineNumbersDefault(1);
@@ -123,6 +127,8 @@
if (debug)
xmlRelaxNGDump(stdout, schema);
#endif
+ if (tree)
+ xmlRelaxNGDumpTree(stdout, schema);
} else {
xmlDocPtr doc;
@@ -165,6 +171,7 @@
printf("\t--debug : dump a debug tree of the in-memory document\n");
#endif
printf("\t--noout : do not print the result\n");
+ printf("\t--tree : print the intermediate Relax-NG document tree\n");
#ifdef HAVE_SYS_MMAN_H
printf("\t--memory : test the schemas in memory parsing\n");
#endif