more testing on the Relax-NG front, cleaning up the regression tests

* check-relaxng-test-suite.py relaxng.c: more testing on the
  Relax-NG front, cleaning up the regression tests failures
  current state and I forgot support for "mixed":
  found 373 test schemas: 280 success 93 failures
  found 529 test instances: 401 success 68 failures
* tree.c include/libxml/tree.h xmlschemastypes.c: finished and
  moved the Name, NCName and QName validation routine in tree.c
* uri.c: fixed handling of URI ending up with #, i.e. having
  an empty fragment ID.
* result/relaxng/*: updated the results
Daniel
diff --git a/check-relaxng-test-suite.py b/check-relaxng-test-suite.py
index feb6817..00fe902 100755
--- a/check-relaxng-test-suite.py
+++ b/check-relaxng-test-suite.py
@@ -45,7 +45,6 @@
     log.write("resources: %s\n" % (resources))
     return None
 
-libxml2.setEntityLoader(resolver)
 
 #
 # handle a valid instance
@@ -235,7 +234,6 @@
     for r in res:
         handle_resource(r, name)
 
-
 #
 # handle a testCase element
 #
@@ -285,7 +283,17 @@
 #
 # handle a testSuite element
 #
-def handle_testSuite(node):
+def handle_testSuite(node, level = 0):
+    global nb_schemas_tests, nb_schemas_success, nb_schemas_failed
+    global nb_instances_tests, nb_instances_success, nb_instances_failed
+    if level >= 1:
+	old_schemas_tests = nb_schemas_tests
+	old_schemas_success = nb_schemas_success
+	old_schemas_failed = nb_schemas_failed
+	old_instances_tests = nb_instances_tests
+	old_instances_success = nb_instances_success
+	old_instances_failed = nb_instances_failed
+
     docs = node.xpathEval('documentation')
     authors = node.xpathEval('author')
     if docs != []:
@@ -306,13 +314,26 @@
     for test in node.xpathEval('testCase'):
         handle_testCase(test)
     for test in node.xpathEval('testSuite'):
-        handle_testSuite(test)
+        handle_testSuite(test, level + 1)
 	        
 
+    if level >= 1 and sections != []:
+        if nb_schemas_tests != old_schemas_tests:
+	    print "found %d test schemas: %d success %d failures" % (
+		  nb_schemas_tests - old_schemas_tests,
+		  nb_schemas_success - old_schemas_success,
+		  nb_schemas_failed - old_schemas_failed)
+	if nb_instances_tests != old_instances_tests:
+	    print "found %d test instances: %d success %d failures" % (
+		  nb_instances_tests - old_instances_tests,
+		  nb_instances_success - old_instances_success,
+		  nb_instances_failed - old_instances_failed)
 #
 # Parse the conf file
 #
+libxml2.substituteEntitiesDefault(1);
 testsuite = libxml2.parseFile(CONF)
+libxml2.setEntityLoader(resolver)
 root = testsuite.getRootElement()
 if root.name != 'testSuite':
     print "%s doesn't start with a testSuite element, aborting" % (CONF)