mvnForum Homepage

Print at Dec 28, 2014 8:58:56 PM View all posts in this thread on one page
Posted by mdbarton at Jun 29, 2004 11:17:13 PM
References in modules
I'm creating a daily devotional module. It's actually a bible rading plan that my fellowship uses, with a reference to the portions of scripture for each day.
I have had a few problems getting the reference links to work - mainly with MacSword (although this may not be a MacSword issue as such)
Is there a definition of how a reference should be written?
Some examples
<scripRef>Romans 1, 2</scripRef>

- this returns the first 2 chapters of Romans in Diatheke and presents a verse list to choose from in Sword for Windows. MacSword however points you at Romans 1 and Genesis 2. No problem, I changed this to:
<scripRef>Romans 1</scripRef>, <scripRef>Romans 2</scripRef>

<scripRef>I Peter 3</scripRef>

- works fine in Diatheke and Sword for Windows. MacSword does not like the space after the 'I', and throws you to I Corinthians. The fix that I am trying (but have not tested) is:
<scripRef>IPeter 3</scripRef>

The point is, which Sword front end is doing the right thing? Has MacSword strictly implemented the Sword API whereas Diatheke and Windows put a looser interpretation on how scripture is referenced?
I want to make sure that my module will work with all front-ends (and haven't had a chance to test gnomesword, bibletime and all the others!).
Are there any rules or guidance for this?

Posted by Osk at Jul 1, 2004 12:34:07 AM
Re: References in modules
This is really a markup issue, not a Sword issue.

You're using ThML, which doesn't define any format for reference style in the content of a scripRef tag. It does define an attribute, but Sword does not support use of that attribute. And we will not be adding additional ThML support to Sword.

You should really use OSIS instead of ThML. We do support the osisRef attribute on reference tags in OSIS, which mark verse references.

Posted by mdbarton at Jul 1, 2004 7:38:11 AM
Re: References in modules
Thanks Osk

The 'module making guide' says:
Now we are moving to the OSIS format, but are still at work bringing all of its features to SWORD


I take it that the OSIS reference feature is available in Sword? However, when I looked at the OSIS user manual it said the following:

The reference element is used to encode an explicit cross-reference to another passage or
work ...... For
example:
(example forthcoming)


Could you provide an example or point me in the direction of one?

Posted by Osk at Jul 1, 2004 1:49:59 PM
Re: References in modules
Thanks Osk

The 'module making guide' says:
Now we are moving to the OSIS format, but are still at work bringing all of its features to SWORD


I take it that the OSIS reference feature is available in Sword?


Yes, the reference tag is handled correctly. And if you find any problems with our support of OSIS, just tell us, and we'll improve it. In contrast, if you find problems with our support of ThML, we are likely to just tell you to use OSIS. :)
However, when I looked at the OSIS user manual it said the following:

The reference element is used to encode an explicit cross-reference to another passage or
work ...... For
example:
(example forthcoming)


Could you provide an example or point me in the direction of one?


Hmm... not a very helpful example. The manual is being updated at the moment, if you hadn't guessed.

An OSIS reference looks something like this:

<reference osisRef="Matt.1.5">Matthew 1:5</reference>

The contents of the tag ("Matthew 1:5") can be anything, but the format of the osisRef attribute ("Matt.1.5") is defined as book.chapter.verse. The chapter and verse are obviously just the chapter/verse numbers (or letters in some cases) and the book value is taken from a set of standard abbreviations:

OT books:
Gen, Exod, Lev, Num, Deut, Josh, Judg, Ruth, 1Sam, 2Sam, 1Kgs, 2Kgs, 1Chr, 2Chr, Ezra, Neh, Esth, Job, Ps, Prov, Eccl, Song, Isa, Jer, Lam, Ezek, Dan, Hos, Joel, Amos, Obad, Jonah, Mic, Nah, Hab, Zeph, Hag, Zech, Mal,

NT books:
Matt, Mark, Luke, John, Acts, Rom, 1Cor, 2Cor, Gal, Eph, Phil, Col, 1Thess, 2Thess, 1Tim, 2Tim, Titus, Phlm, Heb, Jas, 1Pet, 2Pet, 1John, 2John, 3John, Jude, Rev,

Deuterocanonical/apocryphal books (not yet supported by Sword):
Bar, Sir, 1Esd, 2Esd, Jdt, EpLao, 1Macc, 2Macc, 3Macc, 4Macc, PrMan, Ps151, Tob, Wis, Sus, Bel, PrAzar, PssSol, Odes, AddEsth

Posted by mdbarton at Jul 2, 2004 3:25:54 AM
smile   Re: References in modules
Thanks! I'll convert to OSIS.

Posted by mdbarton at Jul 16, 2004 11:46:20 PM
Re: References in modules
Replacing my ThML:
<p>First Portion: <!--CDR1 Genesis 1, 2 --><scripRef>Genesis 1</scripRef>, <scripRef>Genesis 2</scripRef></p><p>Second Portion: <!--CDR2 Psalms 1,2 --><scripRef>Psalms 1</scripRef>, <scripRef>Psalms 2</scripRef></p><p>Third Portion: <scripRef>Matthew 1</scripRef>, <scripRef>Matthew 2</scripRef></p>
with this:
<p>First Portion: <!--CDR1 Genesis 1, 2 --><reference osisRef="Gen.1">Genesis 1</reference>, <reference osisRef="Gen.2">Genesis 2</reference></p><p>Second Portion: <!--CDR2 Psalms 1,2 --><reference osisRef="Ps.1">Psalms 1</reference>, <reference osisRef="Ps.2">Psalms 2</reference></p><p>Third Portion: <reference osisRef="Matt.1">Matthew 1</reference>, <reference osisRef="Matt.2">Matthew 2</reference></p>
for the whole module works fine in Sword for Windows but not in MacSword.
Should the whole module be a fully marked up OSIS document or should I be able to just do the replacement in of ThML with OSIS on the ThML/verse per line module as I have tried?
Thanks for your help!