[sword-devel] Pre-verse text handling in OSIS-based Sword modules

DM Smith dmsmith555 at yahoo.com
Tue May 1 09:14:33 MST 2007


If a title has a type of main or chapter, and it is in a book div or a 
chapter div or chapter element, then it is taken as a title for that 
book or chapter.

It should be positioned immediately after the opening of a book or a 
chapter. Otherwise, osis2mod will do strange stuff (i.e. reorder the input).

If a title does not have the type of main or chapter, then it is 
understood as a preverse title. There is no special tagging needed.

The title will become:
<title type="section" subType="x-preverse">your title content</title>
and will be made to be the first element within the verse.

Titles which are part of the Bible (e.g. psalm titles) should have the 
attribute canonical="true". This will prevent Sword from hiding them 
when headings are hidden.

Note, Sword has some bugs with regard to rich content within a title. 
Currently, notes don't work well and for some reason <divineName> is odd.

With regard to tags between verses, there is some reordering that 
happens. The following empty elements are appended to the prior verse:
p, div, lg, l, lb and q.

Anything else between verses is prepended to the following verse, but 
after a preverse title if any.

And as a special case, everything after the last verse in a chapter is 
appended to that verse.

In Him,

Kahunapule Michael Johnson wrote:
> I think I remember some discussion about how pre-verse text should be
> marked in OSIS-based Sword modules. For example, you might want to
> include a Psalm title before verse 1 officially starts when getting the
> first verse of a Psalm, or maybe include a subtitle (for those
> translations that have them) with the verse it precedes. Such things
> could be inferred from just looking from where the last verse ends
> (either explicitly with a verse-end marker in OSIS or implicitly, by
> finding where the canonical text (i. e., not a title, subtitle, etc.) of
> the previous verse ends in USFM). Did you decide to use a custom
> milestone to indicate the beginning of preverse text, or go with some
> other mechanism? Is such a milestone something that is automatically
> added in the module creation process, or is it something that would be
> useful for me to put in my USFM to OSIS converter?
> (Actually, I'm not converting USFM directly to OSIS, but USFM to USFX to
> OSIS. The difference is rather subtle, since USFX is just an XML
> representation of USFM, slightly extended.)
> Michael
> http://kahunapule.org
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

More information about the sword-devel mailing list