User Guide

64 Kaspersky Anti-Virus® for Sendmail with Milter API
The scope of visibility of a sub-macro is defined by the start and end tags of the
condition construct:
<FOR _macro_name_parent_ ==
"_value_1">%_macro_name_child_%</FOR>
In the above example, the scope of the macro %_macro_name_parent_%
includes all sublevels (between the FOR tags) if the macro value is overridden
.
7.10.2.4. Variables
Variables provide better flexibility in customizing templates using the Template
language.
A variable can be defined within the specified scope of flexibility as follows:
<DEF _var_name_ = "_const_value_"/>
This variable can be used further as a usual macro without any limitations.
The syntax for a variable definition statement is as follows:
<DEF VNAME VOP VVALUE/>
where:
<DEF – beginning of variable definition statement. The < symbol that is not
the beginning of the statement must be screened (see section 7.10.2.5
on page 66);
VNAME – variable name in the format 1*(nchar)*(nchar); the maximum
length is 64 bytes;
VOP – assignment operation in the format =; the length is 1 byte;
VVALUE – variable value in the format 1*(vchar)*(vchar); the maximum
length is 4096 bytes. The value only works in double quotes. If
compared with a value that has a quote mark inside, use the screening
escape symbol (see section 7.10.2.5 on page 66). Example:
<DEF _value_name_ = "\"_value_1\"
"/>
> – end of the variable definition statement. The > symbol that is not the end
of the variable definition must be screened (see section 7.10.2.5 on
page 66). Unlike the FOR statement, the DEF statement has no body.
Therefore, the tag end bracket should notify the parser that the end tag
is missing.
– separator in the format
*( )*(\t)
nchar – symbols from set a-z, A-Z, 0-9, -, _
vchar – symbols from set nchar, *, ?