SetGlobal

Sets a variable which is valid for the whole environment also for the XSL transformation service.

SetGlobal(var, value, [Add/Sub])

 

Parameters

  • var : String, name of the variable.
  • value : The value given to the variable.
  • Add|Sub: optional,
    • Add adds the value to the existing variable
    • Sub subtracts the valuefrom the existing variable

 

Remarks

Set a variable which can be set in an XSL Stylesheet and be accessed in a JavaScript and vice versa.

 

Example

//Declare the function SetGlobal to set a variable "Number" with a value of 12
var func = "SetGlobal(Number,12)";
//Execute function
ExecFunc(func);
//The Global Variable "Number" exists now and can be used in XSL and JavaScript