libslax Distribution Overview
Stylesheet Language Alternative syntaX (SLAX) is an alternative syntax for XSLT and is tailored for readability and familiarity, following the style of C and Perl. In the SLAX language, programming constructs and XPath expressions are moved from the XML elements and attributes used in XSLT to first class language constructs. SLAX was originally developed as part of Junos OS for the purpose of on-box scripting to enable users to customize and enhance the command-line interface (CLI).
libslax is an open-source implementation of the SLAX language using the "New BSD License." libslax is written in C and is built on top of the libxml2, libxslt, and libexslt libraries. The libslax distribution contains the libslax library, which incorporates a SLAX writer and SLAX parser, a debugger, a profiler, and the SLAX processor (slaxproc). The SLAX processor is a command-line tool that can validate SLAX script syntax, convert between SLAX and XSLT formats, and format, debug, or run SLAX scripts.
You can download and install the libslax distribution on a computer with a UNIX-like operating system to develop SLAX scripts outside of Junos OS. The libslax tools are also included as part of the standard Junos OS. Table 1 outlines the libslax version included with each Junos OS release.
Table 1: libslax Version on Devices Running Junos OS
Junos OS Release
12.2 through 13.3
14.2 through 17.3
17.4 and later
For more information about libslax, including source code, release notes, additional documentation, and support materials, see the following sites: