Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Automation Scripting User Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

param

date_range 13-Jan-21

Syntax

content_copy zoom_out_map
param $name=value;

Description

Declare a parameter for a template or for the style sheet as a whole. Template parameters declared with the param statement must be placed inside the template code block. A global parameter, the scope of which is the entire style sheet, must be declared at the top level of the style sheet. You can include an initial value by following the parameter name with an equal sign (=) and a value expression. A parameter whose value is set by Junos OS at script initialization must be defined as a global parameter.

In SLAX, parameter and variable names are declared and accessed using the dollar sign ($). This is unlike the name attribute of <xsl:variable> and <xsl:parameter> elements, which do not include the dollar sign in the declaration.

Attributes

name

Defines the name of the parameter.

value

Defines the default value for the parameter, which is used if the person or client application that executes the script does not explicitly provide a value.

SLAX Example

content_copy zoom_out_map
param $vrf;
param $dot = .;

XSLT Equivalent

content_copy zoom_out_map
<xsl:param name="vrf"/>
<xsl:param name="dot" select="."/>

Release Information

Statement introduced in version 1.0 of the SLAX language.

footer-navigation