com.thaiopensource.validate.Schema Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wicketstuff-jing Show documentation
Show all versions of wicketstuff-jing Show documentation
Jing is a validator for RELAX NG and other schema languages. This
project was taken from http://code.google.com/p/jing-trang and
mavenized for inclusion in the Wicket Stuff HTML Validator.
The code was taken from the 20091111 release.
package com.thaiopensource.validate;
import com.thaiopensource.util.PropertyMap;
/**
* A schema that can be used to validate an XML document. A single Schema
object
* is safe for concurrent access by multiple threads.
*
* @see SchemaReader
* @see Validator
*
* @author James Clark
*/
public interface Schema {
/**
* Creates a new Validator
that can be used to validate XML documents with
* respect to this schema. The PropertyMap
should contain a
* ValidateProperty.ERROR_HANDLER
property, which will be
* used to report errors. If it does not, then an ErrorHandler
* will be used that ignores warnings and throws its argument on errors and fatal errors.
* Common properties are defined in ValidateProperty
. Implementations
* may support additional properties.
*
* @param properties a PropertyMap
specifying the properties of the
* Validator
to be created
* @return a new Validator
that can be used to validate an XML document
* with respect to this schema; never null
*
* @see ValidateProperty#ERROR_HANDLER
*/
Validator createValidator(PropertyMap properties);
PropertyMap getProperties();
}