diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-26 00:50:16 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-10-02 21:38:29 -0400 |
| commit | 8fd585f659c5dfc7c822cb8b7d66d2c5f9e901a1 (patch) | |
| tree | da7d5e19a865627108e01f0a758a953c674cd94b /gleam/src/ocda/load_ssp.gleam | |
| parent | a third input form: the abstraction out of a pod archive (diff) | |
two fields the model was missing, found by writing an html writer
anchor_tags and heading_lev_anchor. Both are in the specification's
property table and neither was read, so they went to the unknown counts
and a writer over the library had no way to emit a link target.
The cost was visible the moment an html writer existed: 154 of its
internal links pointed at nothing, because a note reference points at
the endnote's anchor and the endnote's anchor is an anchor_tag.
heading_lev_anchor is the name a document's own cross references use,
1,854 of them in the reference collection.
The .ssp carries them as repeated .anchor_tag and as
.heading_lev_anchor; the database as the object_anchors child table and
the heading_lev_anchor column. Both loaders read both now, the dump
reports them, and the four-way agreement still holds: 36 of 36 each way.
One thing to watch when adding a column to the database query: the read
is by position, so a column inserted in the middle shifts every one
after it. Adding heading_lev_anchor after segment_html_is broke all 36
documents until it moved to the end of the select.
(assisted by Claude-Code)
Diffstat (limited to 'gleam/src/ocda/load_ssp.gleam')
| -rw-r--r-- | gleam/src/ocda/load_ssp.gleam | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gleam/src/ocda/load_ssp.gleam b/gleam/src/ocda/load_ssp.gleam index 6dcc38a..83af6e2 100644 --- a/gleam/src/ocda/load_ssp.gleam +++ b/gleam/src/ocda/load_ssp.gleam @@ -267,6 +267,10 @@ fn apply_property( Object(..object, stow_link: list.append(object.stow_link, [value])), True, ) + "anchor_tag" -> #( + Object(..object, anchor_tags: list.append(object.anchor_tags, [value])), + True, + ) "parent" -> #(Object(..object, parent_ocn: parse_int(value)), True) "last_descendant" -> #( Object(..object, last_descendant_ocn: parse_int(value)), @@ -295,6 +299,10 @@ fn apply_property( "segment_prev" -> #(Object(..object, segment_prev: value), True) "segment_next" -> #(Object(..object, segment_next: value), True) "anchor" -> #(Object(..object, anchor: value), True) + "heading_lev_anchor" -> #( + Object(..object, heading_lev_anchor: value), + True, + ) "table_cols" -> #(Object(..object, table_cols: parse_int(value)), True) "table_widths" -> #(Object(..object, table_widths: value), True) "table_header" -> #(Object(..object, table_header: value == "true"), True) |
