Fixed bug #347316, reported by David Belius: The simple type, which was

* xmlschemas.c: Fixed bug #347316, reported by David Belius:
  The simple type, which was the content type definition
  of a complex type, which in turn was the base type of a
  extending complex type, was missed to be set on this
  extending complex type in the derivation machinery.
diff --git a/xmlschemas.c b/xmlschemas.c
index ff89e2c..859bdd8 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -18287,10 +18287,18 @@
 	    if (type->contentType == XML_SCHEMA_CONTENT_EMPTY) {
 		/*
 		* SPEC (3.2.1)
+		* "If the ·effective content· is empty, then the
+		*  {content type} of the [...] base ..."
 		*/
 		type->contentType = baseType->contentType;
 		type->subtypes = baseType->subtypes;
 		/*
+		* Fixes bug #347316:
+		* This is the case when the base type has a simple
+		* type definition as content.
+		*/
+		type->contentTypeDef = baseType->contentTypeDef;
+		/*
 		* NOTE that the effective mixed is ignored here.
 		*/
 	    } else if (baseType->contentType == XML_SCHEMA_CONTENT_EMPTY) {