[sword-devel] osis2mod

Sebastien Koechlin seb.sword at koocotte.org
Thu Apr 26 07:48:42 MST 2007


On Wed, Apr 25, 2007 at 03:47:06PM -0700, Chris Little wrote:
> Do people feel that incorporating a real validator would make osis2mod 
> easier to use?

As I use a makefile to build mod, I have added thoses lines to performe
validation in my build process:

SCHEMA=osisCore.2.1.1.xsd

darbyfr.osis.xml: build/step5.xml
        xmllint --noout --nonet --valid --timing --schema $(SCHEMA) $<
        cp $< $@

but it would be easier for everybody to make osis2mod validate it's input
(with a command line option to disable it to save time). Errors are found
and understood more easily if detected early.


> It could potentially cause the filesize to jump dramatically, so would 
> that be acceptable?

In my opinion using a SAX parser to read OSIS files is the right solution,
they are made for this. Maintainability of osis2mod source code would
probably increase.

This will increase filesize or create a new dependancy. Checking WF and
validity against schema probably does not cost much more size. The big step
is using a parser.

Embled systems as PDA or LCDBible should not provide osis2mod. Osis2mod is
designed for mod building; which need more power than provided by a PDA and
more skills than LCDBible users are supposed to have.

For old and smalls computers; we should be able to build a light flavour of
osis2mod, without validation, without curl and without libssl. On my
debian-sarge system, dependancies cost most of the size:

810K    /usr/lib/libsword.so.4.0.0

198K    /usr/lib/libcurl.so.3.0.0
192K    /usr/lib/libidn.so.11.5.6
227K    /usr/lib/libssl.so.0.9.7
1,2M    /usr/lib/libcrypto.so.0.9.7
10K     /lib/libdl-2.3.2.so

using libxml2 add a code dependancy of 1019K; we could probably find a
smaller library to embled.


> If we incorporate osis2mod into either front-ends or installmgr so that
> users could import OSIS documents directly into Sword, would that support
> or detract from the case for embedding a full validator?

This will in fact increase the binary size of embled sword based frontend.


-- 
Seb, autocuiseur



More information about the sword-devel mailing list