Display Option Groups
A group is a decision list. It lists a set of possible presentation
options which configure how a System Model item is displayed. There are five
standard arguments, all of which are optional. Two of the arguments,
match
and use
specify what the presentation options
apply to. The remaining three options, label
, sort
and show-unused
control how the options appear in the legend.
All groups follow the same patterns:
<xxxx match="xpath" use="xpath" label="label" sort="yesno" show-unused="yesno">
<yyyy label="label" …>
<!-- default presentation -->
</yyy>
<yyyy value="value" label="label" …>
<!-- match ‘value’ against expression in ‘use’ -->
</yyyy>
<yyyy rule="rule" variable="xpath" label="label" …>
<!-- evaluate ‘rule' with optional variable -->
</yyyy>
</xxxx>
Options are matched in the order they appear. The first to match is
applied when drawing the System Model item. The following are the three kinds
of matching:
-
The default option is used when no other option matches. There can be
only one default and it can appear in any order in the list of options,
although it appears first for clarity. The default has no value
or
rule
.
-
A rule option matches if the expression in the rule
attribute evaluates to true for the System Model item. An optional variable can
be set to allow more complex matching with a rule.
-
A value option matches when the value attribute matches the value of
the expression in the group’s use
attribute (or the text content
of the item, if use
is not set).The value
and
rule
attributes never appear in the same option. The value
attribute is effectively a shorthand for rule=".='value'"
.