Difference between revisions of "OSIS Bibles"
From CrossWire Bible Society
m (→Tools: Add iconv section) |
(→Body: Example) |
||
Line 40: | Line 40: | ||
==Body== | ==Body== | ||
+ | |||
+ | Here is the general structure of the body content: | ||
+ | |||
+ | <pre> | ||
+ | <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> | ||
+ | </pre> | ||
=Examples= | =Examples= |
Revision as of 09:31, 21 September 2007
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>