Search in sources :

Example 6 with TransformerFactoryImpl

use of net.sf.saxon.TransformerFactoryImpl in project ddf by codice.

the class SchematronValidationService method init.

public void init() throws SchematronInitializationException {
    if (transformerFactory == null) {
        transformerFactory = TransformerFactory.newInstance(TransformerFactoryImpl.class.getName(), SchematronValidationService.class.getClassLoader());
    }
    // DDF-855: set ErrorListener to catch any warnings/errors during loading of the
    // ruleset file and log (vs. Saxon default of writing to console) the warnings/errors
    Configuration config = ((TransformerFactoryImpl) transformerFactory).getConfiguration();
    config.setErrorListener(new SaxonErrorListener(schematronFileNames));
    updateValidators();
}
Also used : TransformerFactoryImpl(net.sf.saxon.TransformerFactoryImpl) Configuration(net.sf.saxon.Configuration)

Aggregations

TransformerFactoryImpl (net.sf.saxon.TransformerFactoryImpl)6 TransformerFactory (javax.xml.transform.TransformerFactory)4 Templates (javax.xml.transform.Templates)3 Test (org.junit.Test)2 StringWriter (java.io.StringWriter)1 Source (javax.xml.transform.Source)1 Transformer (javax.xml.transform.Transformer)1 StreamResult (javax.xml.transform.stream.StreamResult)1 StreamSource (javax.xml.transform.stream.StreamSource)1 Configuration (net.sf.saxon.Configuration)1 XsltUriResolver (org.apache.camel.builder.xml.XsltUriResolver)1 ClassPathURIResolver (org.apache.camel.component.schematron.processor.ClassPathURIResolver)1 BeforeClass (org.junit.BeforeClass)1