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 AttributeValues.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.SafeValuesNested 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
ConstructorsModifierConstructorDescriptionprotectedprotectedNmTokensAttribute(@Opt String value) protectedNmTokensAttribute(@Opt List<String> value) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckValue(@Opt List<String> values) Check routine for the validity of the attributes' intended value.(package private) final voiddecode(DecodingInputStream in, TypedExtension ext) DOCMEfinal voidencode(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 booleanOverridden 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, setValueMethods 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
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 valuenullmeans "absent" for#IMPLIEDattributes and passes the test.- Specified by:
checkValuein 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
The definition text for the "type" of the attribute in the original DTD.- Specified by:
getTypeStringin classTypedAttribute<List<String>>
-
mustBeNameToken
protected boolean mustBeNameToken()Overridden by subclass.- Returns:
- whether the stronger rule for Name (not NmToken) must be applied.
-
splitValues
Used from extern as auxiliary method. The definition [XML 1.0] production rule [8] requires exactly one space (= character 0x20) between tokens, and tokens must be at least one character long. But this method accepts space, tab, newline, and return as separator.FIXME the current impl gives strange diagnosis for multiple adjacent separators, as in
att="b⎵⎵⎵c". -
encode
DOCME- Specified by:
encodein classTypedNode<TypedExtension>- Throws:
IOException
-
decode
final void decode(DecodingInputStream in, TypedExtension ext) throws IOException, TdomAttributeSyntaxException DOCME- Specified by:
decodein classTypedAttribute<List<String>>- Throws:
IOExceptionTdomAttributeSyntaxException
-
findSplit
DOCME -
getStringValue
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:
getStringValuein 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.
-