[sword-devel] osis2mod

Troy A. Griffitts scribe at crosswire.org
Sun Apr 29 22:56:29 MST 2007


Chris and DM can likely guess my opinion on this, but I'll quickly post 
for everyone else.

Since most any tag in OSIS can be milestoned, and
since the SWORD API includes general XML processing,
I'm really not sure exactly what we would get by causing osis2mod to 
depend on an XML parser.

I think people should use a schema validator when creating osis modules. 
  I personally use the quick command-line validator MSV from Sun, when 
working with OSIS modules.  I'm not sure including one with SWORD would 
be of much benefit.  People like different tools when making modules.

The other benefit of using the basic SWORD API when processing XML is 
that we might find bugs when using it for processing the input (which, I 
believe DM might have found with his 3 tag example, though I always 
thought > had to be escaped to >  Can someone check the W3C spec?)

But anyway, in conclusion, since OSIS' milestone mechanism forces ALL 
CONTAINER LOGIC to be implemented in code anyway, I don't think a SAX 
parser will give us much more than we already have.

And everyone knows how much I hate dependencies.

PS.  Why don't we use more than just sword::XMLTag in osis2mod?  It 
seems like we could take advantage of sword::SWBasicFilter to hand us 
off tokens like it does for all the API filters.  That's basically what 
a SAX parser will give you anyway.  But actually, since osis2mod should 
mostly only care about delineating verse chunks and deciding what to do 
with text which falls outside of these, I'm not sure SWBasicFilter would 
give us much benefit either.

Just my 'quick' post on the subject.



Chris Little wrote:
> DM and I have been chatting a bit off-list about the future/function of 
> osis2mod and I thought maybe we should open up the discussion a bit.
> 
> Right now osis2mod (the tool for converting OSIS Bibles to Sword Bible 
> modules) does some mediocre validity checking as it builds its Sword 
> database. We'll never really get it perfect this way since we aren't 
> doing real schema validation.
> 
> DM has suggested adding a real validating parser to osis2mod (by 
> embedding something like xerces or libxml), so it could spit out an 
> error message if you try to import invalid OSIS.
> 
> I'm not totally convinced we should do that. When I prepare modules from 
> OSIS docs, I always perform validation in an external validator. 
> (Personally I use Oxygen, but there are also XML Spy, MSV, topologi, 
> Xerces, etc.)
> 
> Do people feel that incorporating a real validator would make osis2mod 
> easier to use?
> 
> It could potentially cause the filesize to jump dramatically, so would 
> that be acceptable?
> 
> 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?
> 
> --Chris
> 
> _______________________________________________
> 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