String value = (String) entry.getValue();
factory.setFeature(
(String) entry.getKey(), value != null && "true".equals(value));
}
Schema schema = null;
StreamSource[] sources = new StreamSource[schemaKeys.size()];
iter = schemaKeys.iterator();
int i = 0;
while (iter.hasNext()) {
String propName = (String) iter.next();
sources[i++] = Util.getStreamSource(
msgCtx.getConfiguration().getProperty(propName));
}
schema = factory.newSchema(sources);
// Setup validator and input source
// Features set for the SchemaFactory get propagated to Schema and Validator (JAXP 1.4)
validator = schema.newValidator();
validator.setErrorHandler(errorHandler);
} catch (SAXException e) {
handleException("Error creating Validator", e);
}