Details
-
Type:
Bug
-
Status: Open (View Workflow)
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: osis2mod
-
Labels:
Description
The majorSection osis2mod.cpp patch of Dec 2014 seems to assume majorSection titles are never pre-verse titles. But often majorSection titles are just titles, or a series of titles, which are best treated as pre-verse titles.
Also, majorSection titles are sometimes followed by scope titles: <title type="scope"> forming a compound title, and the scope title is considered pre-verse. So in this case what should be a single title block is split into two, with the majorSection title in the introduction and its scope title separated into the pre-verse group.
Also sometimes majorSection titles appear in the Bible or Testament introduction. When this happens, the wrong state is entered, and the introduction material after the majorSection title is lost.
Maybe majorSection titles should be treated like regular section titles (which are pre-verse) unless one is known to be followed by non-title material and then it should be appended to the current introduction (which is not always the chapter introduction)?
I found out the original patch had nothing to do with majorSection titles being followed by introductory material (
MODTOOLS-77). So I think all these breakages (including the original issue in 2014) can be solved by having osis2mod treat majorSection divs as another section div in terms of pre-verse content. Then, majorSection headings and all following headings should always proceed their following verse and not end up stuck at the end of an introduction.The fix is then to just remove the majorSection patch of Dec 2014 (now lines 889-917) and change osis2mod.cpp line 966 from:
if ((tokenName == "div" && typeAttr == "section") ||
to
if ((tokenName == "div" && (typeAttr.endsWith("section") || typeAttr.endsWith("Section"))) ||
or for good measure, the following would also prevent any real introduction title at the end of an intro from ever getting removed from there and stuck with the next verse:
if ((tokenName == "div" && (typeAttr.endsWith("section") || typeAttr.endsWith("Section")) && token.getAttribute("subType") != "x-introduction") ||
This also addresses MODTOOLS-94.