[sword-devel] OSIS Commentaries

Chris Little chrislit at crosswire.org
Sun Jan 18 16:59:48 MST 2009

Peter von Kaehne wrote:
> Looking finally on a long neglected pile of files for an Persian
> commentary I stumbled over a few things which bug me dt lack of knowledge
> 1) If material is not meant to refer to any particular verse, but only
> to the whole chapter - content summaries etc does it go into verse 0 or
> is it simply left free floating before the verse content. And if it is
> about teh whole book - should it be chapter 0 or free floating?

Free floating, in both cases. Never make an explicit chapter/verse 0 in 

The importer /should/ correctly interpret material prior to the first 
<verse> in a chapter as belonging to the chapter as a whole, and should 
put it into the verse 0 slot of the module. Likewise with material prior 
to the first <chapter> in a book.

> 2) references which are meant to be in the flow of the text are
> presumably not to be encapsulated by <note type="crossref..."></note>?

Correct. They should be marked with <reference>, of course, but that's 
all. The cross-ref notes are intended primarily for hiding via filters, 
and you don't want to hide verse references that are part of the text.

> 3) has anyone experience with creating sed/perl/whatever scripts which
> read RtoL text? specifically references are the remaining big problem.

I can't think of any that I've done with references, but I can't see 
what the problem would be. If the text is Unicode (as opposed to some 
8-bit encoding where text is being encoded in visual order rather than 
logical), then there shouldn't be any difference from the text 
processing side between left to right and bidi text.

Perhaps we need an example here.

> 4) are there any prettifiers for XML - as soon as rtol text is involved
> it becomes a convolute anyway, but something which would dispense of
> white space and enforce a clean indentation system would be still nice.

I hope others can give better advice here. I generally avoid linebreaks 
except on </div> and </p>, and I avoid all indentation of XML. But most 
XML editors will do some level of pretty-printing. Possibly the free 
editor Wolfgang mentioned would work.

 From the command line, tidy should work, but would need some 
configuration to work with XML.

> 5) should verse and chapter divisions milestoned or as containers -
> structurally the commentary is chapter by chapter, verse by verse, so
> container appears sensible, but before I commit much energy...

If you check the wiki, http://www.crosswire.org/wiki/OSIS_Commentaries, 
you'll note that commentaries are /supposed/ to have a quite different 
structure from Bibles. DM has added support for such correctly-encoded 
commentaries to osis2mod.

Nevertheless, commentaries encoded as Bibles should work fine.

Given the choice, I would always recommend using container verse/chapter 
rather than milestones because a validator can check that you have 
beginning and end tags for every chunk and can check that nothing 
overlaps that shouldn't. I think it makes for simpler, easier to read 
XML. So I only use milestones when I have to (which is plenty often).


More information about the sword-devel mailing list