[sword-devel] Linking to General Books
Chris Little
chrislit at crosswire.org
Mon Oct 19 15:42:03 MST 2009
Brian J. Dumont wrote:
> Chris,
>
> Thanks very much for the response. So if I understand you correctly, a
> proper reference to the module Concord at key:
>
> /The Smalcald Articles/Preface of Dr. Martin Luther
>
> would be written as:
>
> <reference
> osisRef="Concord:The\%A0Smalcald\%A0Articles\\Preface\%A0of\%A0Dr.\%A0Martin\%A0Luther">TEST</reference>
>
> ... even though the filters might need to catch up with me.
>
> Is that correct? I've already checked and it does indeed validate, but
> of course it doesn't work. Is this reliable enough to add to the wiki?
This osisRef adds an additional escaping protocol (%xx) on top of what
is already permitted by OSIS. It's legal to do that, but it means that
we're defining non-standard protocols, which we shouldn't expect to see
work outside of our implementation of the standard. We also shouldn't
expect to see anyone else encoding in this manner (unless they're
copying us or our documentation). I don't see that there is anything to
be gained from extending the standard in this way, though.
The simplest way to encode the Sword TreeKey:
/The Smalcald Articles/Preface of Dr. Martin Luther
Would be:
<reference osisRef="Concord:The\ Smalcald\ Articles.Preface\ of\ Dr\.\
Martin\ Luther">
Filters should translate this to:
sword://The+Smalcald+Articles/Preface+of+Dr.+Martin+Luther
or maybe:
sword://The%20Smalcald%20Articles/Preface%20of%20Dr.%20Martin%20Luther
The differences between my osisRef and yours are:
1) Spaces are encoded as "\ " (that's a 0xA0, not 0x20) instead of "%A0".
2) The parts of the ref are divided by "." instead of "\\".
3) The "." in "Dr." is escaped as "\." since it's not intended to divide
parts of the ref.
Ideally, osisRefs should point at references using a standard reference
scheme. Obviously that won't exist for every work, but I suspect there
is a standard reference scheme for the Book of Concord. I find a
description of a simple & compact reference scheme at
http://bookofconcord.org/abbreviations.php, though I don't know if it is
necessarily standard. So the best solution is probably to recode the
keys of Concord to employ IDs like "Concord:SA.Preface", but you may not
want to go to the trouble of doing that.
--Chris
More information about the sword-devel
mailing list