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);
}
catch (SAXNotRecognizedException e) {
System.err.println("warning: Validator does not recognize feature ("+SCHEMA_FULL_CHECKING_FEATURE_ID+")");
}
catch (SAXNotSupportedException e) {
System.err.println("warning: Validator does not support feature ("+SCHEMA_FULL_CHECKING_FEATURE_ID+")");
}
try {
validator.setFeature(HONOUR_ALL_SCHEMA_LOCATIONS_ID, honourAllSchemaLocations);
}
catch (SAXNotRecognizedException e) {
System.err.println("warning: Validator does not recognize feature ("+HONOUR_ALL_SCHEMA_LOCATIONS_ID+")");
}
catch (SAXNotSupportedException e) {
System.err.println("warning: Validator does not support feature ("+HONOUR_ALL_SCHEMA_LOCATIONS_ID+")");
}
try {
validator.setFeature(VALIDATE_ANNOTATIONS_ID, validateAnnotations);
}
catch (SAXNotRecognizedException e) {
System.err.println("warning: Validator does not recognize feature ("+VALIDATE_ANNOTATIONS_ID+")");
}
catch (SAXNotSupportedException e) {
System.err.println("warning: Validator does not support feature ("+VALIDATE_ANNOTATIONS_ID+")");
}
try {
validator.setFeature(GENERATE_SYNTHETIC_ANNOTATIONS_ID, generateSyntheticAnnotations);
}
catch (SAXNotRecognizedException e) {
System.err.println("warning: Validator does not recognize feature ("+GENERATE_SYNTHETIC_ANNOTATIONS_ID+")");
}
catch (SAXNotSupportedException e) {