|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Schema
The Schema
interface defines an abstraction of a schema usable to
validate an XML document.
This interface is not tied to any specific validation grammar language such as the W3C XML Shema language or the RELAX-NG language.
Selection and use of specific schema grammar languages is performed through
the use of the Validator
interface.
Once returned by the SchemaParser
, a Schema
instance must be
able to validate a number of XML documents: each time a document needs to be
validated, a new ValidationHandler
can be obtained invoking the
createValidator(ErrorHandler)
method. While validating an XML document,
SAXException
s should be thrown back to the caller only when the specified
ErrorHandler
is configured to do so.
Method Summary | |
---|---|
ValidationHandler |
createValidator(ErrorHandler handler)
Return a new ValidationHandler instance that can be used to
validate an XML document by sending SAX events to it. |
SourceValidity |
getValidity()
Return the SourceValidity associated with this Schema . |
Method Detail |
---|
SourceValidity getValidity()
Return the SourceValidity
associated with this Schema
.
If the schema represented by this instance was parsed from several sources
(through the use of inclusions or referencing to external entities, for
example) the SourceValidity
returned by this method must
consider all of them when the SourceValidity.isValid()
or the
SourceValidity.isValid(SourceValidity)
methods are called.
SourceValidity
instance or null if not known.ValidationHandler createValidator(ErrorHandler handler) throws SAXException
Return a new ValidationHandler
instance that can be used to
validate an XML document by sending SAX events to it.
The specified ErrorHandler
will be notified of all warnings or
errors encountered validating the SAX events sent to the returned
ValidationHandler
, and must not be null.
The returned ValidationHandler
can be used to validate only
one XML document. To validate more than one document, this method should
be called once for each document to validate.
handler
- an ErrorHandler
to notify of validation errors.
ValidationHandler
instance.
SAXException
- if an error occurred creating the validation handler.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |