I'm wondering if the seemingly redundant verse end tags might actually be useful for encoding of this sort. You could put extra titles and stuff that goes before a canonical verse after the end tag for the previous verse, but before the verse marker. Then, when going to display a verse range with a heading before it, you actually display all of the text between the end verse tag of the verse before the first verse of the range and the end tag of the last verse in the range. That way, if you request the first verse of a psalm with a title (where the title isn't listed as verse one in that translation), you get the title plus the verse, with the verse marker in the proper place. The same applies to added publisher titles like the example you gave for James 1.

Would it cause any problems to normalize OSIS texts that way, such that titles aren't actually included in canonical verses? My current OSIS creator filter doesn't work this way, but perhaps it should.

     <l type="x-primary">Amen and amen.</l>
    </lg>
    <verse eID="Ps.41.13" />
    <chapter eID="Ps.41" />
    <div>
    <title>BOOK II</title>
    <div>
    <chapter sID="Ps.42" osisID="Ps.42" />
    <title canonical="true">For the Chief Musician. A contemplation by the sons of Korah.</title>
    <lg>
     <l type="x-primary">
      <verse sID="Ps.42.1" osisID="Ps.42.1" />As the deer pants for the water brooks,</l>
     <l type="x-secondary">so my soul pants after you, God.<note type="translation">The Hebrew word rendered “God” is “Elohim.”</note></l>
    </lg>
    <lg>
     <l type="x-primary">
      <verse eID="Ps.42.1" />
      <verse sID="Ps.42.2" osisID="Ps.42.2" />My soul thirsts for God, for the living God.</l>
     <l type="x-secondary">When shall I come and appear before God?</l>
    </lg>
      <verse eID="Ps.42.2" />

In the above incomplete (not well-formed) fragment, asking for Psalm 42:1 should yield something like

BOOK II

42

    For the Chief Musician. A contemplation by the sons of Korah.

     1As the deer pants for the water brooks,
           so my soul pants after you, God.*

 ____

*The Hebrew word rendered “God” is “Elohim.”




_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Reply via email to