[sword-devel] Sections, Titles and OSIS hiccups

Greg Hellings greg.hellings at gmail.com
Sat Aug 15 23:00:57 MST 2009

OSIS fans and module gurus,

I'm trying to follow the best practices of OSIS here, but things just
seem a little out of whack - and it regards the mischevious
inter-verse content.  I have rendered the following OSIS snippet:

    <verse eID="Matt.1.25"/>
    <chapter eID="Matt.1"/>
<div type="section" canonical="true">
    <title>Ang Pag-abot it mga Mainalamon nga mga Tawo</title>
    <chapter osisID="Matt.2" sID="Matt.2"/>
    <verse osisID="Matt.2.1" sID="Matt.2.1"/>

While this seems like the right way, conceptually, to do things in my
opinion, the results are not what I want.  The title text clearly is
associated with Chapter 2, in both semantics and in the OSIS document
itself.  Title is a sibling of the <chapter osisID="Matt.2"> element,
while being but a cousin of Matt.1's elements.  When I display the
text in a frontend, however, I find the text of that title at the end
of chapter 1 instead of right before chapter 2.

More frustrating, though, the following corresponding snippet, from
the beginning of the book:
<div type="book" canonical="true" osisID="Matt">
    <title type="main" short="Matt">Matt</title>
    <div type="section" canonical="true">
        <title>Ang mga Ulang ni Jesu Kristo</title>
        <chapter osisID="Matt.1" sID="Matt.1"/>
        <verse osisID="Matt.1.1" sID="Matt.1.1"/>
renders exactly as I want it to.  When I pull up Matthew 1, I get the
section title, "Ang mga Ulang ni Jesu Kristo," right before verse 1.
That's what I want to happen with identical code at the beginning of
chapter 2, but it doesn't!
I realize that calculating such relative relationships is possibly
beyond the ken of osis2mod, but is there any better means I could use
to associate that title with chapter 2?  It's not a chapter title, so
putting it inside of either chapter limits is clearly incorrect.  I
could possibly render it to be part of Matt.2.0, but it's not an
introduction, and the section that it titles does not span the whole
chapter and the title would not be displayed anyway, in most

My own suggestion is that a <title> element should be associated with
the object that it precedes - at least in the English speaking world
I'm accustomed to seeing titles before their works.  Whether or not it
is actually *part of* that object is probably a case-by-case
situation, and one best left up to the encoder.  But, in the interim,
what am I to do here?


More information about the sword-devel mailing list