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

DM Smith dmsmith555 at yahoo.com
Tue Jan 27 12:29:51 MST 2009

David Haslam 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?
> 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.
> -- David
Osis2mod ignores the header. Conceptually, it skips everything until it 
hits the first <div>.

The -a flag has two purposes.
1) Build a module from multiple non-overlapping files. This is what you 
2) Fix content in an existing module. In this case, the original verse 
content is in the module as well as the replacement, but the index 
points to the replacement.

Greg has done marvellous work with mod2osis but if your looking at 
"concatenating" the files, I wouldn't recommend it. The reason is that 
osis2mod does some strange things to interverse material that cannot be 
reliably undone.

I'd suggest xslt to pull out the first <div> and it's content. Perl 
would work as well. Then merely concatenate the files in order and then 
add an appropriate header back in. Hopefully someone here has some code 
that can do this.

In Him,

More information about the sword-devel mailing list