Class SCHValidator

java.lang.Object
net.ionite.docval.validation.validator.XSLTValidator
net.ionite.docval.validation.validator.SCHValidator
All Implemented Interfaces:
DocumentValidator

public class SCHValidator extends XSLTValidator
The standard validator for SCH (Schematron) files This is an extension of the XSLTValidator, where the provided sch file is converted to the .xslt file in-place. Be aware that startup times are much faster if you use the .xsl directly, as this class performs a (slow) conversion using the default Schematron skeleton files.
  • Constructor Details

    • SCHValidator

      public SCHValidator(String filename)
      Constructor for a Schematron validator from a .sch file
      Parameters:
      filename - The schematron (.sch) file to load.
    • SCHValidator

      public SCHValidator(InputStream stream)
      Constructor for a Schematron validator from an input stream
      Parameters:
      stream - InputStream with the contents of an .sch file
  • Method Details

    • setupTransformer

      protected Transformer setupTransformer()
      Override the initialization in the parent class This implementation loads the given schematron, and converts it to an SVRL stylesheet, using the default skeleton implementation as published on the schematron website.
      Overrides:
      setupTransformer in class XSLTValidator