OSIS Bibles
Contents
- 1 Introduction
- 2 General structure
- 3 Examples
- 4 osis2mod usage
- 5 Tools
Introduction
This page is for practical examples of how to encode a Bible in OSIS 2.1.1 for building a Sword module with osis2mod. It represents CrossWire's experience and best practices in creating modules.
General structure
An OSIS document is a well-formed XML document, valid according to the OSIS schema. You can find the full normative description on the OSIS Website [1].
To produce a Bible, you can use this template:
<?xml version="1.0" encoding="UTF-8"?> <osis xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.bibletechnologies.net/2003/OSIS/namespace" xmlns:osis="http://www.bibletechnologies.net/2003/OSIS/namespace" xsi:schemaLocation="http://www.bibletechnologies.net/2003/OSIS/namespace http://www.bibletechnologies.net/osisCore.2.1.1.xsd"> <osisText osisIDWork="{NAME}" osisRefWork="bible" xml:lang="{LANG}" canonical="true"> <header> {HEADER} </header> <div type="bookGroup"> {BODY} </div> </osisText> </osis>
With the following values:
- {NAME}
- Normalized name of the Bible version (Usually 3 letters for language, 3 for translation)
- {LANG}
- ISO-639 [2] language code
- {HEADER}
- Description of the included text; see below
- {BODY}
- Text; see below
For text without any character outside ASCII, you can use US-ASCII encoding (usually for english text). For every other language, please use UTF-8. See the tools section if you need to convert.
Header
Body
Here is the general structure of the body content:
<div type="bookGroup"> <head>Old Testament</head> <div type="book" osisID="Gen" canonical="true"> <title type="main" short="Genesis">Genesis</title> <chapter osisID="Gen.1" n="1"> <verse sID="Gen.1.1" osisID="Gen.1.1" n="1"/>In the beginning...<verse eID="Gen.1.1"/> <verse sID="Gen.1.1" osisID="Gen.1.2" n="2"/>The earth was formless and void...<verse eID="Gen.1.2"/> ... </chapter> </div> </div>
Note any <div> defaults canonical to false. You need to set it to true on elements representing the structure of the original text.
Examples
Marking Paragraphs
<div type="book" osisID="Gen" canonical="true"> <title type="main">LE PREMIER LIVRE DE MOÏSE dit LA GENÈSE</title> <chapter osisID="Gen.1" chapterTitle="Chapitre 1"><title type="chapter">Chapitre 1</title> <p> <verse sID="Gen.1.1" osisID="Gen.1.1" n="1"/>Au commencement Dieu créa les cieux et la terre.<verse eID="Gen.1.1"/> </p> <p> <verse sID="Gen.1.2" osisID="Gen.1.2" n="2"/>Et la terre était désolation et vide, et il y avait des ténèbres sur la face de l'abîme. Et l'Esprit de Dieu planait sur la face des eaux.<verse eID="Gen.1.2"/> </p> <p> <verse sID="Gen.1.3" osisID="Gen.1.3" n="3"/>Et Dieu dit : Que la lumière soit. Et la lumière fut.<verse eID="Gen.1.3"/> <verse sID="Gen.1.4" osisID="Gen.1.4" n="4"/>Et Dieu vit la lumière, qu'elle était bonne ; et Dieu sépara la lumière d'avec les ténèbres. <verse eID="Gen.1.4"/> <verse sID="Gen.1.5" osisID="Gen.1.5" n="5"/>Et Dieu appela la lumière Jour ; et les ténèbres, il les appela Nuit. Et il y eut soir, et il y eut matin : — premier jour.<verse eID="Gen.1.5"/> </p> ...
(1) Au commencement Dieu créa les cieux et la terre. (2) Et la terre était désolation et vide, et il y avait des ténèbres sur la face de l'abîme. Et l'Esprit de Dieu planait sur la face des eaux. (3) Et Dieu dit : Que la lumière soit. Et la lumière fut. (4) Et Dieu vit la lumière, qu'elle était bonne ; et Dieu sépara la lumière d'avec les ténèbres. (5) Et Dieu appela la lumière Jour ; et les ténèbres, il les appela Nuit. Et il y eut soir, et il y eut matin : — premier jour. |
Note: Osis2mod converts a paragraph start into <lb type="x-begin-paragraph"/> and a paragraph end into <lb type="x-end-paragraph"/>. If these are between verses they are appended to the prior verse.
Marking Quotations
Most of the Sword applications will show a chapter at a time and some will show isolated verses. This means that all of the Sword applications show partial quotations, such as the Sermon on the Mount which begins in Matt 5 and ends in Matt 7. For this reason, the milestoned version of the <q> should be used.
Default Quotation Marks
By default, Sword will use " for quotations. The following discusses various ways to influence this.
Indicating the nesting of a quote
When a quote is contained in a quote, it is customary to set the level attribute to indicate the depth of the nesting. For example, Jeremiah 23:38 is part of a larger quote and has a back and forth dialog of nested quotes:
But if you say, <q level="2" sID="1"/> The burden of the Lord, <q level="2" eID="1"/> thus says the Lord, <q level="2" sID="3"/> Because you have said these words, <q level="3" sID="4"/> The burden of the Lord, <q level="3" ="4"/> when I sent to you, saying, <q level="3" sID="5"/> You shall not say, <q level="4" sID="6"/> The burden of the Lord, <q level="4" eID="6"/> <q level="3" eID="5"/>
A couple of things to note about this verse. First, the level attribute is on both the sID and the eID pair, matching in value. Second, this is an example of a verse that has a quote that starts in the middle and finishes in another verse.
In this case, Sword will use the level to determine whether to use " or ' for quotes. Odd levels will use " and even levels will use '.
Supplying alternative quotation marks
The quote element has a marker attribute that can be used to control the quotation marks. Sword applications will always use this value when rendering the quote. When the marker attribute is present but empty, it will render no quotation mark at all.
Continuation Quotation Marks
The <milestone type="cQuote"/> can be used to indicate the presence of a continued quote. If the marker attribute is present, it will use that otherwise it will use a straight double quote, ". Since there is no level attribute on the milestone element, it is best to specify the marker attribute.
Marking the Words of Christ
<verse osisID="Luke.22.35 sID="Luke.22.35"/> Then Jesus asked them, <q who="Jesus" marker="">When I sent you without purse, bag or sandals, did you lack anything?</q> <verse eID="Luke.22.35"/>
Then Jesus asked them, When I sent you without purse, bag or sandals, did you lack anything? |
Marking poetic material
<chapter osisID="Exod.15" chapterTitle="Chapitre 15"><title type="chapter">Chapter 15</title> <p> <verse sID="Exod.15.1" osisID="Exod.15.1" n="1"/>Then sang Moses and the children of Israel this song unto the LORD, and spake, saying, </p> <lg> <l>I will sing unto the LORD, for he hath triumphed gloriously: the horse and his rider hath he thrown into the sea.</l><verse eID="Exod.15.1"/> <verse sID="Exod.15.2" osisID="Exod.15.2" n="2"/><l>The LORD is my strength and song, and he is become my salvation: he is my God, and I will prepare him an habitation; my father's God, and I will exalt him.</l><verse eID="Exod.15.2"/> <verse sID="Exod.15.3" osisID="Exod.15.3" n="3"/><l>The LORD is a man of war: the LORD is his name.</l><verse eID="Exod.15.3"/> <verse sID="Exod.15.4" osisID="Exod.15.4" n="4"/><l>Pharaoh's chariots and his host hath he cast into the sea: his chosen captains also are drowned in the Red sea.</l> <verse eID="Exod.15.4"/> <verse sID="Exod.15.5" osisID="Exod.15.5" n="5"/><l>The depths have covered them: they sank into the bottom as a stone.</l><verse eID="Exod.15.5"/> ...
(1) Then sang Moses and the children of Israel this song unto the LORD, and spake, saying,
|
Marking with Strong's Numbers
Marking with Other Lemma
Marking Section Headings
Marking Cross-References
Marking Notes
<verse sID="Gen.1.1" osisID="Gen.1.1" n="1"/>Au commencement Dieu<note osisRef="Gen.1.1" osisID="Gen.1.1!1"><hi type="italic">en hébreu</hi> : Élohim, (<hi type="italic">pluriel d</hi>'Éloah, le Dieu suprême), la Déité, <hi type="italic">dans le sens absolu</hi>.</note> créa les cieux et la terre.<verse eID="Gen.1.1"/> <verse sID="Gen.1.2" osisID="Gen.1.2" n="2"/>Et la terre était désolation et vide<note osisRef="Gen.1.2" osisID="Gen.1.2!1">le vide.</note>, et il y avait des ténèbres sur la face de l'abîme. Et l'Esprit de Dieu planait sur la face des eaux.<verse eID="Gen.1.2"/>
|