public Map<String, Schema> generateSchemas(List<XMLDescriptor> descriptorsToProcess, SchemaModelGeneratorProperties properties, SchemaModelOutputResolver outputResolver, Map<QName, Type> additionalGlobalElements) throws DescriptorException {
Map<String, Schema> schemas = generateSchemas(descriptorsToProcess, properties, additionalGlobalElements);
// write out the generates schema(s) via the given output resolver
Project proj = new SchemaModelProject();
XMLContext context = new XMLContext(proj);
XMLMarshaller marshaller = context.createMarshaller();
XMLDescriptor schemaDescriptor = (XMLDescriptor)proj.getDescriptor(Schema.class);
int schemaCount = 0;
for (Entry<String, Schema> entry : schemas.entrySet()) {
Schema schema = entry.getValue();
try {