From 8fd585f659c5dfc7c822cb8b7d66d2c5f9e901a1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 26 Sep 2026 00:50:16 -0400 Subject: 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) --- dlang/src/ocda/dump.d | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dlang/src/ocda/dump.d') diff --git a/dlang/src/ocda/dump.d b/dlang/src/ocda/dump.d index e308db2..b16a209 100644 --- a/dlang/src/ocda/dump.d +++ b/dlang/src/ocda/dump.d @@ -97,6 +97,7 @@ string dumpDocument(ref OcdaDocument doc) { kv("segment_prev", obj.segment_prev); kv("segment_next", obj.segment_next); kv("anchor", obj.anchor); + kv("heading_lev_anchor", obj.heading_lev_anchor); kn("table_cols", obj.table_cols); kv("table_widths", obj.table_widths); kv("table_aligns", obj.table_aligns); @@ -106,6 +107,7 @@ string dumpDocument(ref OcdaDocument doc) { kv("heading_ancestors_text", obj.heading_ancestors_text); kv("sha256", obj.sha256); foreach (url; obj.stow_link) { kv("stow_link", url); } + foreach (a; obj.anchor_tags) { kv("anchor_tag", a); } foreach (img; obj.images) { /+ ↓ the name last, because a filename may hold a space where none of the other fields can +/ -- cgit v1.2.3