[sword-devel] Small problem with section headers in an OSIS module

Tom Cornell tom.cornell at gmail.com
Sun Nov 30 10:34:50 MST 2008

> The other (very good) possibility is a problem with the importer. DM
> just did a rather radical update to osis2mod (and by "just", I mean
> since 1.5.11). So my first question would be: are you using osis2mod
> from 1.5.11 (or another release) or are you compiling it from SVN?

I just built from the release, so osis2mod is the 1.5.11 release
version. (Rev 2169 is what osis2mod shows.)

> Another piece of data that would help us to analyze where the bug is
> (and I'm fairly certain it's a bug in someone's code) would be a chunk
> of data from the module itself (post osis2mod). You can get at this by
> running mod2imp on your module. Then search the resulting .imp file for
> an example of the misbehaving data and post a snippet to the list. Since
> you have headings, there should definitely have been some manipulation
> of the data by osis2mod. It's just hard to guess what it might have done
> wrong (if that's the case).

Well, I think this gives a definite clue. Thank you, Chris, for your
instructions. I am providing 2 snippets from the output of mod2imp.
The first shows a section heading associated with John 1; the second
shows a section heading associated with John 17. What immediately
jumps out is that the <div> tag precedes the <title> in the first
case, but follows it in the second. I presume that the <div> tag is
introducing a newline that ends up getting displayed after the verse
number. Is the verse number being generated along with the title? Also
I'm guessing that the switched orders might have to do with the
influence of "verse zero", but that's a shot in the dark.

$$$John 11:0
<title type="chapter">Chapter 11</title> <div type="section">
$$$John 11:1
<title subType="x-preverse" type="section">The Death of
Lazarus</title>  <w>ἦν</w> <w>δέ</w> <w>τις</w> <w>ἀσθενῶν</w>
<w>Λάζαρος</w> <w>ἀπὸ</w> <w>Βηθανίας</w> <w>ἐκ</w> <w>τῆς</w>
<w>κώμης</w> <w>Μαρίας</w> <w>καὶ</w> <w>Μάρθας</w> <w>τῆς</w>
<w>ἀδελφῆς</w> <w>αὐτῆς</w>
$$$John 11:2
<w>ἦν</w> <w>δὲ</w> <w>Μαριὰμ</w> <w>ἡ</w> <w>ἀλείψασα</w> <w>τὸν</w>
<w>κύριον</w> <w>μύρῳ</w> <w>καὶ</w> <w>ἐκμάξασα</w> <w>τοὺς</w>
<w>πόδας</w> <w>αὐτοῦ</w> <w>ταῖς</w> <w>θριξὶν</w> <w>αὐτῆς</w>
<w>ἧς</w> <w>ὁ</w> <w>ἀδελφὸς</w> <w>Λάζαρος</w> <w>ἠσθένει</w>
$$$John 11:3
<w>ἀπέστειλαν</w> <w>οὖν</w> <w>αἱ</w> <w>ἀδελφαὶ</w> <w>πρὸς</w>
<w>αὐτὸν</w> <w>λέγουσαι</w> <w>κύριε</w> <w>ἴδε</w> <w>ὃν</w>
<w>φιλεῖς</w> <w>ἀσθενεῖ</w>

$$$John 11:16
<w>εἶπεν</w> <w>οὖν</w> <w>Θωμᾶς</w> <w>ὁ</w> <w>λεγόμενος</w>
<w>Δίδυμος</w> <w>τοῖς</w> <w>συμμαθηταῖς</w> <w>ἄγωμεν</w> <w>καὶ</w>
<w>ἡμεῖς</w> <w>ἵνα</w> <w>ἀποθάνωμεν</w> <w>μετ'</w> <w>αὐτοῦ</w>
$$$John 11:17
<title subType="x-preverse" type="section">Jesus the Resurrection and
the Life</title> <div type="section">   <w>ἐλθὼν</w> <w>οὖν</w>
<w>ὁ</w> <w>Ἰησοῦς</w> <w>εὗρεν</w> <w>αὐτὸν</w> <w>τέσσαρας</w>
<w>ἤδη</w> <w>ἡμέρας</w> <w>ἔχοντα</w> <w>ἐν</w> <w>τῷ</w>
$$$John 11:18
<w>ἦν</w> <w>δὲ</w> <w>ἡ</w> <w>Βηθανία</w> <w>ἐγγὺς</w> <w>τῶν</w>
<w>Ἱεροσολύμων</w> <w>ὡς</w> <w>ἀπὸ</w> <w>σταδίων</w>
$$$John 11:19
<w>πολλοὶ</w> <w>δὲ</w> <w>ἐκ</w> <w>τῶν</w> <w>Ἰουδαίων</w>
<w>ἐληλύθεισαν</w> <w>πρὸς</w> <w>τὴν</w> <w>Μάρθαν</w> <w>καὶ</w>
<w>Μαριὰμ</w> <w>ἵνα</w> <w>παραμυθήσωνται</w> <w>αὐτὰς</w>
<w>περὶ</w> <w>τοῦ</w> <w>ἀδελφοῦ</w>

Note: I deleted all the attributes of the <w> tags to shorten things
up, so in that respect this isn't pristine mod2imp output. I doubt
that matters...

By the way, just to get this into the archives in case anyone else
is/will be banging their head against a similar problem: Until
recently, I could only get section headings to display as part of the
verse text (between the verse number and the first word of the verse).
The problem was that I had forgotten to add
``GlobalOptionFilter=OSISHeadings'' to the .conf file. Problem solved.

-Tom Cornell

More information about the sword-devel mailing list