public final class ValidatorFactory
extends java.lang.Object
| Constructor and Description |
|---|
ValidatorFactory()
Constructs a new factory.
|
| Modifier and Type | Method and Description |
|---|---|
javax.xml.transform.ErrorListener |
getErrorListener()
Get the error event handler for this factory.
|
CompileOptions |
getOptions() |
Validator |
newValidator(java.io.File schema)
Process the specified schema into a Validator object.
|
Validator |
newValidator(java.io.File schema,
java.lang.String phase)
Process the specified schema into a Validator object.
|
Validator |
newValidator(javax.xml.transform.Source schema)
Process the specified schema into a Validator object.
|
Validator |
newValidator(javax.xml.transform.Source schema,
java.lang.String phase)
Process the specified schema into a Validator object.
|
void |
setDebugMode(boolean debugMode)
If debug mode is set to true, then preprocessing stylesheet will be outputted in file
debug.xslt This has to be called before
newValidator() to take effect. |
void |
setErrorListener(javax.xml.transform.ErrorListener listener)
Set the error event listener for the ValidatorFactory, which is used for the processing of the
Schematron schema, not for the Schematron validation itself.
|
void |
setOptions(CompileOptions options) |
void |
setResolver(java.lang.Class<javax.xml.transform.URIResolver> resolver)
Set the class name of the resolver to use, overriding built-in Apache resolver
|
public void setOptions(CompileOptions options)
public CompileOptions getOptions()
public void setErrorListener(javax.xml.transform.ErrorListener listener)
listener - The error listener.java.lang.IllegalArgumentException - If listener is null.public javax.xml.transform.ErrorListener getErrorListener()
null.public void setDebugMode(boolean debugMode)
newValidator() to take effect.public void setResolver(java.lang.Class<javax.xml.transform.URIResolver> resolver)
public Validator newValidator(java.io.File schema) throws SchematronException
schema - The Schematron schema to use.SchematronExceptionpublic Validator newValidator(java.io.File schema, java.lang.String phase) throws SchematronException
schema - The Schematron schema to use.SchematronExceptionpublic Validator newValidator(javax.xml.transform.Source schema) throws SchematronException
schema - The Schematron schema to use.SchematronException - Will wrap any exception occurring while attempting to instantiate a validator.public Validator newValidator(javax.xml.transform.Source schema, java.lang.String phase) throws SchematronException
schema - The Schematron schema to use.phase - The phase for this schema.SchematronException - Will wrap any exception occurring while attempting to instantiate a validator.