Parsing of <complexContent> - handle attribute 'mixed', catch illegal

* xmlschemas.c include/libxml/xmlerror.h include/libxml/xmlschemas.h
  include/libxml/schemasInternals.h: Parsing of <complexContent>
  - handle attribute 'mixed', catch illegal attributes.
  Parsing of <complexType> - handle attributes 'abstract',
  'final' and 'block', catch illegal attributes.
  Validation of complex types - handle abstract types.
  Added handling of default/fixed attributes and element values.
  Per validation option attribute nodes/text nodes are created
  on the instance.
  Added the corresponding constraints for fixed/default.
  Added xmlSchemaSetValidOptions, xmlSchemaGetValidOptions
  to the external API.
  Extended element declaration constraints.
  Got rid of perseverative creation of temporery validation/parser
  contexts.
  Added handling of xsi:schemaLocation and
  xsi:noNamespaceSchemaLocation.
  Fixed xsi:type component resolution if using non-prefixed
  QNames.
* xmlregexp.c xmlschemas.c include/libxml/xmlautomata.h:
  Enabled namespace awareness of the content model if using the
  model group "all".
* test/schemas/bug152470_1.xsd: Removed an "abstract" attribute,
  which broke the test.
* xstc/xstc.py:  Workaround to accomodate case insensitive
  test definitions in ms-test.def.xml (was missing in a previous
  commit).
diff --git a/include/libxml/schemasInternals.h b/include/libxml/schemasInternals.h
index 42fd5d0..9fb7aba 100644
--- a/include/libxml/schemasInternals.h
+++ b/include/libxml/schemasInternals.h
@@ -216,7 +216,7 @@
  */
 #define XML_SCHEMAS_ATTR_NSDEFAULT        1 << 7
 /**
- * XML_SCHEMAS_ATTR_NSDEFAULT:
+ * XML_SCHEMAS_ATTR_INTERNAL_RESOLVED:
  *
  * this is set when the "type" and "ref" references
  * have been resolved.
@@ -255,6 +255,8 @@
     const xmlChar *targetNamespace;
     int flags;
     const xmlChar *refPrefix;
+    xmlSchemaValPtr defVal;
+    xmlSchemaAttributePtr refDecl;
 };
 
 /**
@@ -470,6 +472,31 @@
  * Marks the item as marked; used for circular checks.
  */
 #define XML_SCHEMAS_TYPE_MARKED        1 << 16
+/**
+ * XML_SCHEMAS_TYPE_BLOCK_DEFAULT:
+ *
+ * the complexType did not specify 'block' so use the default of the
+ * <schema> item.
+ */
+#define XML_SCHEMAS_TYPE_BLOCK_DEFAULT    1 << 17
+/**
+ * XML_SCHEMAS_TYPE_BLOCK_EXTENSION:
+ *
+ * the complexType has a 'block' of "extension".
+ */
+#define XML_SCHEMAS_TYPE_BLOCK_EXTENSION    1 << 18
+/**
+ * XML_SCHEMAS_TYPE_FINAL_RESTRICTION:
+ *
+ * the complexType has a 'block' of "restriction".
+ */
+#define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION    1 << 19
+/**
+ * XML_SCHEMAS_TYPE_ABSTRACT:
+ *
+ * the simple/complexType is abstract.
+ */
+#define XML_SCHEMAS_TYPE_ABSTRACT    1 << 20
 
 /**
  * _xmlSchemaType:
@@ -650,6 +677,7 @@
     xmlRegexpPtr contModel;
     xmlSchemaContentType contentType;
     const xmlChar *refPrefix;
+    xmlSchemaValPtr defVal;
 };
 
 /*
@@ -792,6 +820,7 @@
     xmlDictPtr      dict;
     void *includes;     /* the includes, this is opaque for now */
     int preserve;        /* whether to free the document */
+    int counter; /* used to give ononymous components unique names */
 };
 
 XMLPUBFUN void XMLCALL         xmlSchemaFreeType        (xmlSchemaTypePtr type);