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.
-
-
Field Summary
-
Fields inherited from class net.ionite.docval.validation.validator.XSLTValidator
_filename, _stream, logger
-
-
Constructor Summary
Constructors Constructor Description SCHValidator(InputStream stream)
Constructor for a Schematron validator from an input streamSCHValidator(String filename)
Constructor for a Schematron validator from a .sch file
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.-
Methods inherited from class net.ionite.docval.validation.validator.XSLTValidator
loadTransformer, reload, validate, validate
-
-
-
-
Constructor Detail
-
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 Detail
-
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 classXSLTValidator
-
-