* #### setContentHandler
public abstract void setContentHandler([ContentHandler](../../../org/xml/sax/ContentHandler.html "interface in org.xml.sax") receiver)
Sets the [ContentHandler](../../../org/xml/sax/ContentHandler.html "interface in org.xml.sax") which receives the augmented validation result.
When a [ContentHandler](../../../org/xml/sax/ContentHandler.html "interface in org.xml.sax") is specified, a[ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation") will work as a filter and basically copy the incoming events to the specified [ContentHandler](../../../org/xml/sax/ContentHandler.html "interface in org.xml.sax").
In doing so, a [ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation") may modify the events, for example by adding defaulted attributes.
A [ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation") may buffer events to certain extent, but to allow [ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation") to be used by a parser, the following requirement has to be met.
1. When[ContentHandler.startElement(String, String, String, Attributes)](../../../org/xml/sax/ContentHandler.html#startElement-java.lang.String-java.lang.String-java.lang.String-org.xml.sax.Attributes-),[ContentHandler.endElement(String, String, String)](../../../org/xml/sax/ContentHandler.html#endElement-java.lang.String-java.lang.String-java.lang.String-),[ContentHandler.startDocument()](../../../org/xml/sax/ContentHandler.html#startDocument--), or[ContentHandler.endDocument()](../../../org/xml/sax/ContentHandler.html#endDocument--) are invoked on a [ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation"), the same method on the user-specified [ContentHandler](../../../org/xml/sax/ContentHandler.html "interface in org.xml.sax") must be invoked for the same event before the callback returns.
2. [ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation") may not introduce new elements that were not present in the input.
3. [ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation") may not remove attributes that were present in the input.
When a callback method on the specified [ContentHandler](../../../org/xml/sax/ContentHandler.html "interface in org.xml.sax") throws an exception, the same exception object must be thrown from the [ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation"). The [ErrorHandler](../../../org/xml/sax/ErrorHandler.html "interface in org.xml.sax") should not be notified of such an exception.
This method can be called even during a middle of a validation.
Parameters:
`receiver` \- A [ContentHandler](../../../org/xml/sax/ContentHandler.html "interface in org.xml.sax") or a null value.
* #### getContentHandler
public abstract [ContentHandler](../../../org/xml/sax/ContentHandler.html "interface in org.xml.sax") getContentHandler()
Gets the [ContentHandler](../../../org/xml/sax/ContentHandler.html "interface in org.xml.sax") which receives the augmented validation result.
Returns:
This method returns the object that was last set through the [getContentHandler()](../../../javax/xml/validation/ValidatorHandler.html#getContentHandler--) method, or null if that method has never been called since this [ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation") has created.
See Also:
[setContentHandler(ContentHandler)](../../../javax/xml/validation/ValidatorHandler.html#setContentHandler-org.xml.sax.ContentHandler-)
* #### setErrorHandler
public abstract void setErrorHandler([ErrorHandler](../../../org/xml/sax/ErrorHandler.html "interface in org.xml.sax") errorHandler)
Parameters:
`errorHandler` \- A new error handler to be set. This parameter can be null.
* #### getErrorHandler
public abstract [ErrorHandler](../../../org/xml/sax/ErrorHandler.html "interface in org.xml.sax") getErrorHandler()
Returns:
This method returns the object that was last set through the [setErrorHandler(ErrorHandler)](../../../javax/xml/validation/ValidatorHandler.html#setErrorHandler-org.xml.sax.ErrorHandler-) method, or null if that method has never been called since this [ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation") has created.
See Also:
[setErrorHandler(ErrorHandler)](../../../javax/xml/validation/ValidatorHandler.html#setErrorHandler-org.xml.sax.ErrorHandler-)
* #### setResourceResolver
public abstract void setResourceResolver([LSResourceResolver](../../../org/w3c/dom/ls/LSResourceResolver.html "interface in org.w3c.dom.ls") resourceResolver)
Parameters:
`resourceResolver` \- A new resource resolver to be set. This parameter can be null.
* #### getResourceResolver
public abstract [LSResourceResolver](../../../org/w3c/dom/ls/LSResourceResolver.html "interface in org.w3c.dom.ls") getResourceResolver()
Returns:
This method returns the object that was last set through the [setResourceResolver(LSResourceResolver)](../../../javax/xml/validation/ValidatorHandler.html#setResourceResolver-org.w3c.dom.ls.LSResourceResolver-) method, or null if that method has never been called since this [ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation") has created.
See Also:
[setErrorHandler(ErrorHandler)](../../../javax/xml/validation/ValidatorHandler.html#setErrorHandler-org.xml.sax.ErrorHandler-)
* #### getTypeInfoProvider
public abstract [TypeInfoProvider](../../../javax/xml/validation/TypeInfoProvider.html "class in javax.xml.validation") getTypeInfoProvider()
Obtains the [TypeInfoProvider](../../../javax/xml/validation/TypeInfoProvider.html "class in javax.xml.validation") implementation of this[ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation").
The obtained [TypeInfoProvider](../../../javax/xml/validation/TypeInfoProvider.html "class in javax.xml.validation") can be queried during a parse to access the type information determined by the validator.
Some schema languages do not define the notion of type, for those languages, this method may not be supported. However, to be compliant with this specification, implementations for W3C XML Schema 1.0 must support this operation.
Returns:
null if the validator / schema language does not support the notion of [TypeInfo](../../../org/w3c/dom/TypeInfo.html "interface in org.w3c.dom"). Otherwise a non-null valid [TypeInfoProvider](../../../javax/xml/validation/TypeInfoProvider.html "class in javax.xml.validation").
* #### getFeature
public boolean getFeature([String](../../../java/lang/String.html "class in java.lang") name)
throws [SAXNotRecognizedException](../../../org/xml/sax/SAXNotRecognizedException.html "class in org.xml.sax"),
[SAXNotSupportedException](../../../org/xml/sax/SAXNotSupportedException.html "class in org.xml.sax")
Look up the value of a feature flag.
The feature name is any fully-qualified URI. It is possible for a [ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation") to recognize a feature name but temporarily be unable to return its value. Some feature values may be available only in specific contexts, such as before, during, or after a validation.
Implementors are free (and encouraged) to invent their own features, using names built on their own URIs.
Parameters:
`name` \- The feature name, which is a non-null fully-qualified URI.
Returns:
The current value of the feature (true or false).
Throws:
`[SAXNotRecognizedException](../../../org/xml/sax/SAXNotRecognizedException.html "class in org.xml.sax")` \- If the feature value can't be assigned or retrieved.
`[SAXNotSupportedException](../../../org/xml/sax/SAXNotSupportedException.html "class in org.xml.sax")` \- When the[ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation") recognizes the feature name but cannot determine its value at this time.
`[NullPointerException](../../../java/lang/NullPointerException.html "class in java.lang")` \- When `name` is `null`.
See Also:
[setFeature(String, boolean)](../../../javax/xml/validation/ValidatorHandler.html#setFeature-java.lang.String-boolean-)
* #### setFeature
public void setFeature([String](../../../java/lang/String.html "class in java.lang") name,
boolean value)
throws [SAXNotRecognizedException](../../../org/xml/sax/SAXNotRecognizedException.html "class in org.xml.sax"),
[SAXNotSupportedException](../../../org/xml/sax/SAXNotSupportedException.html "class in org.xml.sax")
Set a feature for this `ValidatorHandler`.
Feature can be used to control the way a[ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation") parses schemas. The feature name is any fully-qualified URI. It is possible for a[SchemaFactory](../../../javax/xml/validation/SchemaFactory.html "class in javax.xml.validation") to expose a feature value but to be unable to change the current value. Some feature values may be immutable or mutable only in specific contexts, such as before, during, or after a validation.
All implementations are required to support the [XMLConstants.FEATURE\_SECURE\_PROCESSING](../../../javax/xml/XMLConstants.html#FEATURE%5FSECURE%5FPROCESSING) feature. When the feature is:
* `true`: the implementation will limit XML processing to conform to implementation limits. Examples include entity expansion limits and XML Schema constructs that would consume large amounts of resources. If XML processing is limited for security reasons, it will be reported via a call to the registered[ErrorHandler.fatalError(SAXParseException exception)](../../../org/xml/sax/ErrorHandler.html#fatalError-org.xml.sax.SAXParseException-). See [setErrorHandler(ErrorHandler errorHandler)](../../../javax/xml/validation/ValidatorHandler.html#setErrorHandler-org.xml.sax.ErrorHandler-).
* `false`: the implementation will processing XML according to the XML specifications without regard to possible implementation limits.
Parameters:
`name` \- The feature name, which is a non-null fully-qualified URI.
`value` \- The requested value of the feature (true or false).
Throws:
`[SAXNotRecognizedException](../../../org/xml/sax/SAXNotRecognizedException.html "class in org.xml.sax")` \- If the feature value can't be assigned or retrieved.
`[SAXNotSupportedException](../../../org/xml/sax/SAXNotSupportedException.html "class in org.xml.sax")` \- When the[ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation") recognizes the feature name but cannot set the requested value.
`[NullPointerException](../../../java/lang/NullPointerException.html "class in java.lang")` \- When `name` is `null`.
See Also:
[getFeature(String)](../../../javax/xml/validation/ValidatorHandler.html#getFeature-java.lang.String-)
* #### setProperty
public void setProperty([String](../../../java/lang/String.html "class in java.lang") name,
[Object](../../../java/lang/Object.html "class in java.lang") object)
throws [SAXNotRecognizedException](../../../org/xml/sax/SAXNotRecognizedException.html "class in org.xml.sax"),
[SAXNotSupportedException](../../../org/xml/sax/SAXNotSupportedException.html "class in org.xml.sax")
Set the value of a property.
The property name is any fully-qualified URI. It is possible for a [ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation") 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.
[ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation")s are not required to recognize setting any specific property names.
Parameters:
`name` \- The property name, which is a non-null fully-qualified URI.
`object` \- The requested value for the property.
Throws:
`[SAXNotRecognizedException](../../../org/xml/sax/SAXNotRecognizedException.html "class in org.xml.sax")` \- If the property value can't be assigned or retrieved.
`[SAXNotSupportedException](../../../org/xml/sax/SAXNotSupportedException.html "class in org.xml.sax")` \- When the[ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation") recognizes the property name but cannot set the requested value.
`[NullPointerException](../../../java/lang/NullPointerException.html "class in java.lang")` \- When `name` is `null`.
* #### getProperty
public [Object](../../../java/lang/Object.html "class in java.lang") getProperty([String](../../../java/lang/String.html "class in java.lang") name)
throws [SAXNotRecognizedException](../../../org/xml/sax/SAXNotRecognizedException.html "class in org.xml.sax"),
[SAXNotSupportedException](../../../org/xml/sax/SAXNotSupportedException.html "class in org.xml.sax")
Look up the value of a property.
The property name is any fully-qualified URI. It is possible for a [ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation") 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.
[ValidatorHandler](../../../javax/xml/validation/ValidatorHandler.html "class in javax.xml.validation")s are not required to recognize any specific property names.
Implementors are free (and encouraged) to invent their own properties, using names built on their own URIs.
Parameters:
`name` \- The property name, which is a non-null fully-qualified URI.
Returns:
The current value of the property.
Throws:
`[SAXNotRecognizedException](../../../org/xml/sax/SAXNotRecognizedException.html "class in org.xml.sax")` \- If the property value can't be assigned or retrieved.
`[SAXNotSupportedException](../../../org/xml/sax/SAXNotSupportedException.html "class in org.xml.sax")` \- When the XMLReader recognizes the property name but cannot determine its value at this time.
`[NullPointerException](../../../java/lang/NullPointerException.html "class in java.lang")` \- When `name` is `null`.
See Also:
[setProperty(String, Object)](../../../javax/xml/validation/ValidatorHandler.html#setProperty-java.lang.String-java.lang.Object-)