From 28b27ec45b9a592be3187d995b4355f483e53cc1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 7 Sep 2026 11:18:52 -0400 Subject: ocda: a reader for .ssp, and a round trip check sisudoc.ocda.abstraction.ssp_in reads a .ssp file back into ObjGenericComposite[][string], the same value the parser produces, so anything that consumes the abstraction can be fed from a .ssp instead of from markup. The three header blocks come back as key/value with their order preserved. --ssp-round-trip= loads a file and emits it again on stdout, using sspObjectRecord, the writer's own definition of a record. So the check is against the writer, not against a second description of the format: ./bin/spine-ldc --ssp-round-trip=test/reference/abstraction/.ssp \ | diff test/reference/abstraction/.ssp - BUG as yet to FIX 27 of the 35 reference documents round trip byte identically. The other 8 fail on two defects in the *writer* that the round trip found, and which are left for a decision: 1. .heading_ancestors_text and .lev4_subtoc can carry a raw newline, because a heading's text may contain a line break. The value then spans two physical lines and the format's rule that a value runs to the end of the line is broken. 194 and 22 occurrences, in the seven live-manual translations. 2. .heading_ancestors_text joins its eight slots with "|" while the text in them may itself contain "|". 22 occurrences in revisiting_the_autonomous_contract. Both need an escape (or normalisation at source) and both change the .ssp, so require a decision and another reference regeneration. ocda: export the .ssp reader from the abstraction package package.d is the re-export surface for consumers that want to reach the abstraction without depending on the directory layout; the reader belongs there beside the writer. (assisted by Claude-Code) --- src/sisudoc/ocda/abstraction/package.d | 1 + 1 file changed, 1 insertion(+) (limited to 'src/sisudoc/ocda/abstraction/package.d') diff --git a/src/sisudoc/ocda/abstraction/package.d b/src/sisudoc/ocda/abstraction/package.d index 4b34b3a..6281f6e 100644 --- a/src/sisudoc/ocda/abstraction/package.d +++ b/src/sisudoc/ocda/abstraction/package.d @@ -84,3 +84,4 @@ module sisudoc.ocda.abstraction; public import sisudoc.ocda.meta.metadoc; // spineAbstraction (A-layer) public import sisudoc.ocda.meta.metadoc_from_src; // docAbstraction (B-layer) public import sisudoc.ocda.abstraction.ssp; // spineAbstractionTxt (.ssp) +public import sisudoc.ocda.abstraction.ssp_in; // spineAbstractionRead (.ssp back in) -- cgit v1.2.3