Package com.saxonica.validate

The validation package contains classes used to validate document instances against a schema.

See:
          Description

Interface Summary
Watch A Watch represents a class that is interested in looking at nodes passing down a push pipeline, typically for the purpose of evaluating uniqueness and key constraints.
 

Class Summary
AllElementValidator This class is validator used to check the content of an element whose complex type uses the "xs:all" construction in XML Schema.
AnyTypeValidator Validator to validate an element against the class xs:anyType
AttributeValidator This class is an abstract superclass for all the receivers that do element content validation.
Checker A Checker is a Receiver used to check the content of elements and attributes, especially those that participate in uniqueness, key, and keyref constraints
ComplexContentValidator This class is a filter that is used to validate the content of an element with a complex type.
ConstraintChecker This class handles the checking of Schema-defined unique, key, and keyref constraints.
ContentValidator This class is an abstract superclass for all the validators.
DocumentValidator DocumentValidator checks that a document is well-formed: specifically, that it contains a single element node child and no text node children.
EmptyContentValidator This class is a filter that is used to validate that an element has empty content.
FieldChecker A FieldChecker is instantiated when a field in an identity constraint is matched; it receives notification of all events until the end of the element (or attribute) that matched the selector.
FieldWatch A FieldWatch is a class that is looking for nodes that match a field selector within a uniqueness or key constraint.
IdValidator This class validates that ID elements and attributes have unique values and that IDREF and IDREFS elements and attributes refer to an ID in the same document.
IgnorableWhitespaceStripper The IgnorableWhitespaceStripper removes whitespace text nodes belonging to elements whose schema-defined type defines element-only content
JavaVerifier A helper class for SchemaAwareConfiguration that handles license keys as issued for the Java platform
KeySelectorWatch This class watches the selector for a key or unique constraint
LaxValidator This class performs lax validation on an element.
PlatformVerifier  
RefSelectorWatch This class watches the selector for a keyref constraint
SchemaAwareConfiguration A subclass of Configuration that defines a schema-aware processor.
SchemaAwareConfiguration.SurrogateSchema A SurrogateSchema is a dummy schema object that is stored in the schema cache while the schema for a given namespace is being processed.
SelectorWatch A Watch represents a class that is interested in looking at nodes for the purpose of evaluating uniqueness and key constraints.
SimpleContentValidator This class is a filter that is used to validate that an element has simple content conforming to a given simple type.
StripValidator This class is a filter that passes all Receiver events through unchanged, except that it removes all type annotations from element and attribute nodes.
ValidatingFilter This class is used for a filter on the validation pipeline.
ValidationStack This class manages the receivers that do element content validation.
XSIAttributeHandler This class processes attributes such as xsi:schemaLocation and xsi:type.
 

Package com.saxonica.validate Description

The validation package contains classes used to validate document instances against a schema.

This validation is all performed "on-the-fly", by a collection of classes that implement Saxon's (SAX-like) Receiver interface, which is notified of start/end element events, attributes, and text nodes, as they occur. A pipeline of such classes is used both while processing input documents and while writing output documents, and in both cases, validation classes can be added to the pipeline.

Local validation of elements is controlled using the ValidationStack class, which manages a stack of validators for each element that is currently open. The most interesting of these is the ComplexContentValidator, which makes use of a finite state machine created by compiling a ComplexType in the schema. The finite state machine is represented by the AutomatonState object corresponding to the initial (entry) state of the machine.

Global validation of uniqueness and referential constraints is controlled using the ConstraintChecker class. The maintains a set of Watch classes that are interested in elements matching particular (restricted) XPath expressions. The restricted XPath expression used in XML Schema (which is similar to, but not identical to, an XPath pattern) is represented by a Selection object. Implementations of the Watch class are used to handle the different kinds of constraint that a schema can specify.

None of the classes in this package will normally be used directly by user applications.



Copyright (C) Michael H. Kay. All rights reserved.