public final class AttributeDefinition extends PropertySet implements Comparable<AttributeDefinition>
ProfileSet
).Modifier and Type | Field and Description |
---|---|
static AttributeDefinition[] |
EMPTY_LIST
A ready-to-use empty array of
AttributeDefinition s. |
Name |
name
Name of this attribute.
|
char |
separator
The character used to separate multiple values.
|
String[] |
styles
For each value specified in
values , some CSS styles
which are added to elements having this attribute with the corresponding
value. |
String[] |
values
Allowed values for this attribute.
|
properties
Constructor and Description |
---|
AttributeDefinition(Name name,
String[] values,
String[] styles,
char separator)
Constructs an attribute definition initialized using specified items.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkValue(String value)
Check specified attribute value against this definition.
|
int |
compareTo(AttributeDefinition other) |
getProperties, getProperty, getPropertyCount, hasProperty, putProperties, putProperty, removeAllProperties, removeProperty
public final Name name
public final String[] values
public final String[] styles
public char separator
Use '\0'
to specify that multiple values are not allowed
for this attribute.
DocBook example: multiple values separated by ";" are normally allowed. However, for our business case and for attribute security, something like security="public;restricted" does not make sense and should be reported by the XML editor as an error.
public static final AttributeDefinition[] EMPTY_LIST
AttributeDefinition
s.public int compareTo(AttributeDefinition other)
compareTo
in interface Comparable<AttributeDefinition>
public boolean checkValue(String value)
value
- attribute value to be checkedtrue
if the value complies to this defintion;
false
otherwise