public class ValidatorImpl extends Validator
Modifier and Type | Class and Description |
---|---|
static class |
ValidatorImpl.ErrorListenerWrappingErrorHandler
A JAXP ErrorListener that wraps a SAX ErrorHandler
|
Constructor and Description |
---|
ValidatorImpl(PipelineConfiguration pipe,
PreparedSchema schema)
Create the Validator
|
Modifier and Type | Method and Description |
---|---|
Configuration |
getConfiguration()
Get the underlying Saxon Configuration object
|
ErrorHandler |
getErrorHandler() |
Object |
getProperty(String name)
Look up the value of a property.
|
LSResourceResolver |
getResourceResolver()
Gets the current
LSResourceResolver |
void |
reset() |
void |
setErrorHandler(ErrorHandler errorHandler) |
void |
setProperty(String name,
Object object)
Set the value of a property.
|
void |
setResourceResolver(LSResourceResolver resourceResolver)
Sets the
LSResourceResolver to customize
resource resolution while in a validation episode. |
void |
validate(Source source,
Result result) |
getFeature, setFeature, validate
public ValidatorImpl(PipelineConfiguration pipe, PreparedSchema schema)
pipe
- the pipeline configurationschema
- the schema against which validation takes placepublic void validate(Source source, Result result) throws SAXException, IOException
validate
in class Validator
SAXException
IOException
public void setErrorHandler(ErrorHandler errorHandler)
setErrorHandler
in class Validator
public ErrorHandler getErrorHandler()
getErrorHandler
in class Validator
public void setResourceResolver(LSResourceResolver resourceResolver)
LSResourceResolver
to customize
resource resolution while in a validation episode.setResourceResolver
in class Validator
resourceResolver
- A new resource resolver to be set. This parameter can be null.public LSResourceResolver getResourceResolver()
LSResourceResolver
getResourceResolver
in class Validator
setResourceResolver(org.w3c.dom.ls.LSResourceResolver)
method, or null
if that method has never been calledpublic Configuration getConfiguration()
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException
The property name is any fully-qualified URI. It is
possible for a Validator
to recognize a property name but
temporarily be unable to return its value.
Some property values may be available only in specific
contexts, such as before, during, or after a validation.
Validator
s are not required to recognize any specific
property names.
In the Saxon implementation, the property names that are recognized are the same as the
attribute names recognised by a TransformerFactory
. These are listed as constant fields
in the class FeatureKeys
getProperty
in class Validator
name
- The property name, which is a non-null fully-qualified URI.SAXNotRecognizedException
- If the property
value can't be assigned or retrieved.SAXNotSupportedException
- When the
XMLReader recognizes the property name but
cannot determine its value at this time.NullPointerException
- When the name parameter is null.setProperty(String, Object)
public void setProperty(String name, Object object) throws SAXNotRecognizedException, SAXNotSupportedException
The property name is any fully-qualified URI. It is
possible for a Validator
to recognize a property name but
to be unable to change the current value.
Some property values may be immutable or mutable only
in specific contexts, such as before, during, or after
a validation.
In the Saxon implementation, the property names that are recognized are the same as the
attribute names recognised by a TransformerFactory
. These are listed as constant fields
in the class FeatureKeys
setProperty
in class Validator
name
- The property name, which is a non-null fully-qualified URI.object
- The requested value for the property.SAXNotRecognizedException
- If the property
value can't be assigned or retrieved.SAXNotSupportedException
- When the
Validator
recognizes the property name but
cannot set the requested value.NullPointerException
- When the name parameter is null.Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.