Big XPath cleanup continues, one URI fix:
- xpath.[ch] debugXML.c testXPath.c: fixed the XPath evaluation
engine, should be far more stable, incorporated a new version of
preceding/following axis, need testing
- uri.c: fixed file:///c:/a/b/c problem
- test/XPath/tests/idsimple: augmented the XPath tests
Daniel
diff --git a/testXPath.c b/testXPath.c
index 1559cef..49df1c4 100644
--- a/testXPath.c
+++ b/testXPath.c
@@ -40,8 +40,10 @@
#include <libxml/parser.h>
#include <libxml/debugXML.h>
#include <libxml/xmlmemory.h>
+#include <libxml/parserInternals.h>
static int debug = 0;
+static int valid = 0;
static int expr = 0;
static xmlDocPtr document = NULL;
@@ -171,6 +173,8 @@
for (i = 1; i < argc ; i++) {
if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug")))
debug++;
+ if ((!strcmp(argv[i], "-valid")) || (!strcmp(argv[i], "--valid")))
+ valid++;
if ((!strcmp(argv[i], "-expr")) || (!strcmp(argv[i], "--expr")))
expr++;
if ((!strcmp(argv[i], "-i")) || (!strcmp(argv[i], "--input")))
@@ -178,6 +182,7 @@
if ((!strcmp(argv[i], "-f")) || (!strcmp(argv[i], "--file")))
usefile++;
}
+ if (valid != 0) xmlDoValidityCheckingDefaultValue = 1;
if (document == NULL) {
if (filename == NULL)
document = xmlParseDoc(buffer);
@@ -201,6 +206,7 @@
argv[0]);
printf("\tParse the XPath strings and output the result of the parsing\n");
printf("\t--debug : dump a debug version of the result\n");
+ printf("\t--valid : switch on DTD support in the parser\n");
printf("\t--expr : debug XPath expressions only\n");
printf("\t--input filename : or\n");
printf("\t-i filename : read the document from filename\n");