Package com.ctc.wstx.dtd
Class DTDNotationAttr
- java.lang.Object
-
- com.ctc.wstx.dtd.DTDAttribute
-
- com.ctc.wstx.dtd.DTDNotationAttr
-
public final class DTDNotationAttr extends DTDAttribute
Specific attribute class for attributes that are of NOTATION type, and also contain enumerated set of legal values.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) WordResolver
mEnumValues
-
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
Constructors Constructor Description DTDNotationAttr(PrefixedName name, DefaultAttrValue defValue, int specIndex, boolean nsAware, boolean xml11, WordResolver enumValues)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DTDAttribute
cloneWith(int specIndex)
int
getValueType()
Returns the value type of this attribute as an enumerated int to match type (CDATA, ...)boolean
typeIsNotation()
java.lang.String
validate(DTDValidatorBase v, char[] cbuf, int start, int end, boolean normalize)
Method called by the validator to let the attribute do necessary normalization and/or validation for the value.void
validateDefault(InputProblemReporter rep, boolean normalize)
Method called by the validator 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, validate, validateDefaultName, validateDefaultNames, validateDefaultNmToken, validateEnumValue
-
-
-
-
Field Detail
-
mEnumValues
final WordResolver mEnumValues
-
-
Constructor Detail
-
DTDNotationAttr
public DTDNotationAttr(PrefixedName name, DefaultAttrValue defValue, int specIndex, boolean nsAware, boolean xml11, WordResolver enumValues)
-
-
Method Detail
-
cloneWith
public DTDAttribute cloneWith(int specIndex)
- 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
-
typeIsNotation
public boolean typeIsNotation()
- Overrides:
typeIsNotation
in classDTDAttribute
-
validate
public java.lang.String validate(DTDValidatorBase v, char[] cbuf, int start, int end, boolean normalize) throws javax.xml.stream.XMLStreamException
Method called by the validator to let the attribute do necessary normalization and/or validation for the value.Note: identical to the implementation in
DTDEnumAttr
- Specified by:
validate
in classDTDAttribute
- Throws:
javax.xml.stream.XMLStreamException
-
validateDefault
public void validateDefault(InputProblemReporter rep, boolean normalize) throws javax.xml.stream.XMLStreamException
Method called by the validator to ask attribute to verify that the default it has (if any) is valid for such type.- Specified by:
validateDefault
in classDTDAttribute
- Throws:
javax.xml.stream.XMLStreamException
-
-