XmlSchema parentSchema)
throws SchemaCompilationException {
XmlSchemaContent content;
content = simpleContent.getContent();
if (content instanceof XmlSchemaSimpleContentExtension) {
XmlSchemaSimpleContentExtension extension = (XmlSchemaSimpleContentExtension) content;
//process the base type if it has not been processed yet
if (!isAlreadyProcessed(extension.getBaseTypeName())) {
//pick the relevant basetype from the schema and process it
XmlSchema resolvedSchema = getParentSchema(parentSchema, extension.getBaseTypeName(),
COMPONENT_TYPE);
if (resolvedSchema == null) {
throw new SchemaCompilationException("can not find type " +
extension.getBaseTypeName()
+ " from the parent schema " +
parentSchema.getTargetNamespace());
} else {
XmlSchemaType type = resolvedSchema.getTypeByName(extension.getBaseTypeName());
if (type instanceof XmlSchemaComplexType) {
XmlSchemaComplexType complexType = (XmlSchemaComplexType) type;
if (complexType.getName() != null) {
processNamedComplexSchemaType(complexType, resolvedSchema);
} else {
//this is not possible. The extension should always
//have a name
throw new SchemaCompilationException("Unnamed complex type used in extension");//Internationlize this
}
} else if (type instanceof XmlSchemaSimpleType) {
//process simple type
processSimpleSchemaType((XmlSchemaSimpleType) type, null, resolvedSchema, null);
}
}
}
//process extension base type
processSimpleExtensionBaseType(extension.getBaseTypeName(), metaInfHolder, parentSchema);
//process attributes
for (XmlSchemaAttributeOrGroupRef attr : extension.getAttributes()) {
if (attr instanceof XmlSchemaAttribute) {
processAttribute((XmlSchemaAttribute) attr, metaInfHolder, parentSchema);
}
}
//process any attribute
XmlSchemaAnyAttribute anyAtt = extension.getAnyAttribute();
if (anyAtt != null) {
processAnyAttribute(metaInfHolder, anyAtt);
}
} else if (content instanceof XmlSchemaSimpleContentRestriction) {