}
try {
InputSource is = new InputSource(in);
SchemaFactory schf = SchemaFactory.lookup(SchemaFactory.NAMESPACE_SCHEMATRON);
Schema sch = schf.compileSchema(is);
Validator validator = sch.newValidator();
// set preprocessor parameters
if (phase!=null) {
validator.setProperty(Validator.PROPERTY_PHASE, phase);