<var/> represents a variable.
It has “name”, “type”
and “mutable” attributes. Optionally, dependent on “type”, it
might have “value” attribute as well. If variable is “mutable”,
it will have constraints (constraints depend on “type”).
Besides
constraints, conditionals can be present as well:
- If a variable
has an if_bool=”bool_var_name” attribute, it is to be used only if
boolean variable named “bool_var_name” is set to “true”.
- If a variable has an ifnot_bool=”bool_var_name” attribute, it is to
be used only if boolean variable named “bool_var_name” is set to
“false”.
Types:
int
Integer will be the value of attribute “value”.
If mutable=”true”, constraints:
min (attribute)
max (attribute)
step (attribute)
int_select
List of valid integer values. Current selection will be under “value” attribute.
If mutable=”true”, valid values will be attached to <var/> as <listentry value=”...”/>.
string
String will be the value of attribute “value”.
If mutable=”true”, constraints:
min_length (attribute)
max_length (attribute)
illegal_chars (attribute)
reserved_words (attribute) is a “;” separated list of reserved words
string_select
List of valid string values. Current selection will be under “value” attribute.
If mutable=”true”, valid values will be attached to <var/> as <listentry value=”...”/>.
boolean
Boolean will be the value of attribute “value”. It can be one of “true” or “false”.
There is no constraints.
xml
XML will be attached to the <var/>.
There is no constraints.
list_str
List of string values. List elements will be attached to <var/> as <listentry value=”value”/>
If mutable=”true”, constraints will be the same as for “string” plus min_list_size and max_list_size
list_int
List of integer values. List elements will be attached to <var/> as <listentry value=”value”/>
If mutable=”true”, constraints will be the same as for “int” plus min_list_size and max_list_size
list_xml
List of XML values. List elements will be attached to <var/>.
If mutable=”true”, constraints will be min_list_size and max_list_size
list_var
List of variables. List elements will be attached to <var/>.
If mutable=”true”, constraints will be min_list_size and max_list_size