Converting an Event Script from XSLT to SLAX
SLAX is a C-like alternative syntax to XSLT and can be viewed as a preprocessor for XSLT. Before the JUNOS Software invokes the XSLT processor, the software converts SLAX constructs (such as if/then/else) to equivalent XSLT constructs (such as <xsl:choose> and <xsl:if>). For more information about SLAX, see SLAX Overview.
To convert an XSLT script to SLAX, issue the request system scripts convert xslt-to-slax source source-directory/source-filename destination destination-directory/<destination-filename> operational mode command. The source script is the basis for a new script. The source script is not overwritten by the new script.
For example:
user@host> request system scripts convert xslt-to-slax
source /var/db/scripts/event/script1.xsl destination /var/db/scripts/event/script1.slaxWhen you issue this command, the script1.xsl file remains in the /var/db/scripts/event directory, and a new script called script1.slax is added to the /var/db/scripts/event directory. If you do not specify a filename for the destination
file, it is named SLAX-Conversion-Temp.xxxxx where xxxxx is a randomly generated series of characters.
To convert a script from SLAX to XSLT, see Converting an Event Script from SLAX to XSLT.