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

public final Class DTDCdataAttr

extends DTDAttribute
Class Inheritance
Imports
org.codehaus.stax2.validation.XMLValidationException, com.ctc.wstx.sr.InputProblemReporter, com.ctc.wstx.util.PrefixedName

Simple DTDAttribute sub-class used for plain vanilla CDATA valued attributes. Although base class implements most of the methods, it's better designwise to keep that base class abstract and have separate CDATA type as well.

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
DTDCdataAttr(PrefixedName name, DefaultAttrValue defValue, int specIndex, boolean nsAware, boolean xml11)

Method Summary

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

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

public String
normalize(DTDValidatorBase
Validator that invoked normalization
v
,
char[] cbuf, int start, int end)

Overrides com.ctc.wstx.dtd.DTDAttribute.normalize.

Method called when no validation is to be done, but value is still to be normalized as much as it can.

public void
normalizeDefault()

Overrides com.ctc.wstx.dtd.DTDAttribute.normalizeDefault.

Method called to do initial normalization of the default attribute value, without trying to verify its validity.

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

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

public void
validateDefault(InputProblemReporter rep, boolean normalize)

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

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

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

Constructor Detail

DTDCdataAttrback to summary
public DTDCdataAttr(PrefixedName name, DefaultAttrValue defValue, int specIndex, boolean nsAware, boolean xml11)

Method Detail

cloneWithback to summary
public DTDAttribute cloneWith(int specIndex)

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

Annotations
@Override
normalizeback to summary
public String normalize(DTDValidatorBase v, char[] cbuf, int start, int end)

Overrides com.ctc.wstx.dtd.DTDAttribute.normalize.

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

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

Parameters
v:DTDValidatorBase

Validator that invoked normalization

Returns:String

Normalized value as a String, if any changes were done; null if input was normalized

Annotations
@Override
normalizeDefaultback to summary
public void normalizeDefault()

Overrides com.ctc.wstx.dtd.DTDAttribute.normalizeDefault.

Doc from com.ctc.wstx.dtd.DTDAttribute.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.

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

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

Annotations
@Override
validateDefaultback to summary
public void validateDefault(InputProblemReporter rep, boolean normalize) throws XMLStreamException

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

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

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

Annotations
@Override