diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-29 14:02:30 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-10-03 12:09:16 -0400 |
| commit | 439bb7e946e5b6e6ac350b3d4cbd3794b5b0ff21 (patch) | |
| tree | d2ac6817ea529d5f5beeddbadebd053dece8b8a3 /ssp-format-specification.md | |
| parent | derived values, that the model left unstated (diff) | |
format 2.1: poem is a container of verse (objects)
.ocn_range, the first and last ocn of what a container holds, as one
.ssp property and two .ocda.db columns. A poem is the one container:
its verses are the citable units rather than the poem. Poem how comes
before its first verse, carries ocn 0 and no identifier, and states the
range, where it came after its last verse carrying that verse's ocn and
identifier.
So the model can now say that a non-zero ocn is unique within a
document, and does, keeping the older rule for artefacts written
before 2.1. A minor bump: an addition, a poem was never rendered and
has no text, the verses are unchanged, and a 2.0 reader reads a 2.1
file.
The property-count table is recounted over the regenerated reference
set, the method first checked against the old set, which it reproduces.
The one new endnote, a note in a poem's last verse now gathered,
accounts for the other moved counts; the poems' segment names account
for .segment_html_is and .segment_epub_is.
(assisted by Claude-Code)
Diffstat (limited to 'ssp-format-specification.md')
| -rw-r--r-- | ssp-format-specification.md | 86 |
1 files changed, 44 insertions, 42 deletions
diff --git a/ssp-format-specification.md b/ssp-format-specification.md index e01aad6..ed37638 100644 --- a/ssp-format-specification.md +++ b/ssp-format-specification.md @@ -1,7 +1,7 @@ # The `.ssp` format **The object-centric document abstraction, written as text. Format version -2.0**, as spine 0.25.0 emits and reads it. +2.1**, as spine emits and reads it after 0.25.1. This document specifies *one serialisation*. The model it serialises is specified in [`ocda-model.md`](ocda-model.md), which the sqlite @@ -63,7 +63,7 @@ by reading a `.ssp` back, so it can hold nothing this format cannot express. The version is declared **in band**, on the first line of every file: ``` -% SiSU Document Abstraction v2.0 +% SiSU Document Abstraction v2.1 ``` and by the sibling sqlite serialisation in its `schema.version` metadata @@ -82,6 +82,7 @@ row, so that one bump moves both. | version | date | what moved | |---------|------------|------------| +| 2.1 | 2026-09-29 | `.ocn_range`, the first and last ocn of what a container holds. A poem is a container of verses and is cited as their range: it now comes before its first verse, carries ocn `0` and no identifier, and states the range, where it had come after its last verse carrying that verse's ocn and identifier, so that one number named two objects. A minor bump: the property is an addition, the poem was never rendered and has no text, the verses are unchanged, and a 2.0 reader reads a 2.1 file. The same run gathers a note in a poem's last verse into the endnotes, which it had not been: one more endnote in the reference collection. | | 2.0 | 2026-09-18 | `source.digest` changes meaning: it covers every markup file the document is made of, where it had been the digest of the master file alone. A change of meaning, so the major part. | | 1.1 | 2026-09-10 | The `@source` block; the document metadata the output writers read, carried in full (14 `@meta` and 3 `@make` properties added); `.segment_lv4_is`. | | 0.1 | | The first form. | @@ -193,7 +194,7 @@ are part of the format. In order, and this order is fixed: ``` -% SiSU Document Abstraction v2.0 +% SiSU Document Abstraction v2.1 % Source: <markup filename> @source { ... } @@ -385,47 +386,48 @@ set, as a guide to which parts of the format are load bearing. | # | property | value | emitted when | count | |---|----------|-------|--------------|-------| | 1 | `.identifier` | string | a non-heading has an identifier that is not its ocn (**otherwise it is the ocn**: model section 9) | 353 | -| 2 | `.part` | string | the object belongs to a part (`frontmatter`, `body`, ...) | 56,882 | +| 2 | `.part` | string | the object belongs to a part (`frontmatter`, `body`, ...) | 56,883 | | 3 | `.section` | string | the object's own section differs from the block it sits in | 605 | -| 4 | `.parent` | int | **every object except** the document root and `toc` entries | 53,631 | +| 4 | `.parent` | int | **every object except** the document root and `toc` entries | 53,632 | | 5 | `.last_descendant` | int | non-zero: the last ocn under this heading | 3,202 | -| 6 | `.children` | ints | the heading has child headings | 827 | -| 7 | `.ancestors` | 8 ints | any is non-zero | 53,595 | -| 8 | `.ancestors_collapsed` | 8 ints | any is non-zero | 53,595 | -| 9 | `.dom_status` | 8 ints | any is non-zero | 3,319 | -| 10 | `.dom_status_collapsed` | 8 ints | any is non-zero | 3,319 | -| 11 | `.heading_lev_collapsed` | int | it is below 9 | 3,503 | -| 12 | `.parent_lev` | int | non-zero | 52,848 | -| 13 | `.dummy` | `true` | the heading was introduced to segment an output | 183 | -| 14 | `.ocn_off` | `true` | the object has no citation number | 7,543 | -| 15 | `.is_of_type` | string | always, in practice | 56,882 | -| 16 | `.attrib` | string | set | 1 | -| 17 | `.meta_lang` | string | the object carries its own language | 0 | -| 18 | `.meta_syntax` | string | the object carries its own markup syntax | 0 | -| 19 | `.sha256` | hex | the object's text digest is non-zero | 51,253 | -| 20 | `.image` | record | once **per image**, in order of appearance | 63 | -| 21 | `.indent` | 2 ints | either indent is non-zero: `base hang` | 7,583 | -| 22 | `.bullet` | `true` | the object is a bullet item | 1,903 | -| 23 | `.lang` | string | the text attributes carry a language | 0 | -| 24 | `.has` | flags | any is set | 11,143 | -| 25 | `.table_cols` | int | the object is a table with columns | 32 | -| 26 | `.table_widths` | ints | the table has column widths | 32 | -| 27 | `.table_aligns` | letters | the table has alignments (`l` `c` `r`) | 32 | -| 28 | `.table_header` | `true` | the table has a header row | 29 | -| 29 | `.code_linenumbers` | `true` | the code block is numbered | 1 | -| 30 | `.stow_link` | url | once **per extracted link** | 1,013 | -| 31 | `.segment` | string | the heading opens a segment | 3,355 | -| 32 | `.anchor` | string | the anchor differs from the segment name (**otherwise it is the segment name**: model section 9) | 68 | -| 33 | `.segment_prev` | string | there is a previous segment | 1,022 | -| 34 | `.segment_next` | string | there is a next segment | 1,022 | -| 35 | `.heading_lev_anchor` | string | the heading has a level anchor tag | 1,854 | -| 36 | `.segment_epub` | string | the heading opens an epub segment | 3,355 | -| 37 | `.segment_html_is` | string | the object is inside an html segment | 47,024 | -| 38 | `.segment_epub_is` | string | the object is inside an epub segment | 47,024 | -| 39 | `.segment_lv4_is` | string | **and** it differs from `.segment_html_is` | 342 | -| 40 | `.heading_ancestors_text` | 8 slots, `\|` joined, escaped | any slot is non-empty | 3,319 | -| 41 | `.lev4_subtoc` | string | once **per sub-table-of-contents entry** | 1,887 | -| 42 | `.anchor_tag` | string | once **per anchor tag** | 7,883 | +| 6 | `.ocn_range` | 2 ints | the object is a container: the first and last ocn of what it holds (2.1; a poem, model section 5) | 48 | +| 7 | `.children` | ints | the heading has child headings | 827 | +| 8 | `.ancestors` | 8 ints | any is non-zero | 53,596 | +| 9 | `.ancestors_collapsed` | 8 ints | any is non-zero | 53,596 | +| 10 | `.dom_status` | 8 ints | any is non-zero | 3,319 | +| 11 | `.dom_status_collapsed` | 8 ints | any is non-zero | 3,319 | +| 12 | `.heading_lev_collapsed` | int | it is below 9 | 3,503 | +| 13 | `.parent_lev` | int | non-zero | 52,849 | +| 14 | `.dummy` | `true` | the heading was introduced to segment an output | 183 | +| 15 | `.ocn_off` | `true` | the object has no citation number | 7,543 | +| 16 | `.is_of_type` | string | always, in practice | 56,883 | +| 17 | `.attrib` | string | set | 1 | +| 18 | `.meta_lang` | string | the object carries its own language | 0 | +| 19 | `.meta_syntax` | string | the object carries its own markup syntax | 0 | +| 20 | `.sha256` | hex | the object's text digest is non-zero | 51,253 | +| 21 | `.image` | record | once **per image**, in order of appearance | 63 | +| 22 | `.indent` | 2 ints | either indent is non-zero: `base hang` | 7,583 | +| 23 | `.bullet` | `true` | the object is a bullet item | 1,903 | +| 24 | `.lang` | string | the text attributes carry a language | 0 | +| 25 | `.has` | flags | any is set | 11,144 | +| 26 | `.table_cols` | int | the object is a table with columns | 32 | +| 27 | `.table_widths` | ints | the table has column widths | 32 | +| 28 | `.table_aligns` | letters | the table has alignments (`l` `c` `r`) | 32 | +| 29 | `.table_header` | `true` | the table has a header row | 29 | +| 30 | `.code_linenumbers` | `true` | the code block is numbered | 1 | +| 31 | `.stow_link` | url | once **per extracted link** | 1,013 | +| 32 | `.segment` | string | the heading opens a segment | 3,355 | +| 33 | `.anchor` | string | the anchor differs from the segment name (**otherwise it is the segment name**: model section 9) | 68 | +| 34 | `.segment_prev` | string | there is a previous segment | 1,022 | +| 35 | `.segment_next` | string | there is a next segment | 1,022 | +| 36 | `.heading_lev_anchor` | string | the heading has a level anchor tag | 1,854 | +| 37 | `.segment_epub` | string | the heading opens an epub segment | 3,355 | +| 38 | `.segment_html_is` | string | the object is inside an html segment | 47,071 | +| 39 | `.segment_epub_is` | string | the object is inside an epub segment | 47,072 | +| 40 | `.segment_lv4_is` | string | **and** it differs from `.segment_html_is` | 342 | +| 41 | `.heading_ancestors_text` | 8 slots, `\|` joined, escaped | any slot is non-empty | 3,319 | +| 42 | `.lev4_subtoc` | string | once **per sub-table-of-contents entry** | 1,887 | +| 43 | `.anchor_tag` | string | once **per anchor tag** | 7,884 | Three of these need a word here, the first two because the model behind them is easy to misread (see [`ocda-model.md`](ocda-model.md) sections 5 |
