public class DTDValidator extends DTDValidatorBase
XMLValidator
; the class that
handles DTD-based validation.Modifier and Type | Field and Description |
---|---|
protected BitSet |
mCurrSpecialAttrs
Bitset used for keeping track of required and defaulted attributes
for which values have been found.
|
protected ElementIdMap |
mIdMap
Information about declared and referenced element ids (unique
ids that attributes may defined, as defined by DTD)
|
protected boolean |
mReportDuplicateErrors
Determines if identical problems (definition of the same element,
for example) should cause multiple error notifications or not:
if true, will get one error per instance, if false, only the first
one will get reported.
|
protected StructValidator[] |
mValidators
Stack of validators for open elements
|
EMPTY_MAP, mAttrCount, mAttrSpecs, mCurrAttrDefs, mCurrElem, mElemCount, mElems, mIdAttrIndex, mNormAttrs, mTmpKey, NO_ATTRS
Constructor and Description |
---|
DTDValidator(DTDSubset schema,
org.codehaus.stax2.validation.ValidationContext ctxt,
boolean hasNsDefaults,
Map<PrefixedName,DTDElement> elemSpecs,
Map<String,EntityDecl> genEntities) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkIdRefs() |
protected ElementIdMap |
getIdMap() |
boolean |
reallyValidating() |
String |
validateAttribute(String localName,
String uri,
String prefix,
char[] valueChars,
int valueStart,
int valueEnd) |
String |
validateAttribute(String localName,
String uri,
String prefix,
String value) |
int |
validateElementAndAttributes() |
int |
validateElementEnd(String localName,
String uri,
String prefix) |
void |
validateElementStart(String localName,
String uri,
String prefix)
Method called to update information about the newly encountered (start)
element.
|
void |
validationCompleted(boolean eod) |
checkNsDefaults, doAddDefaultValue, doReportValidationProblem, getAttributeType, getIdAttrIndex, getNotationAttrIndex, getSchema, hasNsDefaults, mayHaveNsDefaults, setAttrValueNormalization, validateText, validateText
protected boolean mReportDuplicateErrors
protected ElementIdMap mIdMap
protected StructValidator[] mValidators
protected BitSet mCurrSpecialAttrs
public DTDValidator(DTDSubset schema, org.codehaus.stax2.validation.ValidationContext ctxt, boolean hasNsDefaults, Map<PrefixedName,DTDElement> elemSpecs, Map<String,EntityDecl> genEntities)
public final boolean reallyValidating()
reallyValidating
in class DTDValidatorBase
public void validateElementStart(String localName, String uri, String prefix) throws XMLStreamException
validateElementStart
in class DTDValidatorBase
XMLStreamException
public String validateAttribute(String localName, String uri, String prefix, String value) throws XMLStreamException
validateAttribute
in class DTDValidatorBase
XMLStreamException
public String validateAttribute(String localName, String uri, String prefix, char[] valueChars, int valueStart, int valueEnd) throws XMLStreamException
validateAttribute
in class DTDValidatorBase
XMLStreamException
public int validateElementAndAttributes() throws XMLStreamException
validateElementAndAttributes
in class DTDValidatorBase
XMLStreamException
public int validateElementEnd(String localName, String uri, String prefix) throws XMLStreamException
validateElementEnd
in class DTDValidatorBase
XMLStreamException
public void validationCompleted(boolean eod) throws XMLStreamException
validationCompleted
in class DTDValidatorBase
XMLStreamException
protected ElementIdMap getIdMap()
getIdMap
in class DTDValidatorBase
protected void checkIdRefs() throws XMLStreamException
XMLStreamException
Copyright © 2012–2015 FasterXML. All rights reserved.