com.thaiopensource.relaxng
Interface Schema

All Known Implementing Classes:
AbstractSchema

public interface Schema

A schema that can be used to validate an XML document. A single Schema object is safe for concurrent access by multiple threads.

Author:
James Clark
See Also:
AbstractSchema, SchemaFactory

Method Summary
 ValidatorHandler createValidator()
          Creates a new ValidatorHandler that validates XML documents against this schema.
 ValidatorHandler createValidator(ErrorHandler eh)
          Creates a new ValidatorHandler that validates XML documents against this schema.
 

Method Detail

createValidator

public ValidatorHandler createValidator(ErrorHandler eh)
Creates a new ValidatorHandler that validates XML documents against this schema. The ValidatorHandler will report errors using the specified ErrorHandler. The ErrorHandler of the created ValidatorHandler may be changed at any time using setErrorHandler.

Parameters:
eh - the ErrorHandler to be used by the ValidatorHandler for reporting errors; null if errors should not be reported
Returns:
a new ValidatorHandler that can be used to validate an XML document against this schema; never null

createValidator

public ValidatorHandler createValidator()
Creates a new ValidatorHandler that validates XML documents against this schema. The ValidatorHandler will have a null ErrorHandler, which may be changed at any time using setErrorHandler.

Returns:
a new ValidatorHandler that can be used to validate an XML document against this schema; never null