catch (SAXNotSupportedException e) {
System.err.println("warning: SchemaFactory does not support feature ("+GENERATE_SYNTHETIC_ANNOTATIONS_ID+")");
}
// Build Schema from sources
Schema schema;
if (schemas != null && schemas.size() > 0) {
final int length = schemas.size();
StreamSource[] sources = new StreamSource[length];
for (int j = 0; j < length; ++j) {
sources[j] = new StreamSource((String) schemas.elementAt(j));
}
schema = factory.newSchema(sources);
}
else {
schema = factory.newSchema();
}
// Setup validator and input source.
Validator validator = schema.newValidator();
validator.setErrorHandler(sourceValidator);
try {
validator.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
}