MN 112 · Label Auto-assignment Definition Language
The LADL specification
New here? Start with the guide.
MN 112 specifies the Label Auto-assignment Definition Language (LADL), a declarative model under which a publisher states how a document family assigns labels, and a conforming engine evaluates that statement against a content tree and produces every label and every cross-reference form. This page states the contract that the Kaleidl runtimes implement: the three model trees, the six profile instance types with their attributes, the template placeholders, the condition types, the labeling algorithm with its counter-scoping rules, the sequence semantics, the vocabulary contract, both profile realizations, and one document labeled end to end.
Every profile excerpt on this page is drawn from the conformance vectors, and every table of produced labels is the output of a real engine run against those vectors; the note under each table names the run that pins the values. The specification covers label assignment only. The engine ships no bundled profiles, because each publisher's labeling scheme is a profile supplied by the flavor that needs it, and the label vocabulary is language data supplied by the host document rather than by a profile. MN 112 is a draft specification; where the draft text admits more than one reading, the Kaleidl engines resolve the reading as documented in the reference engine, and each resolution is testable against the conformance vectors.
Scope
A LADL profile declares, as data, how a family of documents assigns labels: clause and annex numbering, figure and table captions, formula and list numbering, note and example counting, footnote sequences, numbered bibliography entries, and ordered-list schemes. A conforming runtime parses the profile, evaluates it against the content tree the host supplies, and returns one label per labeled element in two forms — the assignment form, which is the label as it is printed at the element, and the reference form, which is the label as a cross-reference to that element is printed elsewhere.
The runtime evaluates one profile against one document at a time, and it derives everything from the profile and the tree: it never infers scoping from the shape of the tree, never matches context by element name behind the profile's back, and never substitutes a default labeling scheme when a profile rule is missing. Where a rule cannot be evaluated — an unknown vocabulary key, a reference to an undefined instance, a sequence asked for a position it cannot produce — the runtime raises an error instead of publishing a fallback label.
The three model trees
LADL models a labeling scheme as three instance trees, and every part of the model lives in one of them. The content tree arrives from the host and describes the elements being labeled: each element carries an identity, a type that decides which labeller can label it, its children, and — where it has children to be labeled — a declared association naming the context that scopes them. The context tree comes from the profile: LabelContext instances linked by a parent reference, the way the document itself nests. The labeller tree binds the two: each labeller serves one element type within one context, draws its value from a sequence, renders it through one or more templates, and may name a parent labeller so that a nested element knows the element it hangs from.
The scoping structure is declared, never inferred. A clause carries an association to the clause context, an annex clause carries an association to the annex clause context, and the engine resolves an element's applicable context by walking from the element through its ancestors to the nearest declared association. Because the host declares the structure, the same profile labels an arbitrary document family: the profile states the rules, and the tree states where they apply.
Profile instances
A profile is a set of typed instances, and six instance types make up a profile. The attribute set of each is fixed. The tables below state the attributes of each type as the reference models declare them; the YAML realization maps these attributes one for one under properties. LabelContext additionally declares optional element and labellers attributes, which the flagship profiles leave unused: the binding runs the other way, and each labeller names the context it serves through its own context reference.
LabelStyle
The root instance. One style references every labeller, sequence, template and context the scheme uses.
| Attribute | Type | Meaning |
|---|---|---|
| name | string | The style name. |
| labellers | reference list | The labellers of the style, referenced by identifier in the form "id:clause_labeller". |
| sequences | reference list | The sequences the style uses, referenced by instance name. |
| templates | reference list | The label templates the style uses, referenced by instance name. |
| contexts | reference list | The label contexts the style uses, referenced by instance name. |
| definition | string | Free-text scope statement of the style. |
LabelContext
Defines a labeling scope. Context instances form the context tree through the parent reference.
| Attribute | Type | Meaning |
|---|---|---|
| name | string | The context name, for example "clause" or "annex_clause". |
| parent | reference | The enclosing context; omitted on the document context, which is the root. |
| definition | string | Free-text statement of what the context scopes. |
Labeller
Labels one element type within one context. Labellers form the labeller tree through the parent reference.
| Attribute | Type | Meaning |
|---|---|---|
| id | string | The labeller identifier the style references. |
| sequence | reference | The sequence that produces the value at each position; names a profile instance or a built-in sequence. |
| context | reference | The context whose carrier elements scope this labeller's counters. |
| type | string | The content-element type the labeller labels, for example "clause" or "note". |
| parent | reference | Optional parent labeller; it supplies the %pn value and anchors the hierarchical counter scope. |
| template | reference list | One label template, or an ordered list of them for conditional selection. |
| global_template | reference list | The same shape, for the cross-reference form of the label. |
| definition | string | Free-text statement of the labeller's rule. |
LabelTemplate
Constructs the label string from labeller values, fixed text and vocabulary words.
| Attribute | Type | Meaning |
|---|---|---|
| pattern | string | The pattern string; carries the placeholders described under Template patterns. |
| direction | string, default "ltr" | Declared text direction of the rendered label. |
| condition | LabelContextCondition | Optional condition; see Conditions and template selection. |
| definition | string | Free-text statement of the template's purpose. |
NumericSequence
A monotonic sequence of numeric values, rendered in one of the labeling formats.
| Attribute | Type | Meaning |
|---|---|---|
| initial_value | integer, default 1 | The value at position 1. |
| increment | integer, default 1 | The step between successive positions. |
| format | string, default "decimal" | The labeling format: decimal, roman_upper, roman_lower, alpha_upper, alpha_lower, arabic_indic, chinese, japanese or korean. |
| cycle_length | integer | When present, the raw value is decomposed bijectively into digits of this radix, and each digit is rendered in the format. |
| base_sequence | reference | When present, the raw value is rendered through the referenced sequence instead of the format attribute. |
| char_direction | string, default "ltr" | Declared direction of the rendered characters. |
| definition | string | Free-text statement of the sequence. |
CharacterSequence
A fixed list of characters, with a declared rule for positions past the list end.
| Attribute | Type | Meaning |
|---|---|---|
| characters | string list | The characters in order, for example the Cyrillic upper alphabet. |
| expansion_rule | string | One of repeat_label, prepend_prefix, double_character, append_suffix or none; see Expansion rules. |
| expansion_prefix | string list | The prefix or suffix characters used by prepend_prefix and append_suffix; when absent, the characters themselves are used. |
| char_direction | string, default "ltr" | Declared direction of the characters. |
| direction | string, default "ltr" | Declared direction on the sequence itself; where both are present, it takes precedence. |
| definition | string | Free-text statement of the sequence. |
The excerpt below is a verbatim part of the MN 112-A worked profile, the ISO/IEC Directives Part 2 scheme that the conformance vectors carry as mn112a-label-style.yaml. Two bindings in it carry the clause scheme: the subclause labeller binds the clause context, so it labels subclauses only inside clauses, and it names the clause labeller as its parent, so the parent value it substitutes for %pn is the clause's own number and the pattern %pn.%n renders 1.1 and 1.2 under clause 1. The annex bindings in the same vector apply the same shape inside annexes, and render A.1 and A.1.1, as the worked document below shows.
# Clause labeling — mn112a-label-style.yaml, verbatim excerpt - name: ClauseContext type: LabelContext properties: name: "clause" parent: {ref: DocumentContext} - name: SubclauseContext type: LabelContext properties: name: "subclause" parent: {ref: ClauseContext} - name: ClauseLabelTemplate type: LabelTemplate properties: pattern: "{clause} %n" - name: SubclauseLabelTemplate type: LabelTemplate properties: pattern: "%pn.%n" - name: ClauseLabeller type: Labeller properties: id: "clause_labeller" sequence: {ref: DecimalNumericSequence} context: {ref: DocumentContext} type: "clause" template: {ref: ClauseLabelTemplate} global_template: {ref: ClauseGlobalLabelTemplate} - name: SubclauseLabeller type: Labeller properties: id: "subclause_labeller" sequence: {ref: DecimalNumericSequence} context: {ref: ClauseContext} parent: {ref: ClauseLabeller} type: "subclause" template: {ref: SubclauseLabelTemplate} global_template: {ref: SubclauseGlobalLabelTemplate}
Source: the conformance vector mn112a-label-style.yaml, verbatim.
Template patterns
A pattern is a string that mixes fixed text with placeholders, and the renderer substitutes each placeholder with a value bound from the element's labeling state. Five placeholders exist, and the table states each one's binding.
| Placeholder | Binding |
|---|---|
| %n | The sequence value at the element's position — its own number. |
| %pn | The hierarchical value of the nearest enclosing element labeled by this labeller's parent chain: 1.2 for a subclause under clause 1, A.1 for an annex clause under Annex A. |
| %parent | The rendered global label of the context element that anchors the labeller's counter frame — the enclosing section a reference points from. |
| %self | The element's own local label, bound inside global templates so a reference can combine the section with the local form. |
| {key} | A label vocabulary key, resolved through the host document's i18n table with the English default vocabulary as the fallback. |
Two placeholders fail loudly. A pattern that uses %pn on an element for which no parent value is bound is a profile error, and the engine raises it rather than rendering a broken number; a pattern that uses an unknown {key} fails the same way. The %parent and %self placeholders render as the empty string when no value is bound.
Every labeller may carry a global_template alongside its local one, and this is what separates the assignment form from the reference form. The ISO/IEC style renders a clause's assignment as the bare number and its reference as the number with the term word, while the MN 112-A worked style carries the term word in both. Where a labeller declares no global template, the reference equals the assignment. The verified forms are:
| Profile and element | Assignment | Reference |
|---|---|---|
| ISO/IEC style — clause | 1 | Clause 1 |
| ISO/IEC style — annex clause | A.1 | Clause A.1 |
| MN 112-A worked style — clause | Clause 1 | Clause 1 |
| Vocabulary style with a French host table — annex clause | A.1 | Article A.1 |
Engine output: golden-tree against the ISO/IEC style, golden-tree and mn112a-tree against the MN 112-A style, and vocab-tree against the vocabulary style with the French host table.
The reference forms anchor at the enclosing section through %parent: the lone note of subclause 1.1 references 1.1, NOTE, while the first of two notes directly in clause 1 references Clause 1, NOTE 1, because the note's counter is anchored by the element that declared its context — the subclause in the first case, the clause in the second.
Conditions and template selection
A template may carry a condition, which is a LabelContextCondition naming one of three types and an integer threshold. The condition is evaluated against the count of like-labeled elements within the same counter scope.
| Condition type | Holds when |
|---|---|
| element_count_gt | Holds when the count of like-labeled elements under the same counter scope is greater than threshold. |
| element_count_eq | Holds when the count equals threshold. |
| element_count_lt | Holds when the count is less than threshold. |
The engine walks the tree once, plans and counts first, and renders afterwards, so each conditional template is evaluated against the final count of like-labeled siblings in its scope, not against the count at the moment the element was visited. Selection takes the first template whose condition holds; when no condition holds, the first unconditional template is selected. That one mechanism carries the ISO/IEC single-note rule, which the flagship profile states as an ordered pair — the unconditional {note} and the conditional {note} %n under element_count_gt with threshold 1 — and the same pair is applied to examples:
| Element | Situation | Assignment |
|---|---|---|
| c1_s1_n1 | the only note of subclause 1.1 | NOTE |
| c1_n1 | first of two notes in clause 1 | NOTE 1 |
| c1_n2 | second of two notes in clause 1 | NOTE 2 |
Engine output: mn112a-tree against the MN 112-A worked profile.
Notes to terminological entries take the opposite rule by design: their labeller binds a single unconditional template whose pattern is {note_to_entry}, which is why the note to an entry is numbered even when it is the only one. The vocabulary, not the profile, decides the wording, and the English default renders it as Note 1 to entry.
The labeling algorithm
The engine walks the content tree depth-first and resolves each element in four steps, in a manner that:
- finds the element's applicable context — the element's own declared association first, then the declared associations of its ancestors, nearest first;
- skips any association whose context binds no labeller for the element's type, because such an association scopes the element's descendants without labeling the element;
- applies the labeller bound to that context and type: the counter increments, the sequence produces the value at the new position, and the first template whose condition holds renders the string; and
- keys the counter on the element that declared the context, the labeller, and the parent hierarchical value, so like-labeled elements under different carriers number independently.
The second step is what lets one context serve two roles. In the worked document below, the terminological entry c1_e1 is a subclause declared in the term-entry context. The term-entry context binds a note labeller but no subclause labeller, so the entry itself skips the association, falls through to the enclosing clause context, and is labeled 1.3 by the subclause labeller — while its note resolves the term-entry context as its nearest association, is labeled Note 1 to entry by the note-to-entry labeller, and references as 1.3, Note 1 to entry.
Because counters are keyed on the declaring carrier element, numbering restarts wherever a new carrier begins. Annexes A and B each number their clauses, figures and tables from one, and a list under the next clause numbers its items from a) again. Labellers that name a parent labeller additionally restart per enclosing parent element, which produces the ISO/IEC ordered-list ladder over four levels and the em-dash bullet for unordered items:
| Element | Position | Label |
|---|---|---|
| li1 | first item of the list | a) |
| li1_1 | nested in li1 | 1) |
| li1_1_1 | nested in li1_1 | i) |
| li1_1_1_1 | nested in li1_1_1 | a) |
| li1_1_2 | second child of li1_1 | ii) |
| li1_2 | second child of li1 | 2) |
| li2 | second item of the list | b) |
| li3 | third item of the list | c) |
| li3_1 | nested in li3 | 1) |
| liL2_u1 | unordered item of the second list | — |
Engine output: list-levels-tree against the ISO/IEC style vector.
The %pn value is the hierarchical path of the nearest enclosing element labeled by the labeller's parent chain, with the chain's values joined by a dot. Where the parent labeller's own binding does not cover the enclosing element, the engine falls back to the nearest ancestor of the parent labeller's element type, so a subfigure nested in a figure that is labeled by the annex figure labeller still resolves its parent and prints Figure A.1 a).
Errors
The specification states no fallbacks: each unresolvable situation is an error, and the runtimes raise it. The table states each situation with the error the vendored engine raises for it.
| Situation | Engine behavior |
|---|---|
| A pattern uses a {key} that is in neither the host table nor the default vocabulary | ResolutionError: template "{nothere} %n" uses {nothere} but the key is in neither the labels dictionary nor the default vocabulary |
| A catalog value references a message the vocabulary does not define | ResolutionError: catalog message references unknown message "nowhere" |
| A pattern uses %pn and no parent value is bound for the element | ResolutionError: template "%pn.%n" uses %pn but the labeller has no parent labeller bound for this element |
| A CharacterSequence with expansion_rule none is asked for a position past its characters | SequenceExhaustedError: sequence exhausted at position 3 (expansion_rule none) |
| A labeller references a sequence the profile neither declares nor names among the built-ins | ResolutionError: undefined sequence: "Missing" |
Sequences
A compliant runtime provides fifteen built-in sequences, and every value below is engine output: numeric sequences are shown at positions 1 to 5 and again at 26 to 28, and character sequences at positions 1 to 3 and at the last position of their character list with the two positions past it. The two Arabic spellings render the same Arabic-script digits; the second carries the declared char_direction rtl, and rendering emits logical order in both cases, with display left to Unicode bidi.
| Built-in sequence | Kind | Values |
|---|---|---|
| DecimalNumericSequence | Numeric · decimal | 1 · 2 · 3 · 4 · 5 · … · 26 · 27 · 28 |
| ArabicNumericSequence | Numeric · arabic_indic | ١ · ٢ · ٣ · ٤ · ٥ · … · ٢٦ · ٢٧ · ٢٨ |
| ArabicIndicNumericSequence | Numeric · arabic_indic · rtl | ١ · ٢ · ٣ · ٤ · ٥ · … · ٢٦ · ٢٧ · ٢٨ |
| RomanUpperNumericSequence | Numeric · roman_upper | I · II · III · IV · V · … · XXVI · XXVII · XXVIII |
| RomanLowerNumericSequence | Numeric · roman_lower | i · ii · iii · iv · v · … · xxvi · xxvii · xxviii |
| AlphaUpperNumericSequence | Numeric · alpha_upper | A · B · C · D · E · … · Z · AA · AB |
| AlphaLowerNumericSequence | Numeric · alpha_lower | a · b · c · d · e · … · z · aa · ab |
| ChineseNumericSequence | Numeric · chinese | 一 · 二 · 三 · 四 · 五 · … · 二十六 · 二十七 · 二十八 |
| JapaneseNumericSequence | Numeric · japanese | 一 · 二 · 三 · 四 · 五 · … · 二十六 · 二十七 · 二十八 |
| KoreanNumericSequence | Numeric · korean | 일 · 이 · 삼 · 사 · 오 · … · 이십육 · 이십칠 · 이십팔 |
| CyrillicUpperCharacterSequence | Character · 32 letters · prepend_prefix | А · Б · В · … · Я · АА · АБ |
| CyrillicLowerCharacterSequence | Character · 32 letters · prepend_prefix | а · б · в · … · я · аа · аб |
| GreekUpperCharacterSequence | Character · 24 letters · prepend_prefix | Α · Β · Γ · … · Ω · ΑΑ · ΑΒ |
| GreekLowerCharacterSequence | Character · 24 letters · prepend_prefix | α · β · γ · … · ω · αα · αβ |
| HebrewNumericSequence | Character · 22 letters · prepend_prefix | א · ב · ג · … · ת · אא · אב |
Engine output: each sequence driven through the vendored engine over a flat element list.
Profile-declared sequence instances
Beyond the built-ins, a profile may declare its own sequence instances, and the attributes compose: the raw value at a position is initial_value + (position - 1) * increment, from which cycle_length, base_sequence or format produces the rendered value. The verified rows are:
| Declaration | Values at positions 1, 2, 3 |
|---|---|
| initial_value 3 · increment 3 · format "decimal" | NOTE 3 · NOTE 6 |
| initial_value 1 · increment 1 · format "decimal" · cycle_length 2 | Table 1 · Table 2 · Table 11 |
| increment 2 · base_sequence DecimalNumericSequence | 1) · 3) · 5) |
Engine output: profiles with these instances, run against element lists through the vendored engine.
A cycle_length of 2 renders the raw value as a bijective two-digit decomposition, which is why the third table prints Table 11: the raw value 3 decomposes into the digits 1 and 1, each rendered in the format. A base_sequence renders the raw value through the referenced sequence, superseding the format attribute; the third row declares an increment of 2 over the decimal base, and produces 1, 3, 5.
Expansion rules
A character sequence lists its characters in order and declares one expansion rule for the positions past the list end. The verified rows each use a two-character base list, so the third value and beyond exercise the rule; the values come from the conformance sequence vector, where four ordered-list levels carry exactly these sequences.
| Rule | Behavior | Values at positions 1–5 |
|---|---|---|
| repeat_label | Cycles the base characters. | F E F E |
| double_character | Repeats the character once more on each cycle past the list. | A B AA BB AAA |
| prepend_prefix | Prepends the expansion_prefix characters cyclically; the built-in character sequences declare no prefix, so the characters themselves are prepended. | C D XC XD YC YD (declared prefix X, Y) |
| append_suffix | Appends the expansion_prefix characters as suffixes, cyclically. | G H GP HP GQ (declared suffix P, Q) |
| none | Raises the sequence-exhausted error at the first position past the list. | — |
Engine output: sequences-tree against the MN 112 Labeling Sequences vector (F E / A B / C D / G H base lists).
Format renderings
The format attribute renders a positive integer in one of nine systems, and the arithmetic carries two documented conventions. Alphabetic formats are bijective in the spreadsheet manner, so 26 renders Z and 27 renders AA; the East-Asian formats render formal compound numerals, in which the unit is dropped before the tens marker only, so 10 renders 十, 21 renders 二十一, and 100 renders 一百. A sequence value that is not positive is an error.
| Call | Renders |
|---|---|
| roman_upper(4) | IV |
| roman_upper(9) | IX |
| roman_upper(1973) | MCMLXXIII |
| alpha_upper(26) | Z |
| alpha_upper(27) | AA |
| alpha_upper(28) | AB |
| arabic_indic(4) | ٤ |
| arabic_indic(12) | ١٢ |
| chinese(10) | 十 |
| chinese(21) | 二十一 |
| chinese(100) | 一百 |
| chinese(108) | 一百八 |
| japanese(2) | 二 |
| korean(3) | 삼 |
Engine output: real formatter calls in the vendored engine.
The label vocabulary
Term words in a pattern are not literals — they are {key} tokens, and the engine resolves each key through a label vocabulary. The vocabulary is the host document's i18n table, and profiles carry the labeling scheme, never the words. A key present in the host table is resolved from it; a key absent from the host table falls back to the English default vocabulary, which the table below states in full; and a key present in neither is a profile error.
| Key | English default |
|---|---|
| clause | Clause |
| subclause | Clause |
| annex | Annex |
| appendix | Appendix |
| section | Section |
| figure | Figure |
| table | Table |
| formula | Formula |
| inequality | Inequality |
| note | NOTE |
| note_xref | NOTE |
| note_to_entry | Note { $n } to entry |
| note_to_entry_xref | { $parent }, Note { $n } to entry |
| example | EXAMPLE |
| example_xref | EXAMPLE |
| termexample | EXAMPLE |
| list | List |
| introduction | Introduction |
| norm_annex | normative |
| inform_annex | informative |
Catalog values are Fluent (FTL) message patterns resolved by the rhoella engine. Placeables of the form { $n }, { $pn }, { $parent } and { $self } bind from the labeller's values, and a catalog value may reference another catalog message, which resolves within the catalog formed by the default vocabulary and the host table. A catalog value that references a message the vocabulary does not define is a profile error and the engine raises it, so a published document never carries a question-marked fallback for a label.
Because the vocabulary is host data, the same profile labels the same document in another language without change. The conformance suite runs the worked document a second time against a French table, and the verified pairs are:
| Element | English | French |
|---|---|---|
| clause 1 | Clause 1 | Article 1 |
| annex A | Annex A | Annexe A |
| example of subclause 1.1, assignment | EXAMPLE | EXEMPLE |
| note to entry, assignment | Note 1 to entry | Note 1 à l'article |
| note to entry, reference | 1.3, Note 1 to entry | Note 1 à l'article 1.3 |
| note 1 of clause 1, reference | Clause 1, NOTE 1 | Article 1, NOTE 1 |
Engine output: mn112a-tree against the MN 112-A worked profile, run without a host table and again with the French table of the vectors.
A worked document
The worked document exercises every labeling category of the ISO/IEC scheme at once: an Introduction whose subclauses number 0.1 and 0.2 while the Introduction itself carries no clause number; clauses with conditional notes and examples, terminological entries with always-numbered notes to entry, figures and tables whose own notes restart per figure and table, a footnote pair that runs sequentially through the document, and an ordered list; two annexes that restart independently, with a hierarchically numbered annex subclause and an annex figure; and a numbered bibliography. The tree excerpt below is real vector content, and the table lists all forty labels the engine produces for it.
{
"type": "document",
"id": "doc",
"context": "DocumentContext",
"children": [
{
"type": "introduction", "id": "intro",
"context": "IntroductionContext",
"children": [
{ "type": "subclause", "id": "intro_s1" },
{ "type": "subclause", "id": "intro_s2" }
]
},
{
"type": "clause", "id": "c1", "context": "ClauseContext",
"children": [
{
"type": "subclause", "id": "c1_s1",
"context": "SubclauseContext",
"children": [
{ "type": "note", "id": "c1_s1_n1" },
{ "type": "example", "id": "c1_s1_x1" }
]
},
{ "type": "subclause", "id": "c1_s2", "context": "SubclauseContext",
"children": [ { "type": "note", "id": "c1_s2_n1" } ] },
{ "type": "subclause", "id": "c1_e1", "context": "TermEntryContext",
"children": [ { "type": "note", "id": "c1_e1_n1" } ] },
{ "type": "note", "id": "c1_n1" },
{ "type": "note", "id": "c1_n2" },
{ "type": "footnote", "id": "c1_fn1" }
]
},
// clause 2 carries two figures (one with a subfigure, notes on
// both), a table with two notes, a formula, a footnote and a list;
// annexes A and B carry annex clauses with notes, examples, a
// subclause, a figure and a list; the bibliography carries two
// numbered items. The vector ships the full tree, and the table
// below lists every label it produces.
]
}Source: the conformance vector mn112a-tree.json, excerpted.
| Element | Role | Assignment | Reference |
|---|---|---|---|
| intro_s1 | Introduction subclause | 0.1 | 0.1 |
| intro_s2 | Introduction subclause | 0.2 | 0.2 |
| c1 | clause 1 | Clause 1 | Clause 1 |
| c1_s1 | subclause of clause 1 | 1.1 | 1.1 |
| c1_s1_n1 | note of subclause 1.1 | NOTE | 1.1, NOTE |
| c1_s1_x1 | example of subclause 1.1 | EXAMPLE | 1.1, EXAMPLE |
| c1_s2 | subclause of clause 1 | 1.2 | 1.2 |
| c1_s2_n1 | note of subclause 1.2 | NOTE | 1.2, NOTE |
| c1_e1 | terminological entry 1.3 | 1.3 | 1.3 |
| c1_e1_n1 | note to the entry | Note 1 to entry | 1.3, Note 1 to entry |
| c1_n1 | note of clause 1 | NOTE 1 | Clause 1, NOTE 1 |
| c1_n2 | note of clause 1 | NOTE 2 | Clause 1, NOTE 2 |
| c1_fn1 | footnote in clause 1 | 1 | 1 |
| c2 | clause 2 | Clause 2 | Clause 2 |
| f1 | figure in clause 2 | Figure 1 | Figure 1 |
| f1_a | subfigure of figure 1 | Figure 1 a) | Figure 1 a) |
| f1_n1 | first note of figure 1 | NOTE 1 | Figure 1, NOTE 1 |
| f1_n2 | second note of figure 1 | NOTE 2 | Figure 1, NOTE 2 |
| f2 | figure in clause 2 | Figure 2 | Figure 2 |
| f2_n1 | only note of figure 2 | NOTE | Figure 2, NOTE |
| t1 | table in clause 2 | Table 1 | Table 1 |
| t1_n1 | first note of table 1 | NOTE 1 | Table 1, NOTE 1 |
| t1_n2 | second note of table 1 | NOTE 2 | Table 1, NOTE 2 |
| eq1 | formula in clause 2 | (1) | Formula (1) |
| c2_fn1 | footnote in clause 2 | 2 | 2 |
| L1 | list in clause 2 | List 1 | List 1 |
| li1 | ordered item of L1 | a) | a) |
| ax_a | first annex | Annex A | Annex A |
| ax_a_c1 | clause of Annex A | A.1 | A.1 |
| ax_a_c1_s1 | subclause of A.1 | A.1.1 | A.1.1 |
| ax_a_c1_n1 | note of A.1 | NOTE | A.1, NOTE |
| ax_a_c1_x1 | example of A.1 | EXAMPLE | A.1, EXAMPLE |
| ax_a_f1 | figure in Annex A | Figure A.1 | Figure A.1 |
| ax_a_L1 | list of A.1 | List A.1 | List A.1 |
| ax_a_li1 | ordered item of the annex list | a) | a) |
| ax_b | second annex | Annex B | Annex B |
| ax_b_c1 | clause of Annex B | B.1 | B.1 |
| ax_b_c1_n1 | note of B.1 | NOTE | B.1, NOTE |
| bib_1 | numbered bibliography entry | [1] | [1] |
| bib_2 | numbered bibliography entry | [2] | [2] |
Engine output: mn112a-tree.json against mn112a-label-style.yaml. Element identifiers are colored by category — clauses in cyan, annexes in amber, figures, tables and lists in magenta, notes, examples, footnotes and bibliography entries in grey.
The two realizations
MN 112 defines two realizations of a profile, and a runtime accepts both: the LutaML instance syntax, carried in .lml files, and a YAML realization, carried under the schema key mn112/1. Equivalent realizations derive the same instance data, the conformance suite stores each profile in both forms, and the loader dispatches on the file extension, so a flavor keeps its profile in whichever form it maintains and the runtime reads the other without change.
// Notes to entry are always numbered, even when a single one, and // restart within each terminological entry. instance NoteToEntryLabeller < Labeller { id = "note_to_entry_labeller" sequence = DecimalNumericSequence context = TermEntryContext type = "note" template = NoteToEntryLabelTemplate global_template = NoteToEntryGlobalLabelTemplate definition "Labeller for notes to terminological entries (always numbered)" }
- name: NoteToEntryLabeller type: Labeller properties: id: "note_to_entry_labeller" sequence: {ref: DecimalNumericSequence} context: {ref: TermEntryContext} type: "note" template: {ref: NoteToEntryLabelTemplate} global_template: {ref: NoteToEntryGlobalLabelTemplate} definition: "Labeller for notes to terminological entries (always numbered)"
Source: the LML is verbatim from the flagship fixture; the YAML is the equivalent instance of the mn112a vector.
The LML realization states instances as instance Name < BaseType blocks with attribute assignments, bracketed lists, nested brace maps and free-text definition blocks. The parser accepts the draft spelling with < inheritance and the released LutaML spelling that states inheritance as an isa statement, and a profile written in either form loads and labels identically. The YAML realization is a mapping with exactly the keys schema and instances: the schema value must be mn112/1, each instance carries exactly name, type and properties, references are {ref: Name} mappings, and the loader refuses YAML aliases, custom tags and repeated mapping keys.
Every reference in either realization must resolve: a reference names a declared instance of the profile or one of the fifteen built-in sequences, and a reference to anything else is a load error, not a runtime surprise.
Conformance
A conforming runtime provides the fifteen built-in sequences, accepts both profile realizations, evaluates the labeling algorithm with the counter-scoping and parent-resolution rules stated on this page, raises an error in each of the situations the errors table lists, and resolves catalog values through a Fluent engine. The conformance vectors at kaleidl/kaleidl-testsuite pin document trees to their expected label sets, and every example on this page is drawn from them: the worked ISO/IEC document end to end, the Directives Part 2 labeling categories, terminological entries with notes to entry in English and French, ordered-list ladders four levels deep, profile-declared sequence instances with the four expansion rules, per-annex counter restarts, and the vocabulary battery in its default and French runs.
Every runtime in the Kaleidl fleet vendors the vectors at a pinned reference and re-verifies the snapshot against the testsuite. The model overview carries the same contract as prose, and the playground runs the engine in the browser against a profile you can edit.