AndBible / and-bible

AndBible: Bible Study
https://andbible.org
GNU General Public License v3.0
576 stars 193 forks source link

ERV last verse often missing #76

Closed mjdenham closed 5 years ago

mjdenham commented 7 years ago

The last verse is missing in many chapters of the ERV when viewed in And Bible e.g. Psalms 2, Psalms 3.

mjdenham commented 7 years ago

http://sword-dev.350566.n4.nabble.com/ERV-issues-in-And-Bible-td4656923.html

The problem is that many verses at the end of chapters have a div with pre-verse and start-milestone attributes but there is no matching end-milestone div and the div does not appear to contain anything anyway.

David: Just did a mod2osis dump of the whole module.

I think there are problems such as you describe whereby there are three milestones with the same ID value.

$$$Psalms 2:12 <div type="x-milestone" subType="x-preverse" sID="pv6983"/><lg sID="gen11906"/><l level="1" sID="gen11907"/> <div type="x-milestone" subType="x-preverse" eID="pv6983"/>Show that you are loyal to his son,<note osisID="Ps.2.12!note.1" osisRef="Ps.2.12" placement="foot" type="translation"> <reference osisRef="Ps.2.12" type="source">2:12 </reference><catchWord>Show … his son </catchWord>Literally, “Kiss the son.”</note> <l eID="gen11907" level="1"/><l level="2" sID="gen11908"/>or the Lord will be angry and destroy you. <l eID="gen11908" level="2"/><lg eID="gen11906"/><lg sID="gen11909"/><l level="1" sID="gen11910"/>He is almost angry enough to do that now, <l eID="gen11910" level="1"/><l level="2" sID="gen11911"/>but those who go to him for protection will be blessed. <l eID="gen11911" level="2"/><lg eID="gen11909"/><div type="x-milestone" subType="x-preverse" sID="pv6984"/><lb/><chapter eID="Ps.2.seID.14174"/> $$$Psalms 3:0 <chapter n="3" osisID="Ps.3" sID="Ps.3.seID.14187"/> <div sID="gen11912"/> $$$Psalms 3:1 <div type="x-milestone" subType="x-preverse" sID="pv6984"/><title canonical="true" type="psalm">A song of David^ written during the time he was running from his son Absalom. </title><lg sID="gen11913"/><l level="1" sID="gen11914"/> <div type="x-milestone" subType="x-preverse" eID="pv6984"/>LORD, I have so many enemies. <l eID="gen11914" level="1"/><l level="2" sID="gen11915"/>So many people have turned against me. <l eID="gen11915" level="2"/><lg eID="gen11913"/>

If you search in this part of the file for the string ID=""pv6984" there are three matches when there should only be two.

The problem is that the start milestone div appears twice in such problem areas.

I suspect that Michael has somehow introduced a fresh bug in Haiola, and that once this is fixed, the module will behave correctly again.

I don't think you need to tweak And Bible even though some other front-ends can somehow cope with this anomaly.

Michael reads the messages sent to this list, so I'm confident that he will take action accordingly.

For all we know, it may be affecting many more modules at eBible.org because they are generated automatically by one of the scripts he uses with Haiola.

Even so, there seems to be a more fundamental problem.

Elements that are ‘milestoneable’ in the OSIS schema are: • abbr • chapter • closer • foreign • l • lg • q • salute • seg • signed • speech • verse

Observe that this does not include the div element.

Yet that is exactly what he has used, and I presume that in his Modified OSIS schema this will validate. There's probably never been any discussion as to how SWORD will behave with /milestoned/ div elements, but this is quite a different matter than there being an extra start milestone div at several locations.

mjdenham commented 7 years ago

There was no fix applied to ERV and other apps did not have a problem so I have added a fix to And Bible. At the end of each verse AB now forcefully closes any unclosed pre-verse tags.

tuomas2 commented 5 years ago

Looks like this is fixed.