summaryrefslogtreecommitdiffhomepage
path: root/format-specification.md
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2026-09-02 20:26:44 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2026-09-02 20:26:44 -0400
commitf934da74b13168782332a1283e32f88f7a0f32dd (patch)
treee60e563e52fa3efdcab26663b3535c7d0ecffd1b /format-specification.md
parentexamples: real spine output in place of the hand-written ones (diff)
spec: .parent emission rule, regenerate the worked exampleclaude
.parent is no longer "omit when zero". spine emits it for every object, 0 included, except the :A~ document root (no parent) and the entries of the generated @toc section (furniture, placed by their .indent level; the toc heading itself keeps .parent: 1). A missing .parent must not be read as 0. - omission table row and a new paragraph under Properties - example-autonomous-contract.ssp regenerated from spine 0.22.0, which also picks up the ancestors / dom_status / last_descendant / parent_lev fixes made in spine since 2026-08-27, and the corrected .ocn_off on paragraph objects example-wealth-of-networks.ssp is a hand-elided excerpt and has not been regenerated; its verbatim lines predate these changes. (assisted by Claude-Code)
Diffstat (limited to 'format-specification.md')
-rw-r--r--format-specification.md15
1 files changed, 13 insertions, 2 deletions
diff --git a/format-specification.md b/format-specification.md
index 587b333..8aec323 100644
--- a/format-specification.md
+++ b/format-specification.md
@@ -224,7 +224,7 @@ and before text content. Only non-default values are written.
.part: body % frontmatter, body, backmatter
.section: body % toc, body, glossary, bibliography,
% bookindex, blurb
-.parent: 5 % parent OCN
+.parent: 5 % parent OCN, see below
.last_descendant: 70 % last descendant OCN
.ancestors: 0 0 0 0 5 20 0 0 % markedup_ancestors[8]
.ancestors_collapsed: 0 0 0 0 5 20 0 0
@@ -245,6 +245,17 @@ and before text content. Only non-default values are written.
A heading's identifier is not a property: it follows the level on the
object declaration line (`[5] heading :1 ch1_intro`).
+`.parent` is written for every object, including when the value is 0,
+with two exceptions: the `:A~` document root, which has no parent, and
+the entries of the generated `@toc` section, which are furniture rather
+than authored objects and whose place is already given by their
+`.indent` level (the `@toc` heading itself does carry `.parent: 1`). A
+parent of 0 is not "no parent recorded": it is a parent heading the
+author has made non-substantive, its ocn suppressed with `~#`, or a
+dummy heading introduced with `-#` to segment an output. Stating it
+keeps "non-substantive parent" and "no parent" distinguishable, so a
+reader must not treat a missing `.parent` as 0.
+
**Text attribute properties** (from `attrib`):
```
@@ -404,7 +415,7 @@ Properties with default values are omitted to reduce verbosity:
|---|---|---|
| .part | "" | empty |
| .section | "" | empty, or same as the enclosing section |
-| .parent | 0 | zero |
+| .parent | (none) | the `:A~` document root, and `toc` entries; otherwise always written, 0 included |
| .last_descendant | 0 | zero |
| .children | (none) | no child headings |
| .ancestors | 0 0 0 0 0 0 0 0 | all zeros |