Package eu.bandm.tools.tdom.runtime
Class NmTokensAttribute
java.lang.Object
eu.bandm.tools.tdom.runtime.TypedNode<TypedExtension>
eu.bandm.tools.tdom.runtime.TypedAttribute<List<String>>
eu.bandm.tools.tdom.runtime.NmTokensAttribute
- Direct Known Subclasses:
Element_enumset.Attr_default
,IdRefsAttribute
Implements an Attribute of "
NMTOKENS
" type, which holds as its
value a list of NMTOKEN tokens separated by blanks.
See [XML 1.0],
"3.3.1 Attribute Types" and production rule [8].
See NmTokenAttribute.checkNmToken(String)
and
splitValues(String)
for details of these definitions.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.bandm.tools.tdom.runtime.TypedAttribute
TypedAttribute.__PreAtts, TypedAttribute.SafeValues
Nested classes/interfaces inherited from class eu.bandm.tools.tdom.runtime.TypedNode
TypedNode.ParseListener<E extends TypedElement<?,
?>> -
Field Summary
Fields inherited from class eu.bandm.tools.tdom.runtime.TypedAttribute
__preAtts, emptyAttributes, mutable, safeValues, specified, value
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
NmTokensAttribute
(@Opt String value) protected
NmTokensAttribute
(@Opt List<String> value) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkValue
(@Opt List<String> values) Check routine for the validity of the attributes' intended value.(package private) final void
decode
(DecodingInputStream in, TypedExtension ext) DOCMEfinal void
encode
(EncodingOutputStream out, TypedExtension ext) DOCMEfindSplit
(Attributes attrs, NamespaceName name) DOCMEgetStringValue
(@Opt List<String> v) Returns the textual representation of a possible attribute value (not null), as it would be contained literally in a possible XML text representation.The definition text for the "type" of the attribute in the original DTD.protected boolean
Overridden by subclass.splitValues
(@Opt String text) Used from extern as auxiliary method.Methods inherited from class eu.bandm.tools.tdom.runtime.TypedAttribute
assertSetAttrValid, assertSetAttrValid, checkRequired, clearValue, find, find, getDefaultValue, getLocalName, getNamespaceName, getNamespaceURI, getStringValue, getTagName, getValue, isFixed, isOptional, isRequired, isSpecified, makeUnspecified, put, setValue
Methods inherited from class eu.bandm.tools.tdom.runtime.TypedNode
asBigDecimal, asBigDecimal, asBigDecimal, asBigDecimal, asBigInteger, asBigInteger, asBigInteger, asBigInteger, asBoolean, asBoolean, asDouble, asDouble, asDouble, asDouble, asFloat, asFloat, asFloat, asFloat, asHexInt, asHexInt, asHexInt, asHexInt, asInt, asInt, asInt, asInt, asLong, asLong, asLong, asLong, asTrimmedString, asTrimmedString, asTrimmedString, asTrimmedString, checkPlus, checkPlus, checkStar, checkStar, checkStrict, encode, encodeOptional, encodePlus, encodePlus, encodeStar, encodeStar, extractEthereals, getLocation, getPCData, setLocation, setLocation, setLocation
-
Constructor Details
-
NmTokensAttribute
protected NmTokensAttribute() -
NmTokensAttribute
- Throws:
TdomAttributeSyntaxException
-
NmTokensAttribute
- Throws:
TdomAttributeSyntaxException
-
-
Method Details
-
checkValue
Description copied from class:TypedAttribute
Check routine for the validity of the attributes' intended value. Is a call-back, implemented by the sub-classes. Is called only here, by two constructors and theTypedAttribute.setValue(V)
method. The valuenull
means "absent" for#IMPLIED
attributes and passes the test.- Specified by:
checkValue
in classTypedAttribute<List<String>>
- Parameters:
values
- the value to test; maybe null.- Throws:
TdomAttributeSyntaxException
- iff the value does not match the type of the XML attribute, including a forbidden Null.
-
getTypeString
Description copied from class:TypedAttribute
The definition text for the "type" of the attribute in the original DTD.- Specified by:
getTypeString
in classTypedAttribute<List<String>>
-
mustBeNameToken
protected boolean mustBeNameToken()Overridden by subclass. -
splitValues
Used from extern as auxiliary method. The definiton [XML 1.0], production rule [8] requires EXACTLY ONE SPACE between tokens, and tokens must be at least one character long.FIXME the current impl gives strange diagnosis for more blanks, as in
att="b⎵⎵⎵c"
. -
encode
DOCME- Specified by:
encode
in classTypedNode<TypedExtension>
- Throws:
IOException
-
decode
final void decode(DecodingInputStream in, TypedExtension ext) throws IOException, TdomAttributeSyntaxException DOCME- Specified by:
decode
in classTypedAttribute<List<String>>
- Throws:
IOException
TdomAttributeSyntaxException
-
findSplit
DOCME -
getStringValue
Description copied from class:TypedAttribute
Returns the textual representation of a possible attribute value (not null), as it would be contained literally in a possible XML text representation. Since the textual representation of a String is the string itself, this method is relevant for enumeration types only (Later: also for "entity" types, but these are not yet supported.)- Specified by:
getStringValue
in classTypedAttribute<List<String>>
- Returns:
- (never null) the textual representation of this attribute value, as it would be contained literally in a possible XML text representation.
-