Converting a Commit 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/commit/script1.xsl destination /var/db/scripts/commit/script1.slaxThe script1.xsl file remains
unchanged in the /var/db/scripts/commit directory, and a new script called script1.slax is added to the /var/db/scripts/commit directory. If you do not specify a filename for the SLAX 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 a Commit Script from SLAX to XSLT.