Defines a new variable. The variable can then be referenced by any expression within and below the containing expression in which the variable was defined. The variable must be given a name using the XML attribute name.
A defvar statement should not reference itself. If it does, it will cause a loop.
Avoid the following constructions.
<defvar name=’fullname’> <ref>fullname</ref> </defvar>
or
<defvar name=’counter’/> <add><ref>counter</ref> <i>0</i> </add> </defvar>
The following expression defines a variable and initializes its value to a list of two elements.
<defvar name=’theList’> <list> <s>apples</s> <s>oranges</s> </list> </defvar>
The following expression defines a variable and initializes its value to the integer zero.
<defvar name=’counter’> <i>0</i> </defvar>