Package com.helger.schematron.saxon
Class SchematronTransformerFactory
java.lang.Object
com.helger.schematron.saxon.SchematronTransformerFactory
A special
TransformerFactory handler that prefers Saxon's
TransformerFactory before calling the SPI version
TransformerFactory.newInstance (). This is mainly to solve the
interoperability issue when using Xalan and Saxon together in the class path.
Also in general, Saxon is always to be preferred to Xalan. Xalan is simply
out of date.- Author:
- Philip Helger
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic TransformerFactorycreateTransformerFactorySaxonFirst(ClassLoader aClassLoader, ErrorListener aErrorListener, URIResolver aURIResolver) Create a newTransformerFactorytrying to invoke the Saxon implementation first using the class "net.sf.saxon.TransformerFactoryImpl".static TransformerFactorystatic voidSet an optionalConsumerthat is called for everyTransformerFactorycreated by this class.
-
Field Details
-
SAXON_TRANSFORMER_FACTORY_CLASS
- See Also:
-
-
Method Details
-
getDefaultSaxonFirst
- Returns:
- The default "Saxon first"
TransformerFactory. Nevernull.
-
setTransformerFactoryCustomizer
Set an optionalConsumerthat is called for everyTransformerFactorycreated by this class. This may e.g. be used, to add implementation specific configuration. Based on #176.- Parameters:
a- The consumer to invoke. May benull.- Since:
- 8.0.3
-
createTransformerFactorySaxonFirst
@Nonnull public static TransformerFactory createTransformerFactorySaxonFirst(@Nullable ClassLoader aClassLoader, @Nullable ErrorListener aErrorListener, @Nullable URIResolver aURIResolver) Create a newTransformerFactorytrying 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
TransformerFactoryand notnull. - Throws:
com.helger.commons.exception.InitializationException- In case initialization fails.
-