[sword-devel] osis2mod and preverse content
dmsmith555 at yahoo.com
Tue Jul 1 12:31:09 MST 2008
Greg Hellings wrote:
> On Tue, Jul 1, 2008 at 2:03 PM, DM Smith <dmsmith555 at yahoo.com> wrote:
>> Some background:
>> osis2mod takes all the text in its input, dices it up into verses and
>> stores that in the module.
>> A SWORD module contains only verses, with special verses to hold
>> introductions to testament, book and chapters.
>> There are several kinds of text that can fall before a verse:
>> 1) Testament introduction.
>> 2) Book introduction.
>> 3) Chapter introduction
>> 4) Section introduction
>> Currently the only kind of section introduction that SWORD and osis2mod
>> handles is a heading, aka title.
>> The material that stands before the first verse in a chapter is handled
>> specially as there is some ambiguity as to what is a chapter
>> introduction and what is a section introduction.
>> Inter-verse material, i.e. stuff between verses, is split between the
>> prior and the following verse. Typically, all whitespace is appended to
>> the prior verse. Titles are attached to the following verse.
>> So that the SWORD engine can place the verse number in the correct
>> location, the title that is attached to the verse is given a type of
>> "x-preverse". When rendering the verse number, the SWORD engine puts it
>> after the preverse title.
>> The problem is that as we see more and more OSIS Bibles, we are finding
>> more and more pre-verse content. It does not neatly fall into the
>> category of <title>. And all of it is very valid and very good OSIS.
>> The current problem we have encountered in the Wycliffe Bibles (in beta) is:
>> <div type="section">
>> <verse osisID="Matt.5.21">...</verse>
>> osis2mod is improperly throwing the reference in to a title and marking
>> it x-preverse.
>> Then the <div> confuses osis2mod, causing the real title to be put into
>> the verse after the number.
>> I'd like to propose the following change and would like feedback.
>> All material that is deemed pre-verse, will be put into a <div
>> type="x-preverse">....</div> and prefixed to the verse. It will use the
>> container form of the element. The current handling of the "canonical"
>> attribute would be retained, so that canonical headings would not be
>> hidden when headings are turned off.
> I'm pro-any changes that allow the engine to better maintain all of
> the extra metadata which an OSIS document might contain that the Sword
> interior format does not. However, by placing it all in a div
> element, aren't you losing some of the ability to losslessly maintain
> the original OSIS structure in the Sword library rendering of it?
Starting where we are at with today's osis2mod, it is an improvement on
it being structurally lossless. (Note: osis2mod does not loose any text.)
If we can agree that the milestoned form of an element is equivalent to
the non-milestoned form, then this will approach structural losslessness.
As to how it is rendered, the structure is interpreted by a filter.
Different filters can render structure differently. And some structural
elements have no impact on rendering, E.g. <seg>.
In this case, marking the div with a type="x-preverse", we can change
the SWORD to only render it's content and place the verse number after
it. So essentially the only visual impact it will have is on the
placement of the verse number.
>> This would require a change to the SWORD engine, so this would be a
>> 1.5.12 change.
More information about the sword-devel