Schema.
A validator object is not thread-safe and not reentrant.
In other words, it is the application's responsibility to make
sure that one Validator object is not used from
more than one thread at any given time, and while the validate
method is invoked, applications may not recursively call
the validate method.
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract ErrorHandler | Returns: This method returns the object that was last set through thesetErrorHandler(ErrorHandler) method, or null
if that method has never been called since this Validator
has created.Gets the current |
| public boolean | Returns: The current value of the feature (true or false).The feature name, which is a non-null fully-qualified URI. name)Look up the value of a feature flag. |
| public Object | Returns: The current value of the property.The property name, which is a non-null fully-qualified URI. name)Look up the value of a property. |
| public abstract LSResourceResolver | Returns: This method returns the object that was last set through thesetResourceResolver(LSResourceResolver) method, or null
if that method has never been called since this Validator
has created.Gets the current |
| public abstract void | |
| public abstract void | setErrorHandler(ErrorHandler
A new error handler to be set. This parameter can be null. errorHandler)Sets the |
| public void | setFeature(String
The feature name, which is a non-null fully-qualified URI. name, boolean The requested value of the feature (true or false). value)Set the value of a feature flag. |
| public void | setProperty(String
The property name, which is a non-null fully-qualified URI. name, Object The requested value for the property. object)Set the value of a property. |
| public abstract void | setResourceResolver(LSResourceResolver
A new resource resolver to be set. This parameter can be null. resourceResolver)Sets the |
| public void | validate(Source
XML to be validated. Must be an XML document or
XML element and must not be null. For backwards compatibility,
the results of attempting to validate anything other than
a document or element are implementation-dependent.
Implementations must either recognize and process the input
or throw an IllegalArgumentException. source)Validates the specified input. |
| public abstract void | validate(Source
XML to be validated. Must be an XML document or
XML element and must not be null. For backwards compatibility,
the results of attempting to validate anything other than
a document or element are implementation-dependent.
Implementations must either recognize and process the input
or throw an IllegalArgumentException. source, Result The result)Result object that receives (possibly augmented)
XML. This parameter can be null if the caller is not interested
in it.
Note that when a DOMResult is used,
a validator might just pass the same DOM node from
DOMSource to DOMResult
(in which case source.getNode()==result.getNode()),
it might copy the entire DOM tree, or it might alter the
node given by the source.Validates the specified input and send the augmented validation result to the specified output. |
| Validator | back to summary |
|---|---|
| protected Validator() Constructor for derived classes. The constructor does nothing. Derived classes must create | |
| getErrorHandler | back to summary |
|---|---|
| public abstract ErrorHandler getErrorHandler() Gets the current
| |
| getFeature | back to summary |
|---|---|
| public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException Look up the value of a feature flag. The feature name is any fully-qualified URI. It is
possible for a Implementors are free (and encouraged) to invent their own features, using names built on their own URIs.
| |
| getProperty | back to summary |
|---|---|
| public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException Look up the value of a property. The property name is any fully-qualified URI. It is
possible for a
Implementors are free (and encouraged) to invent their own properties, using names built on their own URIs.
| |
| getResourceResolver | back to summary |
|---|---|
| public abstract LSResourceResolver getResourceResolver() Gets the current
| |
| reset | back to summary |
|---|---|
| public abstract void reset() Reset this
The reset | |
| setErrorHandler | back to summary |
|---|---|
| public abstract void setErrorHandler(ErrorHandler errorHandler) Sets the
Error handler can be used to customize the error handling process
during a validation. When an
The error handler can abort further validation immediately
by throwing
If any
When the class DraconianErrorHandler implements
When a new
| |
| setFeature | back to summary |
|---|---|
| public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException Set the value of a feature flag.
Feature can be used to control the way a The feature name is any fully-qualified URI. It is
possible for a
| |
| setProperty | back to summary |
|---|---|
| public void setProperty(String name, Object object) throws SAXNotRecognizedException, SAXNotSupportedException Set the value of a property. The property name is any fully-qualified URI. It is
possible for a
All implementations that implement JAXP 1.5 or newer are required to
support the
| |
| setResourceResolver | back to summary |
|---|---|
| public abstract void setResourceResolver(LSResourceResolver resourceResolver) Sets the
When the class DumbLSResourceResolver implements
If a
When a new
| |
| validate | back to summary |
|---|---|
| public void validate(Source source) throws SAXException, IOException Validates the specified input. This is just a convenience method for
| |
| validate | back to summary | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public abstract void validate(Source source, Result result) throws SAXException, IOException Validates the specified input and send the augmented validation result to the specified output. This method places the following restrictions on the types of
the
To validate one Errors found during the validation is sent to the specified
If a document is valid, or if a document contains some errors
but none of them were fatal and the
| |||||||||||||||||||||||||||||||