OSIS Bibles

From CrossWire Bible Society
Revision as of 11:30, 21 September 2007 by Skc (talk | contribs) (Marking poetic material)

Jump to: navigation, search

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">
		<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>

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 : 
			&#8212; premier jour.<verse eID="Gen.1.5"/>
		</p>
...
Result

(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.

Marking Quotations

	<verse osisID="Luke.22.35 sID="Luke.22.35"/>
	Then Jesus asked them, <q who="Jesus">When I sent you without purse,
	bag or sandals, did you lack anything?</q>
	<verse eID="Luke.22.35"/>
Result

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"/>
...
Result

(1) Then sang Moses and the children of Israel this song unto the LORD, and spake, saying,

I will sing unto the LORD, for he hath triumphed gloriously: the horse and his rider hath he thrown into the sea.
(2) The LORD is my strength and song, and he is become my salvation: he is my God, and I will repare him an habitation; my father's God, and I will exalt him.
(3) The LORD is a man of war: the LORD is his name.
(4) Pharaoh's chariots and his host hath he cast into the sea: his chosen captains also are drowned in the Red sea.
(5) The depths have covered them: they sank into the bottom as a stone.

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"/>
Result
  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.
  • ¹ en hébreu: Élohim, (pluriel d'Éloah, le Dieu suprême), la Déité, dans le sens absolu.
  • ² le vide.

osis2mod usage

Tools

Charset conversion

XML well-formed test

Validate OSIS test

Perl and automatic text transformation

XSLT and automatic XML transformation

make and Makefile