Search in sources :

Example 16 with Configuration

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

the class SchematronValidationService method init.

public void init() throws SchematronInitializationException {
    if (transformerFactory == null) {
        transformerFactory = XML_UTILS.getSecureXmlTransformerFactory(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

Configuration (net.sf.saxon.Configuration)16 Processor (net.sf.saxon.s9api.Processor)7 NodeInfo (net.sf.saxon.om.NodeInfo)6 DocumentWrapper (org.sirix.saxon.wrapper.DocumentWrapper)5 SaxonApiException (net.sf.saxon.s9api.SaxonApiException)4 StreamSource (javax.xml.transform.stream.StreamSource)3 XQueryCompiler (net.sf.saxon.s9api.XQueryCompiler)3 XQueryExecutable (net.sf.saxon.s9api.XQueryExecutable)3 DocumentInfo (net.sf.saxon.om.DocumentInfo)2 Item (net.sf.saxon.om.Item)2 DynamicQueryContext (net.sf.saxon.query.DynamicQueryContext)2 Serializer (net.sf.saxon.s9api.Serializer)2 Test (org.junit.Test)2 DatabaseConfiguration (org.sirix.access.conf.DatabaseConfiguration)2 ResourceConfiguration (org.sirix.access.conf.ResourceConfiguration)2 SessionConfiguration (org.sirix.access.conf.SessionConfiguration)2 MapBasedXPathFunctionResolver (com.helger.xml.xpath.MapBasedXPathFunctionResolver)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 SQLException (java.sql.SQLException)1