[sword-devel] osis2mod r2519 Error
Greg Hellings
greg.hellings at gmail.com
Sun Oct 3 10:25:17 MST 2010
On Sun, Oct 3, 2010 at 11:58 AM, troypulk <troypulk at yahoo.com> wrote:
> Hello,
>
> I just discovered that when you use osis2mod that it does not reproduce the
> osis schema properly.
>
This is because osis2mod does not even want to reproduce the OSIS schema.
It wants to translate OSIS into our internal representation. It does this
decently well for any OSIS for which support has been added to it.
>
> I know this because I made a brand new clean osis.xml and added some basic
> markups then I used the osis2mod and it was not reproducing the the schema
> properly so I tested it by using a known properly formatted osis, namely my
> ISV bible
>
> That's why I updated my svn to the latest version to see if the osis2mod
> was updated.
>
> What I did was use mod2osis to convert my ISV bible then turned right
> around and used the osis2mod and this is what happened:
>
> This is what the ISV bible looks like coming from the Module repository:
>
> The Gospel According to Matthew
> The Ancestry of Jesus Christ Luke 3:23-28
> 1 This is * a record of the birth of Jesus Christ, * the son of David, the
> son of Abraham.
> 2 Abraham fathered Isaac, Isaac fathered Jacob, and Jacob fathered Judah
> and his brothers.
>
> Then I used mod2osis and osis2mod and this is what happened:
>
> 1 The Gospel According to MatthewThe Ancestry of Jesus Christ Luke
> 3:23-28This isThe Gk. lacks This is a record of the birth of Jesus
> Christ,I.e. the Messiah the son of David, the son of Abraham.Gen 12:3;
> 22:18; Ps 132:11; Isa 11:1; Jer 23:5; Matt 22:42; Luke 3:23; John 7:42; Acts
> 2:30; 13:23; Rom 1:3; Gal 3:16
> 2 Abraham fathered Isaac, Isaac fathered Jacob, and Jacob fathered Judah
> and his brothers.
>
> Which it appears that it's also including the note for that verse.
>
> Is this a know bug?
>
This is a bug, and it is known, but it is not a bug in osis2mod. It is,
instead, a bug in mod2osis. I have made several half-hearted attempts at
improving mod2osis, and I have made some headway. But there are some
technical difficulties with the work:
1) Some transformations from OSIS into the internal format which are lossy
cannot be reproduced on export with certainty. This largely pertains to
inter-verse material.
2) The entire OSIS header of the import file is simply passed over with no
regard for its contents. Thus, the exporter can only reproduce those
portions of the header which are explictly maintained in the configuration
file, and even those are not guaranteed to be the same as what was in the
import OSIS file.
3) The tool only works really well for modules which began life as OSIS
imports. If the module came from GBF or ThML, then the filters which
convert those formats to OSIS are not as robust as the ones that just take
OSIS and produce other OSIS from it.
4) Some of the problems with certain module exports (namely, the KJV which
has been my primary target for import/export comparison while working out
the initial kinks) are artifacts of old osis2mod bugs which have since been
fixed. In the case of the KJV version 2.3 that's in the public repository,
these bugs have been fixed with 2.4, but that was still in the beta
repository when I last checked. Additionally, in my personal experience
with front ends, they don't always alert the user to the existence of an
updated module version, thus making it harder for the user to know when an
update should be performed.
Thus, the work is slow, though I have been making progress. I believe in
its current state, at least for the one in my bzr branch, it does round-trip
KJV properly, though I am not one hundred percent certain of that. I have a
simple little Python script that I use to compare verse-by-verse through an
entire pair of modules to make certain their output is the same. You can
follow my bzr branch at lp:~greg-hellings/sword/mod2osis-work if you are a
Bazaar-savvy user.
--Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20101003/a027d9de/attachment.html>
More information about the sword-devel
mailing list