SLAX

1 program Added 2026-02-28T15:22:21Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: enabled Evidence Report issue View issues
Aliases: Stylesheet Language Alternative syntaX
Provenance: commit 2d788e7706 · authored 2026-02-28T16:22:48+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

SLAM (0.29)ISETL (0.25)S2 (0.25)S/SL (0.22)IAL (0.21)

LLM-contributed programs

Template Matching with Parameters

Provenance: commit 2d788e7706 · authored 2026-02-28T16:22:48+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch enabled
code.slax · license: BSD-2-Clause · added: 2026-02-28T15:22:21Z
version 1.1;            /* All scripts start with "version" */

param $name = "Poe";    /* Script parameters with default values */

var $favorites := {     /* ":=" avoids RTFs */
    <name hidden="yes"> "Spillane";
    <name> "Doyle";     /* Creates elements and attributes */
    <name> "Poe";
}

match / {               /* A match template */
    <out> {
        /* Parameters are passed by name to templates */
        call test($elt = "author", $name);
    }
}

template test ($name, $elt = "default") {
    for $this ($favorites/name) {
        if ($name == $this && not($this/@hidden)) {
            element $elt {
                copy-of .//author[name/last == $this];
            }
        } else if ($name == $this) {
            message "Hidden: " _ $name;
        }
    }
}

Contribute — propose a file extension

Tell us where to find evidence about SLAX (mapped to pl/slax). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/SLAX/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Slate Sleep →