Values XML Files
The Values XML files are used to define default and per-item display
properties. You can use a values XML file to define colors, patterns, border
shapes, or border styles of the system model items.
For information about how to define new values for border shapes, colors or
patterns, see
Customizing the System Model Presentation
.
There are four types of Values XML files:
Syntax
All Values XML files share the same basic syntax
<?xml version="1.0"?>
<values default="presentation-value" label="label for legend section" rank="item-type-list" id-namespace="uri"
namespaces
>
<item
label="label for legend" value="
presentation-value">
<m ref="id"/>
<m ref="id"/>
<m ref="id"/>
</item>
<item
>
</item>
</values>
In the preceding syntax, the root element values
contains any number of
item
tags. The various attributes for the values
tag are:
-
rank="item-type-list"
: Space-separated list of the ranks (component
, collection
, package
or layer
) of items the default
value applies to.
Any system model item of the listed rank not listed in the values file will get the default
presentation value.
The (default) special value of *
indicates this file applies to all ranks.
-
default="presentation-value"
: Defines the
default presentation value for the system model item. This default value gets assigned to
the system model items of the specified rank to which no specific value is assigned.
-
label="label for legend section"
: Defines the label that will precede the legend section.
-
id-namespace="uri"
: The default namespace for all ref
attributes in the XML file. Has the same meaning, usage and default value as id-namespace
in the System Definition.
-
namespaces
: Any namespace declaration should be done in the root element. ID references can use namespace prefixes to associate with system model items. See Namespacing names in the System Definition specification.
Each item
tag can have the following attributes:
-
label="label for legend"
: Defines the label for the legend.
-
value="presentation-value"
: Defines the presentation
value for the item (color, border shape, etc). This presentation value gets assigned to all the referenced system model items that are
listed within that item
element.
The item
tag also contains m
tags to reference the IDs of system model items.
Everything referenced in an
item
tag has the same presentation value. The following is the basic syntax for m
:
<m ref="id"/>
Where id is a reference to the ID of a system model item
defined in a system definition file. Note: while most presentation values can apply to anything, only components can be given a border shape.