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 Understanding SLAX.
To convert an XSLT script to SLAX, issue the request system scripts convert xslt-to-slax source source/filename destination destination operational mode command:
- user@host> request system scripts convert
xslt-to-slax source source/filename destination destination
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
When you issue this command, the script1.xsl file remains in the /var/db/scripts/commit and a new script called script1.slax is added to the /var/db/scripts/commit directory.
To convert a script from SLAX to XSLT, see Manually Converting a Script from SLAX to XSLT.