Package com.ctc.wstx.dtd
Class DTDEntityAttr
java.lang.Object
com.ctc.wstx.dtd.DTDAttribute
com.ctc.wstx.dtd.DTDEntityAttr
Specific attribute class for attributes that contain (unique)
identifiers.
-
Field Summary
Fields inherited from class com.ctc.wstx.dtd.DTDAttribute
CHAR_SPACE, mCfgNsAware, mCfgXml11, mDefValue, mName, mSpecialIndex, sTypes, TYPE_CDATA, TYPE_ENTITIES, TYPE_ENTITY, TYPE_ENUMERATED, TYPE_ID, TYPE_IDREF, TYPE_IDREFS, TYPE_NMTOKEN, TYPE_NMTOKENS, TYPE_NOTATION
-
Constructor Summary
ConstructorsConstructorDescriptionDTDEntityAttr
(PrefixedName name, DefaultAttrValue defValue, int specIndex, boolean nsAware, boolean xml11) Main constructor. -
Method Summary
Modifier and TypeMethodDescriptioncloneWith
(int specIndex) int
Returns the value type of this attribute as an enumerated int to match type (CDATA, ...)validate
(DTDValidatorBase v, char[] cbuf, int start, int end, boolean normalize) Method called by theDTDValidatorBase
to let the attribute do necessary normalization and/or validation for the value.void
validateDefault
(InputProblemReporter rep, boolean normalize) Method called by the validator object to ask attribute to verify that the default it has (if any) is valid for such type.Methods inherited from class com.ctc.wstx.dtd.DTDAttribute
checkEntity, findEntityDecl, getDefaultValue, getName, getSpecialIndex, getValueTypeString, hasDefaultValue, isFixed, isRequired, isSpecial, needsValidation, normalize, normalizeDefault, reportInvalidChar, reportValidationProblem, reportValidationProblem, toString, typeIsId, typeIsNotation, validate, validateDefaultName, validateDefaultNames, validateDefaultNmToken, validateEnumValue
-
Constructor Details
-
DTDEntityAttr
public DTDEntityAttr(PrefixedName name, DefaultAttrValue defValue, int specIndex, boolean nsAware, boolean xml11) Main constructor. Note that id attributes can never have default values.
-
-
Method Details
-
cloneWith
- Specified by:
cloneWith
in classDTDAttribute
-
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 classDTDAttribute
-
validate
public String validate(DTDValidatorBase v, char[] cbuf, int start, int end, boolean normalize) throws XMLStreamException Method called by theDTDValidatorBase
to let the attribute do necessary normalization and/or validation for the value.- Specified by:
validate
in classDTDAttribute
- Throws:
XMLStreamException
-
validateDefault
Method called by the validator object to ask attribute to verify that the default it has (if any) is valid for such type.- Specified by:
validateDefault
in classDTDAttribute
- Throws:
XMLStreamException
-