diff options
Diffstat (limited to 'org/in_abstraction_artefacts.org')
| -rw-r--r-- | org/in_abstraction_artefacts.org | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/org/in_abstraction_artefacts.org b/org/in_abstraction_artefacts.org index bbbdbd9..5abe72d 100644 --- a/org/in_abstraction_artefacts.org +++ b/org/in_abstraction_artefacts.org @@ -388,6 +388,14 @@ template spineAbstractionRead() { case "section": obj.metainfo.is_of_section = _val; break; case "parent": obj.metainfo.parent_ocn = _val.to!int; break; case "last_descendant": obj.metainfo.last_descendant_ocn = _val.to!int; break; + case "ocn_range": { + auto _r = _ints(_val); + if (_r.length == 2) { + obj.metainfo.ocn_range_first = _r[0]; + obj.metainfo.ocn_range_last = _r[1]; + } + break; + } case "children": obj.metainfo.children_headings = _ints(_val); break; case "ancestors": obj.metainfo.markedup_ancestors = _eight(_val); @@ -881,6 +889,11 @@ template spineAbstractionDbRead() { obj.metainfo.parent_ocn = row[_col["parent_ocn"]].as!int; obj.metainfo.parent_lev_markup = row[_col["parent_lev"]].as!int; obj.metainfo.last_descendant_ocn = row[_col["last_descendant_ocn"]].as!int; + /+ ↓ 2.1: a 2.0 database has no such columns, and reads as no range +/ + if ("ocn_range_first" in _col) { + obj.metainfo.ocn_range_first = row[_col["ocn_range_first"]].as!int; + obj.metainfo.ocn_range_last = row[_col["ocn_range_last"]].as!int; + } obj.metainfo.children_headings = _jsonInts(row[_col["children"]].as!string); obj.metainfo.markedup_ancestors = _jsonEight(row[_col["ancestors"]].as!string); obj.metainfo.collapsed_ancestors = _jsonEight(row[_col["ancestors_collapsed"]].as!string); @@ -1673,13 +1686,11 @@ template spineDocHasFromAbstraction() { _tag_assoc[obj.metainfo.identifier]["seg_lv4"] = obj.tags.html_segment_anchor_tag_is; } - /+ ↓ An object that is not written into any segment still carries an - identifier, and can share it: a poem block and its verses have one - ocn between them, the verses are written and the block itself is not. - The block comes second, so an unguarded assignment replaced a good - segment name with an empty one, and the link came out as - ".xhtml#297". seg_lv4 above is guarded already, which is why this - showed in the epub and not in the html. + /+ ↓ An object that is not written into a segment still carries an + identifier, and could share it: a poem block carried the ocn of + its last verse until spec:2.1, with an issue affecting epub output. + Since spec:2.1 the poem has no identifier; the guard stays, for any + object that is not in a segment. +/ if (obj.tags.epub_segment_anchor_tag_is.length > 0) { _tag_assoc[obj.metainfo.identifier]["seg_lv1to4"] |
