Top Description Fields Constructors Methods
com.ctc.wstx.dtd

public final Class DTDIdAttr

extends DTDAttribute
Class Inheritance
Imports
javax.xml.stream.Location, .XMLStreamException, com.ctc.wstx.cfg.ErrorConsts, com.ctc.wstx.io.WstxInputData, com.ctc.wstx.sr.InputProblemReporter, com.ctc.wstx.util.ElementId, .ElementIdMap, .PrefixedName

Specific attribute class for attributes that contain (unique) identifiers.

Field Summary

Inherited from com.ctc.wstx.dtd.DTDAttribute:
CHAR_SPACEmCfgNsAwaremCfgXml11mDefValuemNamemSpecialIndexsTypesTYPE_CDATATYPE_ENTITIESTYPE_ENTITYTYPE_ENUMERATEDTYPE_IDTYPE_IDREFTYPE_IDREFSTYPE_NMTOKENTYPE_NMTOKENSTYPE_NOTATION

Constructor Summary

AccessConstructor and Description
public
DTDIdAttr(PrefixedName name, DefaultAttrValue defValue, int specIndex, boolean nsAware, boolean xml11)

Main constructor.

Method Summary

Modifier and TypeMethod and Description
public DTDAttribute
cloneWith(int specIndex)

Implements abstract com.ctc.wstx.dtd.DTDAttribute.cloneWith.

public int
getValueType()

Overrides com.ctc.wstx.dtd.DTDAttribute.getValueType.

Returns the value type of this attribute as an enumerated int to match type (CDATA, ...)

Note:

public boolean
public String
validate(DTDValidatorBase v, char[] cbuf, int start, int end, boolean normalize)

Implements abstract com.ctc.wstx.dtd.DTDAttribute.validate.

Method called by the validator to let the attribute do necessary normalization and/or validation for the value.

public void
validateDefault(InputProblemReporter rep, boolean normalize)

Implements abstract com.ctc.wstx.dtd.DTDAttribute.validateDefault.

Method called by the validator to ask attribute to verify that the default it has (if any) is valid for such type.

Inherited from com.ctc.wstx.dtd.DTDAttribute:
checkEntityfindEntityDeclgetDefaultValuegetNamegetSpecialIndexgetValueTypeStringhasDefaultValueisFixedisRequiredisSpecialneedsValidationnormalizenormalizeDefaultreportInvalidCharreportValidationProblemreportValidationProblemtoStringtypeIsNotationvalidatevalidateDefaultNamevalidateDefaultNamesvalidateDefaultNmTokenvalidateEnumValue

Constructor Detail

DTDIdAttrback to summary
public DTDIdAttr(PrefixedName name, DefaultAttrValue defValue, int specIndex, boolean nsAware, boolean xml11)

Main constructor. Note that id attributes can never have default values.

Note

although ID attributes are not to have default value, this is 'only' a validity constraint, and in dtd-aware-but- not-validating mode it is apparently 'legal' to add default values.

Method Detail

cloneWithback to summary
public DTDAttribute cloneWith(int specIndex)

Implements abstract com.ctc.wstx.dtd.DTDAttribute.cloneWith.

Annotations
@Override
getValueTypeback to summary
public int getValueType()

Overrides com.ctc.wstx.dtd.DTDAttribute.getValueType.

Doc from com.ctc.wstx.dtd.DTDAttribute.getValueType.

Returns the value type of this attribute as an enumerated int to match type (CDATA, ...)

Note:

Annotations
@Override
typeIsIdback to summary
public boolean typeIsId()

Overrides com.ctc.wstx.dtd.DTDAttribute.typeIsId.

Annotations
@Override
validateback to summary
public String validate(DTDValidatorBase v, char[] cbuf, int start, int end, boolean normalize) throws XMLStreamException

Implements abstract com.ctc.wstx.dtd.DTDAttribute.validate.

Method called by the validator to let the attribute do necessary normalization and/or validation for the value.

Annotations
@SuppressWarnings:cast
@Override
validateDefaultback to summary
public void validateDefault(InputProblemReporter rep, boolean normalize)

Implements abstract com.ctc.wstx.dtd.DTDAttribute.validateDefault.

Method called by the validator to ask attribute to verify that the default it has (if any) is valid for such type.

Annotations
@Override