adding namespace checkings while making sure they still parse as

* parser.c parserInternals.c tree.c include/libxml/parser.h
  include/libxml/xmlerror.h: adding namespace checkings
  while making sure they still parse as wellformed documents.
  Add an nsWellFormed status report to the context, and
  provide new appropriate error codes.
* Makefile.am result/namespaces/* test/namespaces/*: add
  specific regression testing for the new namespace support
* test/att5 result/noent/att5 result/att5 result/att5.sax:
  add more coverage for the attribute parsing and normalization
  code.
Daniel
diff --git a/Makefile.am b/Makefile.am
index da1f38b..75b1f83 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -125,7 +125,7 @@
 
 testall : tests SVGtests SAXtests
 
-tests: XMLtests XMLenttests SAXtests HTMLtests Validtests URItests XPathtests XPtrtests XIncludetests C14Ntests Scripttests Catatests @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_THREADS@
+tests: XMLtests XMLenttests NStests SAXtests HTMLtests Validtests URItests XPathtests XPtrtests XIncludetests C14Ntests Scripttests Catatests @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_THREADS@
 	@(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; $(MAKE) tests ; fi)
 
 valgrind:
@@ -279,6 +279,29 @@
 	      rm result.$$name result2.$$name ; \
 	  fi ; fi ; done)
 
+NStests : xmllint$(EXEEXT)
+	@(echo > .memdump)
+	@echo "##"
+	@echo "## XML Namespaces regression tests"
+	@echo "##"
+	-@(for i in $(srcdir)/test/namespaces/* ; do \
+	  name=`basename $$i`; \
+	  if [ ! -d $$i ] ; then \
+	  if [ ! -f $(srcdir)/result/namespaces/$$name ] ; then \
+	      echo New test file $$name ; \
+	      $(CHECKER) $(top_builddir)/xmllint $$i \
+	         2> $(srcdir)/result/namespaces/$$name.err \
+		 > $(srcdir)/result/namespaces/$$name ; \
+	      grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"; \
+	  else \
+	      echo Testing $$name ; \
+	      $(CHECKER) $(top_builddir)/xmllint $$i 2> error.$$name > result.$$name ; \
+	      grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"; \
+	      diff $(srcdir)/result/namespaces/$$name result.$$name ; \
+	      diff $(srcdir)/result/namespaces/$$name.err error.$$name ; \
+	      rm result.$$name error.$$name ; \
+	  fi ; fi ; done)
+
 Docbtests : xmllint$(EXEEXT)
 	@(echo > .memdump)
 	@echo "##"