verbose("--> Writing XML Schema: " + fileName);
File output = new File(_outputRootFile, fileName);
FileWriter writer = new FileWriter(output);
SchemaWriter schemaWriter = new SchemaWriter();
schemaWriter.setSchemaContext(new SchemaContextImpl());
schemaWriter.setDocumentHandler(new PrintWriter(writer, true));
schemaWriter.write(schema);
writer.close();
} catch (Exception e) {
if (!checkExceptionWasExpected(e, FailureStepType.WRITE_SCHEMA)) {
fail("Failed to write Schema '" + url + "' to disk: " + e.toString());
}