adyeths / u2o

USFM to OSIS bible format converter.
The Unlicense
19 stars 6 forks source link

Two Psalms gave NESTING error after the latest fix to processing the qa tag #88

Closed DavidHaslam closed 5 years ago

DavidHaslam commented 5 years ago

When I made a SWORD module from the OSIS file for the Belarusian Bible, the log for osis2mod included NESTING errors for Ps.9.1 and Ps.33.1.

These two Psalms are similar to each other in respect of having a verse tagged descriptive title followed immediately by an acrostic title.

\d \v 1  Кіроўцу хору. Пасьля сьмерці Лабэна. Псальма Давідава.
\qa Алэф
\q \v 2  Славіць буду \add Цябе \add* , Госпадзе, усім сэрцам маім, абвяшчаць пра ўсе цуды Твае,

and

\d \v 1  Псальма Давіда, калі ён удаваў зь сябе вар'ята перад Авімэлэхам і быў ад яго выгнаны, і пайшоў.
\qa Алэф
\q \v 2  Дабраслаўляю Госпада ва ўсякую пору; хвала Яму няспынная ў вуснах маіх.

Moving the verse sID milestone to before the title element makes the error message go away, though that's not necessarily the best workaround let alone the right solution.

e.g. Instead of

<title>Псальма хвалы і надзеі</title>
<!-- d --><title type="psalm" canonical="true">
<verse sID="Ps.33.1" osisID="Ps.33.1" n="1" />Псальма Давіда, калі ён удаваў зь сябе вар'ята перад Авімэлэхам і быў ад яго выгнаны, і пайшоў.</title>
<title type="acrostic">Алэф</title>
<lg>
<l level="1">
<verse eID="Ps.33.1" />

have

<title>Псальма хвалы і надзеі</title>
<verse sID="Ps.33.1" osisID="Ps.33.1" n="1" />
<!-- d --><title type="psalm" canonical="true">Псальма Давіда, калі ён удаваў зь сябе вар'ята перад Авімэлэхам і быў ад яго выгнаны, і пайшоў.</title>
<title type="acrostic">Алэф</title>
<lg>
<l level="1">
<verse eID="Ps.33.1" />

LOG

WARNING(NESTING): verse Ps.9.1 is not well formed:(4,3)
WARNING(NESTING): verse Ps.33.1 is not well formed:(4,3)
DavidHaslam commented 5 years ago

NB. These two Psalms are not the only ones that have a verse tagged descriptive title, that begins with \d \v 1, but they are the only 2 out of 47 in which the next line begins with \qa.

adyeths commented 5 years ago
  1. I'm not moving the verse start marker.
  2. I will need your latest edited text in order to test a postprocessing fix for position of the verse end marker position.
DavidHaslam commented 5 years ago

I did first try moving the verse end marker but that did not eliminate the nesting error.

It’s an unusual corner case for these two Psalms.

I’m a bit stumped.

DavidHaslam commented 5 years ago

Herewith 19-psalm.txt.usfm.zip in which the usfm file was lasted edited at 16:40 today.

adyeths commented 5 years ago

Placement of verse end markers following acrostic titles has been adjusted.

DavidHaslam commented 5 years ago

Thanks. Will test it soon.

DavidHaslam commented 5 years ago

Tested.

Module Bela rebuilt and no more NESTING warnings.

Thanks.