[sword-devel] modules to relational database

Martin Gruner mg.pub at gmx.net
Tue Nov 7 10:06:42 MST 2006


Well, I thought about this, and since you ask..

> Case-in-point:  book/chapter/verse.  You can easily put a bible into any
> relational database and index it having a column for book, chapter, and
> verse.  But what about paragraphs?  Sentences?  

You can split up any XML document at its nodes like <osisID>, <div> etc. into 
rows of a database that also holds the rendering context for each of these 
nodes, and also information about the tree structure of the xml document 
(parent-children etc.). How deep you want to split it beyond osisID depends 
on what you want to do.

> What about the fact that 
> Christians and Jews have slight differences in verse numbering? 

Every module is stored with its own structure, no static predefined layout. 
You can use a mapper database to convert between the different versification 
schemes (in fact I already have one ready to use).

> How do  you handle quotation?  How do you flag whether or not a verse is in 
the middle of a quote?  

To store the text in a database does not mean you use your own markup. The 
text stays OSIS (or whatever else). So you could use OSIS milestones to 
achieve that, depending on the structure of your document.

> How do you handle the way things are handled in 
> different translations?  How do you mark the english text so that we can
> map the words back to the greek/hebrew lexicon?

These are markup issues.

> The folks who created Sword, OSIS, ThML, USFX, etc... all these folks have
> spent a good deal of time grappling with these issues.  It would be wise
> to utilize this -- even contribute to this.

Sure! But that does not imply a particular storage or access format!
The more I think about it, the more I find that a database would be a very 
fast and convenient way to represent the tree structure of an xml document. 
Better than Sword does at the moment.

mg



More information about the sword-devel mailing list