[sword-devel] osis2mod debugging/titles

DM Smith dmsmith at crosswire.org
Tue Nov 16 12:19:07 MST 2010


On 11/16/2010 11:21 AM, Peter von Kaehne wrote:
> The whole concept of titles, types of titles and hierarchy of titles is
> a bit like a book with 7 seals to me still - despite reading, thinking
> and testing nothing else in the last couple of days.
>
> I have looked at various modules for inspiration, but found that as
> modules are from various ages the osis is not always the same, once it
> is run through the import routine.
>
> So, questions:
I can answer a few.

> is mod2imp the very same stuff as produced by osis2mod prior to indexing
> and packing tight?
Yes.

> is there a list of currently supported title types? It seems that some
> types are only supported the first time but not necessarily subsequently
> in a chapter - type="acrostic" being one of them

I'm not sure what you mean by supported? A title regardless of its type 
is a title to SWORD. SWORD might have additional behaviour based on types.
> is osisheadings.cpp the filter which finally determines what goes where
> and how - in terms of titles?
I don't know.

> what does osis2mod touch and what not? I found some type attributes seem
> to survive very well, others not. Specifically, on which titles is
> 'subType="x-preverse"' appended?
This is what osis2mod used to do. It now has a pre-verse div.

It used to be that osis2mod would re-arrange the input to pull out all 
titles between verses. Extra material between verses was appended to the 
title. And this was all put into a pre-verse title.

It should only be found on titles that are attached to the following 
verse. Specifically, it shouldn't be on testament, book or chapter 
titles and it should not be on titles that are in the middle of a verse.

That said SWORD did not handle titles in the middle of verses. Don't 
know if it does now.


> Undesirable outcomes i have seen when I tried to get it right as a
> result of not understanding titles:
>
> 1) only first title in a chapter is displayed
> 2) some titles are inline
> 3) some titles are included into the subsequent verse (i.e. after the
> verse number
> 4) the verse number is above the verse text
>
> To get it right on the module I just finalise I have heavily edited the
> osis file, but I am not too proud of my work. I have the fear that too
> much is in flux (or at least with me only partially understood), both in
> osis2mod and the filters.
Osis2mod has been changed to have a pre-verse div to hold all material 
between verses. I think that the latest version has been rolled back, 
but I haven't looked lately. From what I remember the SWORD engine did 
not handle it completely, producing too much vertical whitespace.

> I have found the debug options on osis2mod useful - thanks to the person
> who added these!

You are welcomed. Chris and I worked on it. :)

> Peter
>
> P.S.: Sometimes I wish we could forgo all the filters and work with raw
> OSIS, XSLT and CSS...  At least I could rapidly extend then "filters" to
> get them to do what I want. :-)



More information about the sword-devel mailing list