com.ctc.wstx.dtd
Class DTDTypedAttr
java.lang.Object
com.ctc.wstx.dtd.DTDAttribute
com.ctc.wstx.dtd.DTDTypedAttr
- public final class DTDTypedAttr
- extends DTDAttribute
Specific attribute class for attributes that are neither basic CDATA
attributes nor enumerated attributes. This generally means that they
do need to be normalized, and have some additional value restrictions.
| Fields inherited from class com.ctc.wstx.dtd.DTDAttribute |
DEF_DEFAULT, DEF_FIXED, DEF_IMPLIED, DEF_REQUIRED, mDefValue, mDefValueType, mName, mSpecialIndex, TYPE_CDATA, TYPE_ENTITIES, TYPE_ENTITY, TYPE_ENUMERATED, TYPE_ID, TYPE_IDREF, TYPE_IDREFS, TYPE_NMTOKEN, TYPE_NMTOKENS, TYPE_NOTATION |
|
Constructor Summary |
DTDTypedAttr(NameKey name,
int defValueType,
java.lang.String defValue,
int specIndex,
int valueType)
|
| Methods inherited from class com.ctc.wstx.dtd.DTDAttribute |
checkEntity, findEntityDecl, getDefaultType, getDefaultValue, getName, getSpecialIndex, getValueTypeString, isFixed, isRequired, isSpecial, isSpecial, needsValidation, reportInvalidChar, reportParseError, reportParseError, toString, typeIsId, typeIsNotation, validateDefaultName, validateDefaultNames, validateDefaultNmToken |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DTDTypedAttr
public DTDTypedAttr(NameKey name,
int defValueType,
java.lang.String defValue,
int specIndex,
int valueType)
cloneWith
public DTDAttribute cloneWith(int specIndex)
- Overrides:
cloneWith in class DTDAttribute
getValueType
public int getValueType()
- Description copied from class:
DTDAttribute
- Returns the value type of this attribute as an enumerated int
to match type (CDATA, ...)
Note:
- Overrides:
getValueType in class DTDAttribute
validate
public void validate(ElementValidator v,
boolean normalize,
AttributeCollector ac,
int index)
throws WstxException
- Method called by the
ElementValidator
to let the attribute do necessary normalization and/or validation
for the value.
- Overrides:
validate in class DTDAttribute
- Throws:
WstxException
validateDefault
public void validateDefault(InputProblemReporter rep,
boolean normalize)
throws WstxException
- Method called by the
ElementValidator
to ask attribute to verify that the default it has (if any) is
valid for such type.
- Overrides:
validateDefault in class DTDAttribute
- Throws:
WstxException