[sword-devel] preverse divs

DM Smith dmsmith at crosswire.org
Wed Feb 29 08:01:28 MST 2012

This encoding will cause problems. When osis2mod sees your markup, it 
doesn't care that you have gone to the trouble to do its work. It will 
wrap your pre-verse div with its own.

Here is what osis2mod does:

Osis2mod takes everything and stuffs it into a verse slot in the module 
storage. For the time being, it does not support module and testament 
intros, instead treating them as book intros. When a verse is rendered, 
it is split into 2 parts: pre-verse and verse. The basic idea is that 
the front-end programmer can say:
Render pre-verse material
output a verse number
Render verse material.

Previously, the only pre-verse material was one or more titles. Now it 
can be anything that is valid OSIS. For example, it could be an 
introductory paragraph and titles.

The responsibility of osis2mod is to take the stuff that stands between 
a verse end and a verse start and put it into a verse slot in the module 

Between verses and splits the stuff between the prior verse and the 
following verse. Ignoring the complication of the first verse, basically 
when osis2mod find a verse end tag (either as </verse> or <verse 
eID="xxx"/>) it considers that closing tags following it belong to the 
prior verse and everything from the first opening tag belonging to the 
following verse.

The material that is associated with the prior verse is merely appended 
to it. With the following verse it is put into a pre-verse div which are 
encoded as milestones in the form in your example.

Your example of Matt 1.1 is problematic for osis2mod, what does it do 
with markup before chapter 1, verse 1? Is it a verse title or a chapter 
intro? I can see your intent with the section div is to make it into a 
verse title. Osis2mod should put it into Matt.1.1. To see if it goes in 
Matt.1.0 or Matt.1.1 you can add the -d 2 flag and build an uncompressed 
module, in which each stored verse is on a line to itself.

Hope this helps,

On 02/29/2012 05:09 AM, David Haslam wrote:
> Hi Troy,
> I just tried wrapping the first "section title" for Matt.1.1 as follows:
> <div type="section">
> <div type="x-milestone" subType="x-preverse" sID="pv1"/>
> <title>Lignez Jezuz</title>
> <div type="x-milestone" subType="x-preverse" eID="pv1"/>
> <verse sID="Matt.1.1" osisID="Matt.1.1"/>
> Levr lignez Jezuz-Krist, Mab David, Mab Abraham.
> <verse eID="Matt.1.1"/>
> After rebuilding the module, the title "Lignez Jezuz" had disappeared when
> viewed with *Xiphos 3.1.5* (in Windows).  In its place there seemed to be an
> extra space.
> It was there before, albeit displayed after the verse tag.
> So what's wrong?
> cf. In *BibleDesktop 1.6*, the same title is still displayed, and still
> after the verse tag and a line break.
> The phrase "not yet supported" seems to be a considerable understatement.
> Regards,
> David
> --
> View this message in context: http://sword-dev.350566.n4.nabble.com/preverse-divs-tp4429131p4431114.html
> Sent from the SWORD Dev mailing list archive at Nabble.com.
> _______________________________________________
> 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