Attribute Names

These formats describe the creation of common attribute names.

Modified Attributes

When the secure template system looks for a modified attribute of name, it will seek out one of the following forms (see Chapter 17 for details):

  1. [prefix]name[suffix]
  2. useparent-name
  3. useparent*

prefix

suffix

Match Order

  1. prefix-name-suffix
  2. *name-suffix
  3. prefix-name*
  4. *name*
  5. name

Examples:

alt-unit2

*type-B1

Attribute Values

These rules describe the construction of attribute values.

State Attributes (Chapter 25)

Pick among values based on the current state.

Basic syntax

rule

states

Example:

1:value1;2-4:value2;5:;default

Transition Rules (Chapter 25)

These rules (usually values in a State Attribute) tell a header what state to enter.

rule

function

Examples:

3-2

state1,state2,state3

push() 5-1

State Lists

State lists evaluate to true if the header's state fits all of the listed rules

Basic syntax

rule

Examples:

0-1,3

!2-4;1-10

Boolean

Boolean attributes generally follow the same rules as boolean values in Lua: everything but false or nil is considered logically false. Sometimes for attributes, though, evaluating to an empty strings is interpreted as false. See Chapters 17, 25 & 26.