Template parameters are similar to global parameters – their value is set outside of the template. However, rather than being set by Junos they are set by the script code when it codes the named template. 

To declare template parameters, include them within parenthesis following the template name:
template display-user( $full-name ) {
/* Template code goes here */
}
A default value can be provided in the same way as a global parameter. If the script code provides no default value, and the template code does not assign a parameter value, when the template is called, then the parameter is set to an empty string.
template display-user( $full-name = "John Doe" ) {
/* Template code goes here */
}

/* show-time.slax */
version 1.0;
ns junos = "http://xml.juniper.net/junos/*/junos";
ns xnm = "http://xml.juniper.net/xnm/1.1/xnm";
ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0";

import "../import/junos.xsl";

match / {
    <op-script-results> {
        /* Call the display-time template and set the $format parameter */
        call display-time( $format = "normal");
    }
}

/* Output the localtime to the console in either iso (default) or normal format */
template display-time( $format = "iso" ) {
    if( $format == "iso" ) {
        <output> "The iso time is " _ $localtime_iso;
    }
    else {
        <output> "The time is " _ $localtime;
    }
}