commiting some work done while in the Maldives (hence the timezone on the

* relaxng.c xmlschemas.c include/libxml/schemasInternals.h: commiting
  some work done while in the Maldives (hence the timezone on the
  laptop !)
* result/schemas/length3* test/schemas/deter0_*
  test/schemas/group0_*: some tests added too
Daniel
diff --git a/relaxng.c b/relaxng.c
index 99ff9e9..c17b344 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -2659,9 +2659,9 @@
  */
 void	
 xmlRelaxNGCleanupTypes(void) {
+    xmlSchemaCleanupTypes();
     if (xmlRelaxNGTypeInitialized == 0)
 	return;
-    xmlSchemaCleanupTypes();
     xmlHashFree(xmlRelaxNGRegisteredTypes, (xmlHashDeallocator)
 	        xmlRelaxNGFreeTypeLibrary);
     xmlRelaxNGTypeInitialized = 0;