Skip to content
Kaleidl

LADL · MN 112 · labels from declarations

One profile in, every label out.

Kaleidl is the labeling engine for LADL — the labelling language defined by MN 112. You describe how a document family labels itself — clauses, annexes, figures, notes, formulas, ordered lists — and the engine walks any content tree and hands back every label and every cross-reference. One semantic, four runtimes, one conformance contract.

# one labeller: annexes get letters, their clauses get A.1, A.2 …
- name: AnnexLabeller
  type: Labeller
  properties:
    id: annex_labeller
    sequence: {ref: AlphaUpperNumericSequence}
    context: {ref: DocumentContext}
    type: annex
    template: {ref: AnnexTemplate}

- name: AnnexTemplate
  type: LabelTemplate
  properties:
    pattern: "Annex %n"

A profile declares three things: labellers (what gets a label, and from which sequence), templates (the shape of the label, like "%pn.%n"), and contexts (where in the document each scheme applies).

The engine resolves the three LADL trees against your content — parent chains give A.1.2, conditional templates turn one NOTE into unnumbered and two into NOTE 1, NOTE 2, and the label words come from an i18n vocabulary whose strings are Fluent patterns.

Every behavior on this site is engine output, pinned by the upstream testsuite — not by taste.

Conformance, measured

The runtime repos vendor the vectors from kaleidl/kaleidl-testsuite at a pinned ref. CI re-verifies the snapshot against the testsuite on every run, so drift fails loudly instead of silently.

3

model trees

the content tree, the context tree, the labeller tree — MN 112’s three LADL structures

15

built-in sequences

decimal, roman, alpha, Arabic-Indic, CJK, Cyrillic, Greek, Hebrew — every sequence a LADL runtime must provide

178

gem specs

the Ruby reference suite, green on every change

4

runtimes

Ruby, Python, Rust, TypeScript — one semantic, one conformance contract