Package com.helger.schematron.saxon
Class SchematronTransformerFactory
- java.lang.Object
-
- com.helger.schematron.saxon.SchematronTransformerFactory
-
@Immutable public final class SchematronTransformerFactory extends Object
A specialTransformerFactory
handler that prefers Saxon'sTransformerFactory
before calling the SPI versionTransformerFactory.newInstance ()
. This is mainly to solve the interoperability issue when using Xalan and Saxon together in the class path.- Author:
- Philip Helger
-
-
Field Summary
Fields Modifier and Type Field Description static String
SAXON_TRANSFORMER_FACTORY_CLASS
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TransformerFactory
createTransformerFactorySaxonFirst(ClassLoader aClassLoader, ErrorListener aErrorListener, URIResolver aURIResolver)
Create a newTransformerFactory
trying to invoke the Saxon implementation first using the class "net.sf.saxon.TransformerFactoryImpl".static TransformerFactory
getDefaultSaxonFirst()
-
-
-
Field Detail
-
SAXON_TRANSFORMER_FACTORY_CLASS
public static final String SAXON_TRANSFORMER_FACTORY_CLASS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDefaultSaxonFirst
@Nonnull public static TransformerFactory getDefaultSaxonFirst()
- Returns:
- The default "Saxon first"
TransformerFactory
. Nevernull
.
-
createTransformerFactorySaxonFirst
@Nonnull public static TransformerFactory createTransformerFactorySaxonFirst(@Nullable ClassLoader aClassLoader, @Nullable ErrorListener aErrorListener, @Nullable URIResolver aURIResolver)
Create a newTransformerFactory
trying to invoke the Saxon implementation first using the class "net.sf.saxon.TransformerFactoryImpl".- Parameters:
aClassLoader
- The optional class loader to be used. May benull
.aErrorListener
- An optional XSLT error listener to be used. May benull
.aURIResolver
- An optional XSLT URI resolver to be used. May benull
.- Returns:
- A new
TransformerFactory
and notnull
. - Throws:
com.helger.commons.exception.InitializationException
- In case initialization fails.
-
-