ExecFunc

var result = ExecFunc(func);

 

Parameters

  • func : String, Definition of the function like listed below.


funcDescription
ConvertDateConverts one date format into an other format
SetGlobalSet Global Variable, Variable set in JavaScript can be used in a called XSL
GetGlobalGet Global Variable, Variable set in called XSL can be used in JavaScript
MathSome mathematical functionality

Return Values

Contains result of the function or null if an error occured.

 

Remarks

 

Example

JavaScript:

var strDateMMM = ExecFunc("ConvertDate(' + strPDate + ',yyyy-mm-dd,ddMMMyy)");
var var strJourneyTime = ExecFunc("Math(AddTime,' + journeyTime + ',' + currentJourneyTime + ',hhmm,hhmm)");

XSLT:

<CreationDate>
    <xsl:value-of select="concat('!func:ConvertDate(',dateValue,',ddMMMyy,yyyy-mm-dd)')"/>
</CreationDate>
<NumberOfNights>
<xsl:value-of select="concat('!func:Math(SubDate,',HODDAT/E021E,',',HODDAT/E021D,',ddMMMyyyy,ddMMMyyyy)')"/>
</NumberOfNights>