XSLT Elements Without SLAX Equivalents

Some XSLT elements are not directly translated into SLAX statements. Some examples of XSLT elements for which there are no SLAX equivalents are <xsl:fallback>, <xsl:output>, and <xsl:sort>.

You can encode these elements directly as normal SLAX elements in the XSLT namespace. For example, you can include the <xsl:output> and <xsl:sort> elements in a SLAX script, as shown here:

<xsl:output method="xml" indent="yes" media-type="image/svg">;
match * {
    for-each (configuration/interfaces/unit) {
        <xsl:sort order="ascending">;
    }
}

When you include XSLT namespace elements in a SLAX script, do not include closing tags. For empty tags, do not include a forward slash (/) after the tag name. The examples shown in this section demonstrate the correct syntax.

The following XSLT snippet contains a combination of elements, some of which have SLAX counterparts and some of which do not:

<xsl:loop select="title">
    <xsl:fallback>
        <xsl:for-each select="title">
            <xsl:value-of select="."/>
        </xsl:for-each>
    </xsl:fallback>
</xsl:loop>

The SLAX conversion uses the XSLT namespace for XSLT elements that do not have SLAX counterparts:

<xsl:loop select = "title"> {
    <xsl:fallback> {
        for-each (title) {
            expr .;
        }
    }
}