How to use Variables in XMLP?

Oracle Apps Interview QuestionsCategory: XML PublisherHow to use Variables in XMLP?
Questions Master asked 3 years ago
1 Answers
Shailender Thallam Staff answered 3 years ago

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.