diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-29 14:07:32 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-29 14:07:32 -0400 |
| commit | 8b8a8c1b61c740528e1409a2429f7ec4403f9576 (patch) | |
| tree | 9bd2fa19837c187232cfc93960c9291a6fd4b4b9 /dlang/src/ocda/model.d | |
| parent | format 2.0: abstraction as library, in D and Gleam (diff) | |
model 2.1: ocn_range, the verses a poem holds
The format now states, for a container, the first and last ocn of
what it holds: .ocn_range in the .ssp, ocn_range_first and
ocn_range_last in the .ocda.db. A poem is the one container, and since
2.1 it carries ocn 0 and comes before its verses.
Both fields in the model, read by both loaders, in both languages, and
written by the dump. A 2.0 database has neither column, so each
loader asks sqlite whether it is there and reads a 2.0 file as having
no ranges, which is what 2.0 meant; checked on a published 2.0
database, D and Gleam giving the same dump.
Over the markup document samples written by spine at 2.1, the four
dumps (D and Gleam, .ssp and .ocda.db) are byte identical for every
document-language.
(assisted by Claude-Code)
Diffstat (limited to 'dlang/src/ocda/model.d')
| -rw-r--r-- | dlang/src/ocda/model.d | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dlang/src/ocda/model.d b/dlang/src/ocda/model.d index 403502a..6c8fc37 100644 --- a/dlang/src/ocda/model.d +++ b/dlang/src/ocda/model.d @@ -27,6 +27,8 @@ struct OcdaObject { string[] anchor_tags; // named targets the markup placed on this object int parent_ocn; int last_descendant_ocn; + int ocn_range_first;// a container (a poem): the first and last + int ocn_range_last; // ocn of what it holds; 0 otherwise (2.1) int[] children; // direct child heading OCNs int[] ancestors; // markedup_ancestors[8] bool dummy_heading; |
