[jsword-devel] Is the OSIS ID from the XML guaranteed to be the same as getOsisID()

DM Smith dmsmith at crosswire.org
Sat Jul 6 03:53:03 MST 2013


Well, I take that back. Its not quite that simple.

For a verse, an OSIS ID in its simplest form consists of a book name (b), chapter (c) and verse (v) as either b, b.c, b.c.v or b.v (in the case of single chapter books). Also, b is from a fixed list of case sensitive values.

This is what JSword supports for a verse.

The OSIS ID can be prefixed with other stuff, typically denoting type of work, module and possibly language/country. These are not expected by JSword at this time. Some examples:
KJV.b.c.v
Bible.KJV.b.c.v
Bible.en_UK.NASB.b.c.v

And an OSIS ID can be suffixed with an indicator that a verse is in part. IIRC, this is called a grain and is separated from the v by a !. There are various forms of this. I think JSword strips off the ! and what follows.

Also, an OSIS ID can be a space separated list of the above to represent a range, as in:
Gen.1.1 Gen.1.2 Gen.1.3

JSword (and SWORD) don't assume that the content of an OSIS ID is properly formed, but pass the content thru a general purpose passage parser.

In Him,
	DM

On Jul 6, 2013, at 6:18 AM, Chris Burrell <chris at burrell.me.uk> wrote:

> I don't have a bug in mind. I just wasn't sure how the module was encoded and if there were any checks there.
> 
> 
> On 6 July 2013 11:15, DM Smith <dmsmith at crosswire.org> wrote:
> It is meant to be. It's a bug otherwise. But it may be a bug in the XML.
> 
> On Jul 6, 2013, at 5:09 AM, Chris Burrell <chris at burrell.me.uk> wrote:
> 
> > Hi
> >
> > Just wondering if when parsing the XML and reading off the OSIS ID from the various verses. Is that guaranteed to be the same as when we use the Key Iteratory, with key.getOsisID()?
> >
> >
> > Chris
> >
> > _______________________________________________
> > jsword-devel mailing list
> > jsword-devel at crosswire.org
> > http://www.crosswire.org/mailman/listinfo/jsword-devel
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20130706/e45cdbf2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4145 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20130706/e45cdbf2/attachment.p7s>


More information about the jsword-devel mailing list