Package com.helger.schematron.sch
Class SchematronResourceSCHCache
java.lang.Object
com.helger.schematron.sch.SchematronResourceSCHCache
Factory for creating
SchematronProviderXSLTFromSCH objects.- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidClear the internal cache.createSchematronXSLTProvider(com.helger.commons.io.resource.IReadableResource aSchematronResource, TransformerCustomizerSCH aTransformerCustomizer) Create a new Schematron validator for the passed resource.getSchematronXSLTProvider(com.helger.commons.io.resource.IReadableResource aSchematronResource, TransformerCustomizerSCH aTransformerCustomizer) Get the Schematron validator for the passed resource.
-
Method Details
-
createSchematronXSLTProvider
@Nullable public static SchematronProviderXSLTFromSCH createSchematronXSLTProvider(@Nonnull com.helger.commons.io.resource.IReadableResource aSchematronResource, @Nonnull TransformerCustomizerSCH aTransformerCustomizer) Create a new Schematron validator for the passed resource.- Parameters:
aSchematronResource- The resource of the Schematron rules. May not benull.aTransformerCustomizer- The XSLT transformer customizer to be used. May not benull.- Returns:
nullif the passed Schematron resource does not exist or is invalid.
-
getSchematronXSLTProvider
@Nullable public static SchematronProviderXSLTFromSCH getSchematronXSLTProvider(@Nonnull com.helger.commons.io.resource.IReadableResource aSchematronResource, @Nonnull TransformerCustomizerSCH aTransformerCustomizer) Get the Schematron validator for the passed resource. If no custom parameter are present, the result is cached. The respective cache key is a combination of the Schematron resource path, the phase and the language code.- Parameters:
aSchematronResource- The resource of the Schematron rules. May not benull.aTransformerCustomizer- The XSLT transformer customizer to be used. May not benull.- Returns:
nullif the passed Schematron resource does not exist or is invalid.
-
clearCache
public static void clearCache()Clear the internal cache.- Since:
- 5.6.5
-