XMLValidator; the class that
handles DTD-based validation.
| Modifier and Type | Field and Description |
|---|---|
| protected boolean | |
| 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 BitSet | mTmpSpecialAttrs
Reusable lazily instantiated BitSet; needed to keep track of missing 'special' attributes (required ones, ones with default values) |
| protected StructValidator[] | mValidators
Stack of validators for open elements |
| Access | Constructor and Description |
|---|---|
| public | DTDValidator(DTDSubset schema, ValidationContext ctxt, boolean hasNsDefaults, Map<PrefixedName, DTDElement> elemSpecs, Map<String, EntityDecl> genEntities)
|
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected ElementIdMap | |
| public final boolean | |
| public String | validateAttribute(String localName, String uri, String prefix, String value)
Implements abstract com. 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.). |
| public String | validateAttribute(String localName, String uri, String prefix, char[]
Character array that contains value (possibly
along with some other text) valueChars, int Index of the first character of the value in
in valueStart, int valueChars arrayIndex of the character AFTER the last character;
so that the length of the value String is
valueEnd)valueEnd - valueStartImplements abstract com. 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.). |
| public int | validateElementAndAttributes()
Implements abstract com. Method called after calling |
| public int | Returns: Validation state that should be effective for the parent element stateImplements abstract com. Method called right after encountering an element close tag. |
| public void | validateElementStart(String localName, String uri, String prefix)
Implements abstract com. Method called to update information about the newly encountered (start) element. |
| public void | validationCompleted(boolean
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). eod)Implements abstract com. 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). |
| mCurrHasAnyFixed | back to summary |
|---|---|
| protected boolean mCurrHasAnyFixed | |
| mCurrSpecialAttrs | back to summary |
|---|---|
| protected BitSet mCurrSpecialAttrs Bitset used for keeping track of required and defaulted attributes for which values have been found. | |
| mIdMap | back to summary |
|---|---|
| protected ElementIdMap mIdMap Information about declared and referenced element ids (unique ids that attributes may defined, as defined by DTD) | |
| mReportDuplicateErrors | back to summary |
|---|---|
| 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. | |
| mTmpSpecialAttrs | back to summary |
|---|---|
| protected BitSet mTmpSpecialAttrs Reusable lazily instantiated BitSet; needed to keep track of missing 'special' attributes (required ones, ones with default values) | |
| mValidators | back to summary |
|---|---|
| protected StructValidator[] mValidators Stack of validators for open elements | |
| DTDValidator | back to summary |
|---|---|
| public DTDValidator(DTDSubset schema, ValidationContext ctxt, boolean hasNsDefaults, Map<PrefixedName, DTDElement> elemSpecs, Map<String, EntityDecl> genEntities) | |
| checkIdRefs | back to summary |
|---|---|
| protected void checkIdRefs() throws XMLStreamException | |
| getIdMap | back to summary |
|---|---|
| protected ElementIdMap getIdMap() Implements abstract com.
| |
| reallyValidating | back to summary |
|---|---|
| public final boolean reallyValidating() Implements abstract com.
| |
| validateAttribute | back to summary |
|---|---|
| public String validateAttribute(String localName, String uri, String prefix, String value) throws XMLStreamException Implements abstract com. Doc from org. 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.).
| |
| validateAttribute | back to summary |
|---|---|
| public String validateAttribute(String localName, String uri, String prefix, char[] valueChars, int valueStart, int valueEnd) throws XMLStreamException Implements abstract com. Doc from org. 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.).
| |
| validateElementAndAttributes | back to summary |
|---|---|
| public int validateElementAndAttributes() throws XMLStreamException Implements abstract com. Doc from org. Method called after calling
| |
| validateElementEnd | back to summary |
|---|---|
| public int validateElementEnd(String localName, String uri, String prefix) throws XMLStreamException Implements abstract com. Doc from org. Method called right after encountering an element close tag.
| |
| validateElementStart | back to summary |
|---|---|
| public void validateElementStart(String localName, String uri, String prefix) throws XMLStreamException Implements abstract com. Method called to update information about the newly encountered (start) element. At this point namespace information has been resolved, but no DTD validation has been done. Validator is to do these validations, including checking for attribute value (and existence) compatibility.
| |
| validationCompleted | back to summary |
|---|---|
| public void validationCompleted(boolean eod) throws XMLStreamException Implements abstract com. Doc from org. 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).
| |