Document toolboxDocument toolbox

Variables Usage

In the Raw XML Editor, use the <Assign variable> element to define and set variables. This statement defines a new variable, if it is not already defined, and assigns the value, in the first child expression, to the variable. The primary supported attribute is 'variable' which names the variable to be assigned the value. Examples:

<PolicyRuleLogic editor='raw-xml'>
<Assign variable='access-list'><Expr variable='_match_1'/></Assign>
<Assign variable='access-class'><Expr op='concat'><Expr value='access-list '/><Expr variable='access-list'/></Expr></Assign>
...

You may define variables with a local scope. In the Assign element, specifying scope of parent sets the scoped variable to the parent of the Assign. This means all descendants of that element will read that variable instead of variables of the same name, that are defined at a higher scope. You may explicitly set a global variable with a scope of root. By default, (without a specified scope, or the scope specified to resolve), an assignment moves up the XML tree and sets the first variable it finds that has the specified name, creating one at the root level if none is found.

When using the output attribute on elements, the scope is always equivalent to resolve.

Match Variable Arrays

To complement existing _match_* variables that are set for regular expression matches, an array _match_array is set that contains the values of numbered match variables. This enables more dynamic scripting.