Whiteboard/Virtual Modules

From CrossWire Bible Society
Revision as of 17:27, 20 December 2009 by David Haslam (talk | contribs) (Adding Strong's numbers virtually: Virtual Modules)

Jump to: navigation, search

Virtual Modules

There once was some consensus that a thing called virtual modules should exist and be implemented in the API. We can whiteboard the idea/implementation here.

The sword-devel discussion from January 2006 exists here.

General Notes

Front ends should be free to use or ignore virtual modules according to their design preference. We should probably have them default to on(?) but be easy to deactivate. The reason to default to on is simply that it will be self-evident that the feature exists if enable by default, whereas it might go unnoticed by new developers if defaulted to off.

Suggested Virtual Modules

NOTES

This is the only virtual module that was ever actually implemented, compiled, and briefly tested. Unfortunately, Osk, sometime after implementing it, deleted or lost the implementation without having committed it. So--it will need to be re-done.

It should be fairly straightforward to implement again, via EntryAttributes.

PARALLEL

BibleCS currently has a "PARALLEL" module. The idea here is to push the parallel module functionality back into the API. The module should contain the text of n modules, converted to OSIS/UTF-8 from their stored formats and present them, verse by verse, in some clear & consistent format.

One such format might be:

<verse osisID="A:bk.ch.vs">text</verse>
<verse osisID="B:bk.ch.vs">text</verse>
<verse osisID="C:bk.ch.vs">text</verse>

or potentially:

<verse osisID="bk.ch.vs">
<seg type="x-parallel" subType="x-A">text</seg>
<seg type="x-parallel" subType="x-B">text</seg>
<seg type="x-parallel" subType="x-C">text</seg>
</verse>

Front ends are then free to perform display however the like (or ignore the virtual module altogether, of course, if they prefer their own implementation.

VERSEDIFF

Use wdiff on two translations to produce a word-by-word diff, which can then be rendered using different colors/styles. Quite similar to this: http://openscriptures.org/prototypes/manuscript-comparator/

Interlinear Virtual Module

Interlinearize texts on-the-fly, based on Strong's numbers. (Requires Strong's marked texts.)

Adding Strong's numbers virtually

Suggestion from DM, which generated some follow-up discussion.