[sword-devel] OSIS tagging paragraph which span chapter ?

DM Smith dmsmith at crosswire.org
Mon Apr 20 04:43:56 MST 2009

On Apr 20, 2009, at 2:48 AM, Tonny Kohar wrote:

> Hi,
> Does anyone know how to tagging paragraph which span chapter eg: Mark
> 7:31-Mark 8:9 ?
> Because I got an error using osis2mod when tagging such paragraph.

I am assuming that you verified that your input is valid OSIS by  
running it through an XML validator?

My suggestion is that you write your OSIS file without trying to work  
around the shortcomings of osis2mod. If need be, use xslt to modify it  
to an intermediate form that works around the problem.

Based upon your description, the paragraph marks should be between the  

<verse eID="Mark.7.30"/>
<verse osisID="Mark.7.31" sID="Mark.7.31"/>
<verse eID="Mark.8.9">
<verse osisID="Mark.8.10" sID="Mark.8.10"/>

When you say error, are you saying that the program stops unexpectedly  
or that the program reports an error and keeps on going? If it is the  
latter, it really is a "strong" warning.

Currently, osis2mod assumes that all markup is wholly contained within  
a chapter. That is, a chapter by itself is well-formed. This is  
because most SWORD applications show a chapter at a time.

Currently, osis2mod will state "error" or "warning" when it encounters  
a construct that will cause problems in one or more of the SWORD apps.  
If you have built osis2mod from trunk in SVN, you can safely ignore  
these. Or work with me to understand what they mean and how to work  
around them.

Right now, osis2mod and the SWORD engine does not handle interverse  
markup well. Both assume that it is a heading/title of some sort. With  
the pre-verse material, it will reorder the tags so that white-space  
producing tags are appended to the preceding verse. In your case the  
paragraph start for Mark 7:31 will be appended to Mark 7:30, which is  

The goal of our development of osis2mod is to allow all well-written  
(see wiki for these best practices), valid OSIS to be used without  
complaint and for the SWORD and JSword engines to handle them well.  
The best-practice is to use milestones for verses and chapters, and  
container tags for <div>, <p> and other document structural elements.  
These cannot be handled by the SWORD and JSword applications and need  
to be transformed into milestoned forms.

To this end I am working on changing osis2mod. The following changes  
will be made:
1) All tags will be retained in the module.
2) Tags will not be re-ordered.
3) Most interverse tags will be place in a "pre-verse" div:
<div type="x-preverse" sID="xxx"/>
<div eID="xxx"/>
4) The remaining tags will be appended to the prior verse.

The trick is to accurately find the boundary in the interverse  
material between what goes with the two verses. In your example, the  
opening paragraph is part of Mark 7:31 and the closing paragraph is  
part of Mark 8:9. The former is in the x-preverse div for Mark 7:31  
and the latter is appended to Mark 8:9.

That said, I hope to be done "any time now"

In Him,

More information about the sword-devel mailing list