Package com.ctc.wstx.dtd
Class StructValidator
- java.lang.Object
-
- com.ctc.wstx.dtd.StructValidator
-
- Direct Known Subclasses:
ChoiceContentSpec.Validator
,DFAValidator
,EmptyValidator
,SeqContentSpec.Validator
,TokenContentSpec.Validator
public abstract class StructValidator extends java.lang.Object
Base class for validator Objects used to validate tree structure of an XML-document against DTD.
-
-
Constructor Summary
Constructors Constructor Description StructValidator()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract java.lang.String
fullyValid()
Method called when the end element of the scope this validator validates is encountered.abstract StructValidator
newInstance()
Method that should be called to get the actual usable validator instance, from the 'template' validator.abstract java.lang.String
tryToValidate(PrefixedName elemName)
Method called when a new (start) element is encountered within the scope of parent element this validator monitors.
-
-
-
Method Detail
-
newInstance
public abstract StructValidator newInstance()
Method that should be called to get the actual usable validator instance, from the 'template' validator.
-
tryToValidate
public abstract java.lang.String tryToValidate(PrefixedName elemName)
Method called when a new (start) element is encountered within the scope of parent element this validator monitors.- Returns:
- Null if element is valid in its current position; error message if not.
-
fullyValid
public abstract java.lang.String fullyValid()
Method called when the end element of the scope this validator validates is encountered. It should make sure that the content model is valid, and if not, to construct an error message.- Returns:
- Null if the content model for the element is valid; error message if not.
-
-