[sword-devel] Latest osis2mod doing funny things with chapter titles

DM Smith dmsmith555 at yahoo.com
Tue Dec 2 02:59:05 MST 2008


You have hit the bug that Chris noticed. Can you email me directly  
your input file so I can use it as a test case? (Don't post it to the  

See below for responses to specific questions.

In Him,

On Dec 2, 2008, at 1:23 AM, Tom Cornell wrote:

> So the latest SVN version of osis2mod (Rev: 2197, anyway) solved my
> problems with section headings and verse numbers. (Yay!) But I failed
> to notice what it was doing with my chapter titles: Chapter 11 was
> getting as its title "Chapter 12", and so on. I added a chapter title
> to Chapter 2, and Chapter 1 got _both_ titles.

This is a bug.

There is a similar problem with chapter introductions.

> Running osis2mod I get (only) the following message:
> Appending entry: John.1: <chapter eID="gen3" n="1" osisID="John.1"/>
> <title type="chapter">Chapter 2</title>
> I don't know if this is meant to be taken as a warning, or is just a
> status message.

This is a status message, but if it is unexpected then it is warning  
of a problem.

Here is an explanation of this diagnostic for anyone that is interested.

A SWORD Bible module is an indexed database of verses, keyed by the  
verse reference. The verse reference consists of Testament, Book,  
Chapter and Verse. Verse 0 indicates an introduction. When the Chapter  
is 0 then the introduction is for the book, otherwise it is for the  
specified chapter.

The order of the verses in the input is immaterial. As osis2mod  
encounters a verse it either inserts it into the database or appends  
it to the entry, if it already exists in the module. When a verse is  
encountered that is not in the KJV versification, the nearest prior  
verse is found and the text is appended to it.

If all of your verses are in the KJV versification, then this message  
should never be seen.

> In the module itself, only chapter end milestones show up; there are
> no chapter start milestones. Is that as it should be?

Because a chapter can be represented by both <chapter> and <div  
type="chapter">, this is an artifact of not knowing what </div> ended.

Bug fixes aside, the next major change to osis2mod is to handle inter- 
verse material better. This will be addressed then.

> OSIS code looks like this:
> <div type="book" osisID="John" canonical="true">
> <title type="main" short="John">ΚΑΤΑ ΙΩΑΝΝΗΝ</title>
> <chapter osisID="John.1" n="1">
> <title type="chapter">Chapter 1</title>
> <div type="section">
> <title>The Word Became Flesh</title>
> <p>
> <verse n="1" osisID="John.1.1" sID="John.1.1"/>
> ...
> <verse eID="John.1.51"/>
> </p>
> </div>
> </chapter>
> <chapter osisID="John.2" n="2">
> <title type="chapter">Chapter 2</title>
> <verse n="1" osisID="John.2.1" sID="John.2.1"/>

This is good looking OSIS!

> The module looks like this:
> Up to the first verse (the module contains only John):
> <lb type="x-begin-paragraph"/> <lb type="x-end-paragraph"/> <div
> sID="gen1" type="bookGroup"/> <title>New Testament</title>  <title
> short="John" type="main">ΚΑΤΑ ΙΩΑΝΝΗΝ</title>
> <div sID="gen4" type="section"/> <lb type="x-begin-paragraph"/> <title
> type="chapter">Chapter 1</title>
> <title subType="x-preverse" type="section">The Word Became
> Flesh</title>   <w>Ἐν</w> <w>ἀρχῇ</w> ...
> Last verse of John 1 through first verse of John 2:
> ...  <lb type="x-end-paragraph"/> <div eID="gen8" type="section"/>
> <div sID="gen4" type="section"/> <lb type="x-begin-paragraph"/> <title
> type="chapter">Chapter 1</title> <chapter eID="gen3" n="1"
> osisID="John.1"/>  <title type="chapter">Chapter 2</title>
> ...
> Note the repeated <title>Chapter 1</title> at the end of that
> chapter/beginning of Chapter 2.
> Is this what the output of osis2mod should look like?

This output is wrong.

> I should mention that I am running a BibleTime ( straight out
> of an Ubuntu package, so it is presumably using an old version of
> Sword, probably 1.5.9. So it may be that the osis2mod output is fine,
> and the front end is just expecting something different. But I had no
> problems with the osis2mod from the 1.5.11 release, except for the
> newline after verse numbers noted in a previous thread.

Osis2mod should work just fine with a 1.5.9 (or later) SWORD engine.

More information about the sword-devel mailing list