| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final char | |
| protected final boolean | |
| protected final boolean | |
| protected final DefaultAttrValue | |
| protected final PrefixedName | |
| protected final int | mSpecialIndex
Index number amongst "special" attributes (required ones, attributes that have default values), if attribute is one: -1 if not. |
| pack-priv static final String[] | sTypes
Array that has String constants matching above mentioned value types |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int |
| Access | Constructor and Description |
|---|---|
| public | DTDAttribute(PrefixedName name, DefaultAttrValue defValue, int specIndex, boolean nsAware, boolean xml11)
|
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| public abstract DTDAttribute | |
| protected EntityDecl | |
| public final String | |
| public final PrefixedName | |
| public final int | |
| public int | getValueType()
Returns the value type of this attribute as an enumerated int to match type (CDATA, ...) Note: |
| public String | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | isSpecial()
Method used by the element to figure out if attribute needs "special" checking; basically if it's required, and/or has a default value. |
| public final boolean | |
| public String | Returns: Normalized value as a String, if any changes were done; null if input was normalizedValidator that invoked normalization v, char[] cbuf, int start, int end)Method called when no validation is to be done, but value is still to be normalized as much as it can. |
| public void | normalizeDefault()
Method called to do initial normalization of the default attribute value, without trying to verify its validity. |
| protected String | |
| protected String | |
| protected String | reportValidationProblem(InputProblemReporter rep, String msg)
Method called during parsing of DTD schema, to report a problem. |
| public final String | |
| public boolean | |
| public boolean | |
| public abstract String | |
| public String | validate(DTDValidatorBase v, String value, boolean normalize)
Note the default implementation is not optimized, as it does a potentially unnecessary copy of the contents. |
| public abstract void | validateDefault(InputProblemReporter rep, boolean normalize)
Method called by the |
| protected String | |
| protected String | |
| protected String | |
| public String | validateEnumValue(char[] cbuf, int start, int end, boolean normalize, WordResolver res)
Method called by validation/normalization code for enumeration-valued attributes, to trim specified attribute value (full normalization not needed -- called for values that CAN NOT have spaces inside; such values can not be legal), and then check whether it is included in set of words (tokens) passed in. If actual value was included, will return the normalized word (as well as store shared String locally); otherwise will return null. |
| CHAR_SPACE | back to summary |
|---|---|
| pack-priv static final char CHAR_SPACE | |
| mCfgNsAware | back to summary |
|---|---|
| protected final boolean mCfgNsAware | |
| mCfgXml11 | back to summary |
|---|---|
| protected final boolean mCfgXml11 | |
| mDefValue | back to summary |
|---|---|
| protected final DefaultAttrValue mDefValue | |
| mName | back to summary |
|---|---|
| protected final PrefixedName mName | |
| mSpecialIndex | back to summary |
|---|---|
| protected final int mSpecialIndex Index number amongst "special" attributes (required ones, attributes that have default values), if attribute is one: -1 if not. | |
| sTypes | back to summary |
|---|---|
| pack-priv static final String[] sTypes Array that has String constants matching above mentioned value types | |
| TYPE_CDATA | back to summary |
|---|---|
| public static final int TYPE_CDATA | |
| TYPE_ENTITIES | back to summary |
|---|---|
| public static final int TYPE_ENTITIES | |
| TYPE_ENTITY | back to summary |
|---|---|
| public static final int TYPE_ENTITY | |
| TYPE_ENUMERATED | back to summary |
|---|---|
| public static final int TYPE_ENUMERATED | |
| TYPE_ID | back to summary |
|---|---|
| public static final int TYPE_ID | |
| TYPE_IDREF | back to summary |
|---|---|
| public static final int TYPE_IDREF | |
| TYPE_IDREFS | back to summary |
|---|---|
| public static final int TYPE_IDREFS | |
| TYPE_NMTOKEN | back to summary |
|---|---|
| public static final int TYPE_NMTOKEN | |
| TYPE_NMTOKENS | back to summary |
|---|---|
| public static final int TYPE_NMTOKENS | |
| TYPE_NOTATION | back to summary |
|---|---|
| public static final int TYPE_NOTATION | |
| DTDAttribute | back to summary |
|---|---|
| public DTDAttribute(PrefixedName name, DefaultAttrValue defValue, int specIndex, boolean nsAware, boolean xml11) | |
| checkEntity | back to summary |
|---|---|
| protected void checkEntity(InputProblemReporter rep, String id, EntityDecl ent) throws XMLStreamException | |
| cloneWith | back to summary |
|---|---|
| public abstract DTDAttribute cloneWith(int specIndex) | |
| findEntityDecl | back to summary |
|---|---|
| protected EntityDecl findEntityDecl(DTDValidatorBase v, char[] ch, int start, int len) throws XMLStreamException | |
| getDefaultValue | back to summary |
|---|---|
| public final String getDefaultValue(ValidationContext ctxt, XMLValidator dtd) throws XMLStreamException | |
| getName | back to summary |
|---|---|
| public final PrefixedName getName() | |
| getSpecialIndex | back to summary |
|---|---|
| public final int getSpecialIndex() | |
| getValueType | back to summary |
|---|---|
| public int getValueType() Returns the value type of this attribute as an enumerated int to match type (CDATA, ...) Note: | |
| getValueTypeString | back to summary |
|---|---|
| public String getValueTypeString() | |
| hasDefaultValue | back to summary |
|---|---|
| public final boolean hasDefaultValue() | |
| isFixed | back to summary |
|---|---|
| public final boolean isFixed() | |
| isRequired | back to summary |
|---|---|
| public final boolean isRequired() | |
| isSpecial | back to summary |
|---|---|
| public final boolean isSpecial() Method used by the element to figure out if attribute needs "special" checking; basically if it's required, and/or has a default value. In both cases missing the attribute has specific consequences, either exception or addition of a default value. | |
| needsValidation | back to summary |
|---|---|
| public final boolean needsValidation() | |
| normalize | back to summary |
|---|---|
| public String normalize(DTDValidatorBase v, char[] cbuf, int start, int end) Method called when no validation is to be done, but value is still to be normalized as much as it can. What this usually means is that all regular space (parser earlier on converts other white space to spaces, except for specific character entities; and these special cases are NOT to be normalized). The only exception is that CDATA will not do any normalization. But for now, let's implement basic functionality that CDTA instance will override
| |
| normalizeDefault | back to summary |
|---|---|
| public void normalizeDefault() Method called to do initial normalization of the default attribute value, without trying to verify its validity. Thus, it's called independent of whether we are fully validating the document. | |
| reportInvalidChar | back to summary |
|---|---|
| protected String reportInvalidChar(DTDValidatorBase v, char c, String msg) throws XMLStreamException | |
| reportValidationProblem | back to summary |
|---|---|
| protected String reportValidationProblem(DTDValidatorBase v, String msg) throws XMLStreamException | |
| reportValidationProblem | back to summary |
|---|---|
| protected String reportValidationProblem(InputProblemReporter rep, String msg) throws XMLStreamException Method called during parsing of DTD schema, to report a problem. Note that unlike during actual validation, we have no option of just gracefully listing problems and ignoring them; an exception is always thrown. | |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| typeIsId | back to summary |
|---|---|
| public boolean typeIsId() | |
| typeIsNotation | back to summary |
|---|---|
| public boolean typeIsNotation() | |
| validate | back to summary |
|---|---|
| public abstract String validate(DTDValidatorBase v, char[] cbuf, int start, int end, boolean normalize) throws XMLStreamException | |
| validate | back to summary |
|---|---|
| public String validate(DTDValidatorBase v, String value, boolean normalize) throws XMLStreamException Note the default implementation is not optimized, as it does a potentially unnecessary copy of the contents. It is expected that this method is seldom called (Woodstox never directly calls it; it only gets called for chained validators when one validator normalizes the value, and then following validators are passed a String, not char array) | |
| validateDefault | back to summary |
|---|---|
| public abstract void validateDefault(InputProblemReporter rep, boolean normalize) throws XMLStreamException Method called by the | |
| validateDefaultName | back to summary |
|---|---|
| protected String validateDefaultName(InputProblemReporter rep, boolean normalize) throws XMLStreamException | |
| validateDefaultNames | back to summary |
|---|---|
| protected String validateDefaultNames(InputProblemReporter rep, boolean normalize) throws XMLStreamException | |
| validateDefaultNmToken | back to summary |
|---|---|
| protected String validateDefaultNmToken(InputProblemReporter rep, boolean normalize) throws XMLStreamException | |
| validateEnumValue | back to summary |
|---|---|
| public String validateEnumValue(char[] cbuf, int start, int end, boolean normalize, WordResolver res) Method called by validation/normalization code for enumeration-valued attributes, to trim specified attribute value (full normalization not needed -- called for values that CAN NOT have spaces inside; such values can not be legal), and then check whether it is included in set of words (tokens) passed in. If actual value was included, will return the normalized word (as well as store shared String locally); otherwise will return null. | |