OSIS Bibles

From CrossWire Bible Society
Revision as of 09:14, 21 September 2007 by Skc (talk | contribs) (General structure)

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

Examples

Marking with Strong's Numbers

Marking with Other Lemma

Marking Section Headings

Marking Cross-References

Marking Notes

osis2mod usage

Tools

XML well-formed test

Validate OSIS test

Perl and automatic text transformation

XSLT and automatic XML transformation

make and Makefile