1 Answers

Here is a small example of how to use variables in XMLP rtf layout:

Declaring the Variable R

<?xdoxslt:get_variable($_XDOCTX, ‘R’)?>

Declaring the Variable R and Assigning the Values 4 to R

<?xdoxslt:set_variable($_XDOCTX, ‘R’, 4)?>

Get the Variable value

<?xdoxslt:get_variable($_XDOCTX, ‘R’)?>

This adds 5 to variable R and displays it

<?xdoxslt:set_variable($_XDOCTX, ‘R’, xdoxslt:get_variable($_XDOCTX, ‘R’)+5)?>

This subtracting 2 to varaible R and displays it

<?xdoxslt:set_variable($_XDOCTX, ‘R’, xdoxslt:get_variable($_XDOCTX, ‘R’)-2)?>

Similarly U can use any mathematical Operation to the variable R.