public final class ValidatorFactory
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ValidatorFactory.QueryBinding |
| Constructor and Description |
|---|
ValidatorFactory()
Constructs a new factory using the default preprocessor.
|
ValidatorFactory(javax.xml.transform.Source preprocessor)
Constructs a new factory object using the specified preprocessor.
|
ValidatorFactory(ValidatorFactory.QueryBinding binding,
java.lang.String formatter)
Constructs a new ValidatorFactory object using the specified preprocessor.
|
| Modifier and Type | Method and Description |
|---|---|
javax.xml.transform.ErrorListener |
getErrorListener()
Get the error event handler for this factory.
|
java.lang.Object |
getParameter(java.lang.String name)
Returns the parameters value for hte specified name.
|
Validator |
newValidator(java.io.File schema)
Process the specified schema into a Validator object.
|
Validator |
newValidator(javax.xml.transform.Source schema)
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 |
setParameter(java.lang.String name,
java.lang.Object value)
Add a parameter to be sent to the preprocessor.
|
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 ValidatorFactory()
public ValidatorFactory(javax.xml.transform.Source preprocessor)
preprocessor - The preprocessor which generates the validating stylesheet.java.lang.NullPointerException - If preprocessor is null.public ValidatorFactory(ValidatorFactory.QueryBinding binding, java.lang.String formatter)
Actually, this is not necessary.
Future versions may remove this so that only the SVRL is output.
preprocessor - The preprocessor which generates the validating stylesheet.java.lang.IllegalArgumentException - If preprocessor is null.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 setParameter(java.lang.String name,
java.lang.Object value)
name - The name of the parameter.value - The value object.Transformer.setParameter(String, Object)public java.lang.Object getParameter(java.lang.String name)
nameThe - name of the parameter.null if the parameter was not specified.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.TransformerExceptionShould - an exception be while attempting to instantiate a validator.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.