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

libslax Version

SLAX Version

12.2 through 13.3

0.11.22

1.1

14.1

0.14.1

1.1

14.2 through 17.3

0.17.1

1.2

17.4 and later

0.22.0

1.2

For more information about libslax, including source code, release notes, additional documentation, and support materials, see the following sites: