[sword-devel] single chapter reference bug

DM Smith dmsmith at crosswire.org
Thu Feb 12 07:05:51 MST 2015

> On Feb 12, 2015, at 8:41 AM, Peter Von Kaehne <refdoc at gmx.net> wrote:
> "Jude 1" should to my mind translate into osisRef Jude.1.1. "Jude 2" into Jude.1.2. Unfortunately the lack of a chapter number means that the verse is currently misinterpreted by the engine parser  as a chapter number. This causes grief across a couple of 1000 references I am currently trying to fix in a module.
> Suggestions?

For JSword, we support both Jude 1, Jude 1:1 and Jude.1.1, where these are the end user representations and the osisID representation, respectively.

Our internal implementation has a flag for all books having only one book, and when converting to an internal representation or to an osisID, we consult such a flag.

One thing you can do is an intermediate change. After parsing the reference, check the book to see if it a single chapter book and adjust it before requesting the osisRef. (I think this should be done internally w/in SWORD)

Obviously, Jude is just an example, you know it also applies to Obadiah, Philemon, 2 John, 3 John.

BTW, the list of books should also include d2:
Epistle of Jeremiah
Prayer of Manasses
Prayer of Azariah
Bel and the Dragon

There might be others, but these are the ones I know.

In Him,

More information about the sword-devel mailing list