[sword-devel] howto: mod2osis

DM Smith dmsmith555 at yahoo.com
Tue May 30 12:15:14 MST 2006


AFAIK, there are no OSIS General Books so far.

I took a look at xml2gbs, which you can use to create a GenBook from 
OSIS. (The other way is to use imp2gbs)

The following is based on that quick look and might be a bit wrong.

The -l flag indicates whether to use osisID or type, n and title 
attributes to formulate the key for an entry.
Without the flag it uses osisID.
With it it concatenates type, n and title. What it ends up with is 
something like:
    type n: title
It appears that title is expected and that type and n are optional.
This then is put on a key stack.

For OSIS it looks at div, chapter and verse elements for these attributes.
When it constructs a key, it takes the stack of these "keys" and creates 
a '/' separated key from it.

If you use the -i flag it will create a file in "imp" format so you can 
see what it is doing.

This should be the same as the deconstruction of a module using mod2imp.

AFAIK there is no corresponding gbs2xml that will dump the reconstructed 
And AFAIK there is not enough info in the gbs to reconstruct the OSIS 
(i.e. when to create a chapter or verse element)

Alternatively you can create a file in imp format, and then use imp2gbs, 
but I think it may be more tedious than it is worth.
Unless it is to round trip from mod2imp.

Hope this helps,

Jónatas Ferreira wrote:
> Hi,
> I'm trying to learn how to create a general book module. In order to 
> do so I'm trying to revert a module to OSIS format. Which file should 
> I point as the module file?
> Thanks,
> Jónatas
> _______________________________________________
> 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