Package com.ctc.wstx.dtd
Class EmptyValidator
java.lang.Object
com.ctc.wstx.dtd.StructValidator
com.ctc.wstx.dtd.EmptyValidator
Simple content model validator that accepts no elements, ever; this
is true for pure #PCDATA content model as well as EMPTY content model.
Can be used as a singleton, since all info needed for diagnostics
is passed via methods.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final String(package private) static final EmptyValidator(package private) static final EmptyValidator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIf we ever get as far as element closing, things are all good; can just return null.static EmptyValidatorstatic EmptyValidatorSimple; can always (re)use instance itself; no state information is kept.tryToValidate(PrefixedName elemName) Method called when a new (start) element is encountered within the scope of parent element this validator monitors.
-
Field Details
-
sPcdataInstance
-
sEmptyInstance
-
mErrorMsg
-
-
Constructor Details
-
EmptyValidator
-
-
Method Details
-
getPcdataInstance
-
getEmptyInstance
-
newInstance
Simple; can always (re)use instance itself; no state information is kept.- Specified by:
newInstancein classStructValidator
-
tryToValidate
Description copied from class:StructValidatorMethod called when a new (start) element is encountered within the scope of parent element this validator monitors.- Specified by:
tryToValidatein classStructValidator- Returns:
- Null if element is valid in its current position; error message if not.
-
fullyValid
If we ever get as far as element closing, things are all good; can just return null.- Specified by:
fullyValidin classStructValidator- Returns:
- Null if the content model for the element is valid; error message if not.
-