com.ctc.wstx.dtd
public class DTDTypingNonValidator extends DTDValidatorBase
Modifier and Type | Field and Description |
---|---|
protected java.util.BitSet |
mCurrDefaultAttrs
Bitset used for keeping track of defaulted attributes for which values
have been found.
|
protected boolean |
mHasAttrDefaults
Flag that indicates if current element has any attributes that
have default values.
|
protected boolean |
mHasNormalizableAttrs
Flag that indicates whether any of the attributes is potentially
normalizable, and we are in attribute-normalizing mode.
|
EMPTY_MAP, mAttrCount, mAttrSpecs, mCurrAttrDefs, mCurrElem, mElemCount, mElems, mIdAttrIndex, mNormAttrs, mTmpKey
CONTENT_ALLOW_ANY_TEXT, CONTENT_ALLOW_NONE, CONTENT_ALLOW_UNDEFINED, CONTENT_ALLOW_VALIDATABLE_TEXT, CONTENT_ALLOW_WS, CONTENT_ALLOW_WS_NONSTRICT
Constructor and Description |
---|
DTDTypingNonValidator(DTDSubset schema,
ValidationContext ctxt,
boolean hasNsDefaults,
java.util.Map elemSpecs,
java.util.Map genEntities) |
Modifier and Type | Method and Description |
---|---|
protected ElementIdMap |
getIdMap() |
boolean |
reallyValidating() |
void |
setAttrValueNormalization(boolean state)
This 'validator' will not normalize any attributes,
so let's implement this as no-op.
|
java.lang.String |
validateAttribute(java.lang.String localName,
java.lang.String uri,
java.lang.String prefix,
char[] valueChars,
int valueStart,
int valueEnd)
Callback method called on validator to give it a chance to validate
the value of an attribute, as well as to normalize its value if
appropriate (remove leading/trailing/intervening white space for
certain token types etc.).
|
java.lang.String |
validateAttribute(java.lang.String localName,
java.lang.String uri,
java.lang.String prefix,
java.lang.String value)
Callback method called on validator to give it a chance to validate
the value of an attribute, as well as to normalize its value if
appropriate (remove leading/trailing/intervening white space for
certain token types etc.).
|
int |
validateElementAndAttributes()
Method called after calling
XMLValidator.validateAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String) on all
attributes (if any), but before starting to handle element
content. |
int |
validateElementEnd(java.lang.String localName,
java.lang.String uri,
java.lang.String prefix)
Method called right after encountering an element close tag.
|
void |
validateElementStart(java.lang.String localName,
java.lang.String uri,
java.lang.String prefix)
Method called to update information about the newly encountered (start)
element.
|
void |
validationCompleted(boolean eod)
Method called when the validation is completed; either due to the
input stream ending, or due to an explicit 'stop validation' request
by the application (via context object).
|
checkNsDefaults, doAddDefaultValue, doReportValidationProblem, getAttributeType, getIdAttrIndex, getNotationAttrIndex, getSchema, hasNsDefaults, mayHaveNsDefaults, validateText, validateText
getSchemaType
protected boolean mHasAttrDefaults
protected java.util.BitSet mCurrDefaultAttrs
protected boolean mHasNormalizableAttrs
public DTDTypingNonValidator(DTDSubset schema, ValidationContext ctxt, boolean hasNsDefaults, java.util.Map elemSpecs, java.util.Map genEntities)
public final boolean reallyValidating()
reallyValidating
in class DTDValidatorBase
public void setAttrValueNormalization(boolean state)
setAttrValueNormalization
in class DTDValidatorBase
public void validateElementStart(java.lang.String localName, java.lang.String uri, java.lang.String prefix) throws javax.xml.stream.XMLStreamException
DTDValidatorBase
validateElementStart
in class DTDValidatorBase
javax.xml.stream.XMLStreamException
public java.lang.String validateAttribute(java.lang.String localName, java.lang.String uri, java.lang.String prefix, java.lang.String value) throws javax.xml.stream.XMLStreamException
XMLValidator
validateAttribute
in class DTDValidatorBase
javax.xml.stream.XMLStreamException
public java.lang.String validateAttribute(java.lang.String localName, java.lang.String uri, java.lang.String prefix, char[] valueChars, int valueStart, int valueEnd) throws javax.xml.stream.XMLStreamException
XMLValidator
validateAttribute
in class DTDValidatorBase
valueChars
- Character array that contains value (possibly
along with some other text)valueStart
- Index of the first character of the value in
in valueChars
arrayvalueEnd
- Index of the character AFTER the last character;
so that the length of the value String is
valueEnd - valueStart
javax.xml.stream.XMLStreamException
public int validateElementAndAttributes() throws javax.xml.stream.XMLStreamException
XMLValidator
XMLValidator.validateAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
on all
attributes (if any), but before starting to handle element
content.validateElementAndAttributes
in class DTDValidatorBase
CONTENT_ALLOW_
constants, to indicate
what kind of textual content is allowed at the scope returned
to after the element has closed.javax.xml.stream.XMLStreamException
public int validateElementEnd(java.lang.String localName, java.lang.String uri, java.lang.String prefix) throws javax.xml.stream.XMLStreamException
XMLValidator
validateElementEnd
in class DTDValidatorBase
javax.xml.stream.XMLStreamException
public void validationCompleted(boolean eod)
XMLValidator
validationCompleted
in class DTDValidatorBase
eod
- Flag that indicates whether this method was called by the
context due to the end of the stream (true); or by an application
requesting end of validation (false).protected ElementIdMap getIdMap()
getIdMap
in class DTDValidatorBase