[sword-devel] GenBook osisID and URIs

DM Smith dmsmith555 at yahoo.com
Tue May 13 08:46:42 MST 2008

We've got a discussion going on jsword-devel regarding how to represent 
custom URLs for sword that will work in a browser. I know GnomeSword and 
MacSword have such a facility.

I'd like to get some input here that I can reply with to jsword-devel.

I seemed to recall that the general consensus is that we should use 
sword:// as the protocol, but I am seeking advice on what should follow, 
especially for GenBooks.

IIRC, what we were thinking was that it should be 

But that poses problems when one wants to specify the work because the 
definition of a URI doesn't allow : for this use.
e.g. sword://KJV:Gen.1.1-Gen.1.3,KJV:Gen.2.9

OSIS allows the workID to contain letters, digits and the _ and osisIDs 
have parts separated by '.', where the parts can contain anything except 

So the question is what to substitute for the ':' ?
I'm thinking of (workID) as in sword://(KJV)Gen.1.1-Gen.1.3,(KJV):Gen.2.2

And how would one specify, a parallel request?

I'm thinking of the following:
e.g. sword://(KJV,ESV)Gen.1.1-Gen.1.3,(KJV,ESV):Gen.2.2

The next part of the question relates to the proper representation of a 
GenBook key as an osisID.

If we understand '.' as OSIS's hierarchical separator, e.g. Gen.1.1 is 
Book -> Chapter -> Verse, then a GenBook with a hierarchy to a node of A 
-> B -> C would be "A.B.C"
The problem is that in a GenBook, the key is generally a title, with 
spaces and possibly periods. I was thinking a simple substitution of _ 
for spaces and something else, perhaps '/' for periods.
But _ and / are valid in a osisID.

Here is an example from Josephus (with '.' added for purposes of this 
workID = Josephus

The War of The Jews. -> Book 1. -> Chapter 2. -> Section 3.

Possible osisID:

While osisIDs use '.' as a path separator, URIs use '/'. So would one 
change do the swap of '.' and '/' when representing the osisID as a URI?

And if we do that what about Bible references, would they become 
sword://(KJV)Gen/1/1 ? (I don't think that makes sense)

Thanks in advance!

In Him,

More information about the sword-devel mailing list