Added XPath code (http://www.w3.org/TR/xpath), updated HTML support and docs, Daniel
diff --git a/Makefile.am b/Makefile.am
index 0f239c3..294bcde 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,7 @@
VERSION_FLAGS = -DLIBXML_VERSION=\"@LIBXML_VERSION@\"
-noinst_PROGRAMS=tester testSAX testHTML
+noinst_PROGRAMS=tester testSAX testHTML testXPath
bin_SCRIPTS=xml-config
@@ -21,9 +21,10 @@
error.c \
parser.c \
HTMLparser.c \
+ HTMLtree.c \
debugXML.c \
tree.c \
- HTMLtree.c \
+ xpath.c \
valid.c
xmlincdir = $(includedir)/gnome-xml
@@ -32,10 +33,12 @@
encoding.h \
parser.h \
HTMLparser.h \
+ HTMLtree.h \
parserInternals.h \
debugXML.h \
xml-error.h \
tree.h \
+ xpath.h \
xmlIO.h \
valid.h
@@ -57,9 +60,14 @@
testHTML_DEPENDENCIES = $(DEPS)
testHTML_LDADD= $(LDADDS)
+testXPath_SOURCES=testXPath.c
+testXPath_LDFLAGS =
+testXPath_DEPENDENCIES = $(DEPS)
+testXPath_LDADD= $(LDADDS)
+
check-local: tests
-testall : tests SVGtests SAXtests
+testall : tests SVGtests SAXtests XPathtests
tests: HTMLtests XMLtests
HTMLtests : testHTML
@@ -110,6 +118,35 @@
rm result.`basename $$i` result2.`basename $$i` ; \
fi ; fi ; done)
+XPathtests : testXPath
+ @(DIR=`pwd`; cd $(srcdir) ; \
+ for i in test/XPath/expr/* ; do \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f result/XPath/expr/`basename $$i` ] ; then \
+ echo New test file `basename $$i` ; \
+ $$DIR/testXPath -f --expr $$i > result/XPath/expr/`basename $$i` ; \
+ else \
+ echo Testing `basename $$i` ; \
+ $$DIR/testXPath -f --expr $$i > result.`basename $$i` ; \
+ diff result/XPath/expr/`basename $$i` result.`basename $$i` ; \
+ rm result.`basename $$i` ; \
+ fi ; fi ; done)
+ @(DIR=`pwd`; cd $(srcdir) ; \
+ for i in test/XPath/docs/* ; do \
+ if [ ! -d $$i ] ; then \
+ name=`basename $$i`; \
+ for j in test/XPath/tests/$$name* ; do \
+ if [ ! -d $$j ] ; then \
+ if [ ! -f result/XPath/tests/`basename $$j` ] ; then \
+ echo New test file `basename $$i` ; \
+ $$DIR/testXPath -f -i $$i $$j > result/XPath/tests/`basename $$j` ; \
+ else \
+ echo Testing `basename $$j` ; \
+ $$DIR/testXPath -f -i $$i $$j > result.`basename $$j` ; \
+ diff result/XPath/tests/`basename $$j` result.`basename $$j` ; \
+ rm result.`basename $$j` ; \
+ fi ; fi ; done ; fi ; done)
+
SAXtests : testSAX
@(DIR=`pwd`; cd $(srcdir) ; \
for i in test/* ; do \
@@ -124,20 +161,6 @@
rm result.`basename $$i` ; \
fi ; fi ; done)
-#tests : tester
-# @(for i in $(srcdir)/test/* ; do \
-# if [ ! -d $$i ] ; then \
-# j=`echo $$i | sed -e 's,^.*/,,'`; \
-# if [ ! -f $(srcdir)/result/$$j ] ; then \
-# echo New test file $$j ; \
-# ./tester $$i > $(srcdir)/result/$$j ; \
-# else \
-# echo Testing $$j ; \
-# ./tester $$i > result.$$j ; \
-# diff $(srcdir)/result/$$j result.$$j ; \
-# rm result.$$j ; \
-# fi ; fi ; done)
-
## Put `exec' in the name because this should be installed by
## `install-exec', not `install-data'.