Geez, this one was painful ! I still need to handle entities references
for the validation step but I have a clean way to add this without touching
the algorithm:
- valid.[ch] tree.h: worked *hard* to get non-determinist content
  validation without using an ugly NFA -> DFA algo in the source.
  Made a specific algorithm easier to maintain, using a single
  stack and without recursion.
- Makefile.am test/VCM/*.xml: added more tests to "make Validtests"
- hash.c: made the growing routine static
- tree.h parser.c: added the parent information to an
  xmlElementContent node.
Daniel
diff --git a/Makefile.am b/Makefile.am
index e0fb485..85ee7b5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -296,6 +296,7 @@
 	  fi ; fi ; done ; fi ; done)
 
 XIncludetests : xmllint
+	@(rm -f .memdump ; touch .memdump)
 	@echo "##"
 	@echo "## XInclude regression tests"
 	@echo "##"
@@ -351,6 +352,17 @@
 
 
 Validtests : xmllint
+	@(rm -f .memdump ; touch .memdump)
+	@echo "##"
+	@echo "## Valid documents regression tests"
+	@echo "##"
+	@(for i in $(srcdir)/test/VCM/* ; do \
+	  name=`basename $$i`; \
+	  if [ ! -d $$i ] ; then \
+	      echo Testing $$name ; \
+	      $(top_builddir)/xmllint --valid --noout $$i ; \
+	      grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0";\
+	  fi ; done ; exit 0)
 	@echo "##"
 	@echo "## Validity checking regression tests"
 	@echo "##"
@@ -363,11 +375,12 @@
 	  else \
 	      echo Testing $$name ; \
 	      $(top_builddir)/xmllint --noout --valid $$i 2> result.$$name ; \
+	      grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0";\
 	      diff $(srcdir)/result/VC/$$name result.$$name ; \
 	      rm result.$$name ; \
 	  fi ; fi ; done)
 	@echo "##"
-	@echo "## Valid documents regression tests"
+	@echo "## General documents valid regression tests"
 	@echo "##"
 	@(for i in $(srcdir)/test/valid/* ; do \
 	  name=`basename $$i`; \
@@ -378,6 +391,7 @@
 	  else \
 	      echo Testing $$name ; \
 	      $(top_builddir)/xmllint --valid $$i > result.$$name 2>error.$$name ; \
+	      grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0";\
 	      diff $(srcdir)/result/valid/$$name result.$$name ; \
 	      diff $(srcdir)/result/valid/$$name.err error.$$name ; \
 	      rm result.$$name error.$$name ; \