[sword-devel] OSIS2MOD -a (augment) What happens to OSIS headers?

Greg Hellings greg.hellings at gmail.com
Tue Jan 27 12:00:30 MST 2009


On Tue, Jan 27, 2009 at 12:46 PM, David Haslam <d.haslam at ukonline.co.uk> wrote:
> If you use the -a switch in OSIS2MOD to augment a module, what happens to the
> OSIS headers?
> Does the module retain only the original OSIS header, or does it augment it
> with the new one?
> Or, worse still, does it replace the original OSIS header with the one from
> the augmenting OSIS file?

I'm not certain if any of the header information is maintained in
SWORD.  AFAICT that's all metadata, and the only place to preserve
metadata of that type in SWORD is in the .conf files, which you must
produce by hand yourself.  I've suggested, a few times, adding either
a switch to osis2mod or creating an XSL that would produce a rough
version of a module's .conf file from data presented in the OSIS
file's header - but I don't have the time myself and no one else seems
to have latched onto the idea.  I could be wrong, but I don't think
any of the OSIS header information is maintained.

> The reason for asking is that we have access to some OSIS files from Myanmar
> Bibles that are 66 individual XML files, each with their own OSIS header.
> I would like to make the round trip OSIS2MOD (1 without & 65 with the -a
> switch) followed by MOD2OSIS in order to obtain a single OSIS file for the
> whole Bible.

The osis2mod->mod2osis round trip is still shaky at best.  With the
default code in the repository, mod2osis does not work properly.  I
have posted some patches up to www.crosswire.org/~ghellings/ which
make the round trip as close to viable as I can see, based off of the
KJV module in the SWORD repository - but there's been no attempt by
anyone else to test the patch, that I know of.  I last updated it back
in December, and it should run against the latest SVN of the SWORD
library - I think it will also work against 1.5.11, but I'm not sure
about that.

If you'd like to test it out and give me an idea of whether it
maintains your data properly, I'd love the feedback and I'd be happy
to work with making any changes that you need to patch up problems
with it.  I seem the be the pumpkin holder for that tool, but if
anyone else wants to help test it or update my patch, I'd love to work
with you.


More information about the sword-devel mailing list