Class SchematronResourceSCHCache

java.lang.Object
com.helger.schematron.sch.SchematronResourceSCHCache

@ThreadSafe public final class SchematronResourceSCHCache extends Object
Factory for creating SchematronProviderXSLTFromSCH objects.
Author:
Philip Helger
  • 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 be null.
      aTransformerCustomizer - The XSLT transformer customizer to be used. May not be null.
      Returns:
      null if 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 be null.
      aTransformerCustomizer - The XSLT transformer customizer to be used. May not be null.
      Returns:
      null if the passed Schematron resource does not exist or is invalid.
    • clearCache

      public static void clearCache()
      Clear the internal cache.
      Since:
      5.6.5