Applying a Group to a System Definition Element

Syntax: <xxxx match="xpath" …>

Example: <colors type="highlight" match="collection|block" label="Types of Changes"> … </colors>

The match attribute defines which element in the system definition the group applies to. For some groups, the only valid value is component, but <colors> and <styles> groups can be applied to anything. In these cases, the value of match can be any valid XPath expression that matches one or more of the system definition elements, component, collection, sub-block, block, or layer. For example, the following table provides the syntax and the corresponding description:

SyntaxDescription

<xxxx match="component">

Matches only components.

<xxxx match="*">

Matches any item.

<xxxx>

Matches only components.

<xxxx match="*[@levels]">

matches any item with defined levels.

Match for a group

Syntax: <xxxx use="xpath" …>

Example: <borders use="s12/@osd" label="Sched 12 Category"> … </borders>

The match attribute specifies which system definition items the options apply to, use attribute specifies the properties of the item the rules use to select options. The use attribute specifies an XPath location relative to the matching element (for example, component) and is compared against the option value or rule attribute to determine the matching options.

By default, use=".". For example, for match="component" and use="s12/@osd", the matching option is determined by evaluation all value and rule attributes against the osd attribute in the following:

<component>
<s12 osd="osd"/> …

Legend properties for a group

Syntax: <xxxx … label="legend-label" sort="yesno" show-unused="yesno">

Example: <borders use="s12/@osd" label="Sched 12 Category" sort="yes"> … </borders>

Use: Defines how display options are shown in the legend.

There are three attributes which fine-tune the display of how the display options appear in the legend.

If label is present, it will specify the text that appears to the left of the section. If not present, no space will be allocated for the label, i.e. the first item will appear flush against the last item in the previous group, as if they were in the same group.

The sort attribute is a Boolean, which, if yes, indicates that items in the legend must be sorted alphabetically by label. If not present or no, items will appear in the order listed in the Shapes XML file.

The Boolean show-unused attribute controls whether display options not used in the System Model will appear in the legend. The default is for unused options to avoid generating anything in the legend. For example, if no and one of the options for a component border is not used, that example border will not be drawn in the legend.