[sword-devel] Psalm 3.1 returns canonical title
dmsmith at crosswire.org
Sun Jul 14 12:13:27 MST 2013
This is in reply to this and another thread on the same subject. And cross-posting to JSword-devel to which this and the other post belong.
First, Verse 0 is a SWORD construct indicating non-canonical material standing before the first verse, whether of the testament, book or chapter. It should never have canonical material in it. It was originally used for just headings and typically only has one or more titles, but more generally applies to any introductory material. It is possible for an author of OSIS to mark introductory material as canonical. However that is a bad practice.
To my knowledge, Psalm headings/titles and book colophons are the only canonical material outside of verses. The difference between the two is that the Psalm title needs to appear before the verse number. We use a special construct for this called the "preverse" div, which is prepended to the canonical verse content. The attributes on the title element are taken from the OSIS source. This preverse div is part of the stored entry for the verse.
A colophon merely appears after the last verse of the book and has no specific delineation from the last verse. They are merely appended to that verse when the OSIS is converted to a module.
I could modify osis2mod to have an osisID, based upon the verse that it precedes. But the reason that you don't find an osisID on the material that stands before the verse is that the authored OSIS does not have one.
BTW, in the sample below the wrapping div, the x-gen entries and the verse begin/end are created by JSword, but otherwise the content is exactly what comes out of the OSIS module.
I'm not clear on where you are going with this line of questions. It might help if we knew what you were trying to accomplish.
On Jul 14, 2013, at 5:28 AM, Chris Burrell <chris at burrell.me.uk> wrote:
> In the ESV, if we simply look up one verse, we get the canonical title. However, the canonical title is not attached to any verse. There is also no previous osisID in the fragment for which we can determine the fact it's part of verse 0.
> <title type="x-gen">Psalms 3:1</title>
> <div type="x-milestone" subType="x-preverse" sID="pv2789" />
> <div sID="gen7559" type="section" />
> <title>Save Me, O My God</title>
> <title canonical="true" type="psalm" subType="x-preverse">
> A Psalm of David,
> <note n="n" osisID="Ps.3.1!crossReference.n" osisRef="Ps.3.1" type="crossReference">
> <reference osisRef="2Sam.15.14-2Sam.15.17">2 Sam. 15:14-17</reference>
> when he fled from Absalom his son.
> <lg sID="gen7560" />
> <div type="x-milestone" subType="x-preverse" eID="pv2789" />
> <verse osisID="Ps.3.1">
> Any ideas if this is a bug (perhaps this is similar to a thread I started yesterday).
> Presumably the canonical should not be output, or it should be output but within a Psalm.3.0 div (or at least in proximity of a div Psalm.3.0 tag)
> sword-devel mailing list: sword-devel at crosswire.org
> Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4145 bytes
Desc: not available
More information about the sword-devel