[sword-devel] Linking to General Books

Brian J. Dumont bdumont at ameritech.net
Sun Oct 18 14:33:23 MST 2009

Not so long ago, Matthew Talbert mentioned the use of sword:// to link
to items from a dictionary.  I am trying to prepare an OSIS commentary
which references a number of other commentaries as well as a number of
General Book modules.  I've been trying to use Matthew's methodology and
extend it to General books.

It's not simple, however.  The links need to reference the General Book
key, which is often in ThML.  The link however, needs to be a valid OSIS
reference.  This restricts the link from using same characters that are
typically a part of the ThML key.  This includes spaces, forward
slashes, % signs, etc.  Note that the fact that a % sign can't be in a
valid OSIS reference removes the possibility of url-style encoding.

How should I prepare these modules so that in the future they will
properly link?  Could we decide on syntax?  If I need to go back and
start changing General Book module keys, then I will.  I just don't want
to do it twice.  Furthermore, I'd like to avoid making new modules

I might propose something like:

    * Best  practice is that general book keys should be made to avoid
      special characters
    * osis2mod will convert all "." characters (which divide segments of
      an OSIS reference) into "/" characters (which divide segments of a
      general book reference) whenever the reference is to a general book.

This will allow the OSIS to validate, but a fairly clear mechanism is
laid out before us to implement the linking.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20091018/bdb30eaf/attachment.html>

More information about the sword-devel mailing list