[sword-devel] genbook lexicons - example problem and potential solutions

Daniel Owens dcowens76 at gmail.com
Sat Oct 13 05:54:55 MST 2012

On 10/13/2012 12:55 AM, Chris Little wrote:
> On 10/11/2012 6:39 PM, Daniel Owens wrote:
>> I am still working on the Abbott-Smith markup project (over 300 entries
>> and counting). We have four contributors right now, so the pace is
>> picking up. Creating a module is another story. Chris made a lexicon
>> module after the first release, but . . .
>> I would like the module to look like this:
>> http://www.textonline.org/files/abbott-smith/abbott-smith.current_release.html. 
>> To do that in SWORD, it needs to be a genbook in order to support:
>> - front- and backmatter
>> - page numbers
>> - a hierarchical structure (In the original TEI it has at least one
>> superEntry, but it is also divided into <div>'s by letter heading [Α, Β,
>> Γ, Δ, Ε, Ζ, Η, Θ, etc.])
>> The good news is that an OSIS genbook supports the bare-bones essentials
>> of entries. And thankfully BPBible and BibleTime both display entries
>> together in the same view, thanks to BPBible's continuous scrolling and
>> *perhaps* BibleTime not recognizing <div type="x-entry">.
>> Unfortunately various features of valid OSIS genbooks are inconsistently
>> supported by front-ends. I created a module for testing. You can find it
>> at
>> https://github.com/translatable-exegetical-tools/Abbott-Smith/tree/master/releases/sword, 
>> including a valid OSIS file. Issues include:
>> - Some front-ends recognize <lb/>, others <p>, but the lexicon uses both
>> (and both are valid OSIS) in various contexts.
>> - Tables are inconsistently supported (mostly not)
>> - Titles should be centered, but there is no way to do that in OSIS, as
>> far as I can tell. I wonder if this is a great example use case of
>> per-module CSS...
>> - Parts of speech should be green and page numbers red, but you can't do
>> color in OSIS (another use case of per-module CSS?)
>> Some of these like <p>, <lb>, and tables should just work, I think.
>> Perhaps I will file bug reports. But the other display issues cannot be
>> resolved by OSIS alone.
>> Should TEI be a supported genbook format? I would think the TEI filter
>> (as it evolves) could be pressed into use for genbooks. If that were
>> done, certain lexicon-specific features as well as real book features
>> such as page numbers could be consistently supported and displayed. On
>> the other hand, I could see the value of having per-module CSS in the
>> conf file so that the module developer could have some control over
>> display.
>> Any thoughts?
> I think your email boils down to wanting to use TEI for genbooks. 
> You're absolutely welcome to do that, and there's nothing in the 
> engine preventing you from doing that.
> There isn't currently an importer set up to parse TEI files and 
> generate genbooks, but I would probably recommend writing a script to 
> generate IMP files from TEI so that you have precise control over what 
> goes into each leaf of the genbook tree. Down the road, xml2gbs will 
> accommodate TEI. I started work on it a couple months ago, but haven't 
> had the time to work on it seriously.
> --Chris
I think it boils down to a little more than that, but this response is 
helpful. I will experiment with using IMP files from TEI.

The other main issue is display. Perhaps I should test with TEI a little 
before raising the issue further. But of the issues I mention above, I 
doubt that the current TEI filter supports colored text for certain 
elements. And the question is whether that should be a universal feature 
of TEI files or not.


More information about the sword-devel mailing list