Package com.ctc.wstx.dtd
Class SeqContentSpec.Validator
java.lang.Object
com.ctc.wstx.dtd.StructValidator
com.ctc.wstx.dtd.SeqContentSpec.Validator
- Enclosing class:
SeqContentSpec
Simple validator that can be used if all components of a sequence
are leaf nodes, ie. elements with no explicit arity modifiers.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final char
(package private) final PrefixedName[]
(package private) int
Number of full repetitions done over the sequence(package private) int
Expected next element in the sequence -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static final String
concatNames
(PrefixedName[] names) private String
expElem
(int step) Method called when the end element of the scope this validator validates is encountered.Sequence content specification is always stateful; can not use a shared instance...tryToValidate
(PrefixedName elemName) Method called when a new (start) element is encountered within the scope of parent element this validator monitors.
-
Field Details
-
mArity
final char mArity -
mNames
-
mRounds
int mRoundsNumber of full repetitions done over the sequence -
mStep
int mStepExpected next element in the sequence
-
-
Constructor Details
-
Validator
-
-
Method Details
-
newInstance
Sequence content specification is always stateful; can not use a shared instance... so let's create new instance:- Specified by:
newInstance
in classStructValidator
-
tryToValidate
Description copied from class:StructValidator
Method called when a new (start) element is encountered within the scope of parent element this validator monitors.- Specified by:
tryToValidate
in classStructValidator
- Returns:
- Null if element is valid in its current position; error message if not.
-
fullyValid
Description copied from class:StructValidator
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.- Specified by:
fullyValid
in classStructValidator
- Returns:
- Null if the content model for the element is valid; error message if not.
-
expElem
-
concatNames
-