[sword-devel] OSIS feature support and questions

DM Smith dmsmith at crosswire.org
Fri Oct 2 06:53:40 MST 2009

On Oct 2, 2009, at 8:40 AM, Brian J. Dumont wrote:

> Jonathan Morgan wrote:
>> On Fri, Oct 2, 2009 at 2:19 AM, Brian J. Dumont <bdumont at ameritech.net 
>> > wrote:
>>> Additionally, I have a question about <a> tags.  I'd like to put  
>>> down
>>> markers for other modules to later link to.  Is it true that OSIS  
>>> <a> tags
>>> only support "href" and not "name" attributes?  Maybe this should  
>>> be done
>>> with an <index> tag instead?
>> I would have thought that you would indicate these with sections  
>> (from
>> memory <div type="section">).  Are you likely to have markers for
>> things that are not traditional sections?  If you have references  
>> from
>> other modules, I would have thought it would be to something like
>> Genesis 3:1-5, section 2, and giving each of your sections a unique  
>> ID
>> would probably allow them to be linked to.
>> Jon
> Yes, I was hoping to have a finer-grain linking than that.  The  
> print edition itself pretty clearly sets out the natural sections to  
> present together.  Most are reasonably sized, but some of the  
> discussions are fairly lengthy (many pages printed).  I would hope  
> to be able to link into the middle of it.
> Similarly, references are frequently made to specific page numbers  
> of other works.  I'd really want the ability to link to another  
> commentary that way.  Of course, I guess that could theoretically  
> use the <milestone> tag.
> If this is just plain not possible, then I'll move on.  When all is  
> said and done, I'm trying to plan ahead.  This commentary references  
> many of the other works in the SWORD library (Josephus, Clarke, and  
> others), but I currently can't link to them using most SWORD  
> programs.  I hope to see that sorted out someday, and preparing  
> ahead would make the addition of these features more immediately  
> gratifying to developers.

There are some points to consider here:

First, OSIS has two ways to link to "stuff".
1) The <a> tag which is appropriate for "stuff" that is not part of  
the text of an OSIS document, such as images.
2) The <reference> tag which is the sole mechanism for referencing an  
marked location in the text of an OSIS document. This tag takes an  
osisRef which refers to one or more locations in the text each marked  
with an osisID. In the XML sense, osisID is not declared of type id.  
If it did then an XML engine would have the capability of locating the  
element by id. OSIS defines an osisID as uniquely identifying a  
container, but because many containers can be milestoned it may not be  
physically unique in a document. (To be semantically valid OSIS, the  
osisID has to be unique with regard to begin tags, which may have an  
sID attribute).

Second, support in the SWORD engine does not extend beyond anonymous,  
KJV biblical references at this time. Extending SWORD to handle other  
references has been discussed. Here are some of the fine points.
1) A reference without a workID will be assumed to be a biblical  
reference. From the perspective of OSIS this is accomplished by  
defining a default work, which while never part of the SWORD module  
will be assumed. This will preserve existing behavior.
2) A reference with a workID of self will be self-referential. This is  
not necessary for Bibles, but for dictionaries, commentaries and  
others. There is no support for this in the SWORD engine at this time.  
I imagine that it will be added for the sake of Dictionaries in the  
near future.
3) A reference with a workID that matches the [NAME] of a module will  
refer to that module. It is not required that the module exist at all.  
The use of future names will probably merit some discussion to codify  
them. There is no support for this in the SWORD engine at this time.

AFAIR, there has not been discussion on how SWORD will identify that a  
reference is to a particular v11n. Maybe, Bible.[v11n].reference,  
where [v11n] is the SWORD recognized v11n name or  
Bible.workID.reference, where workID refers to a work that has a  
particular v11n. Or perhaps, combining them Bible.v11n.workID.reference.

Third, SWORD's finest grain of reference currently is the addressable  
unit stored in its index. You are suggesting support for referencing  
within the indexable unit. For commentaries I think this is a  
worthwhile topic of discussion. I think it makes sense to have a  
coarse grained index with finer grained referencing. Right now, your  
only recourse is to have a finely grained index. An osisID defines !  
to introduce a sub reference, or what it calls "grain". So a verse  
might have Matt.1.1!a and Matt.1.1!b. Right now OSIS2MOD will ignore  
the grain. The SWORD engine could be adjusted to pull back the indexed  
unit and then search for the grain reference. (I.e. osishtmlhref.cpp  
would produce a <a name="xxx"/> for each grain. XXX may have to be a  
munging of the osisID if the allowable characters of name don't match  
that of an osisID.

Fourth, OSIS defines <index> as an addressable location in the  
document. I'm not sure what it's intended use is. SWORD ignores it.

Hope this helps.

In His Service,

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

More information about the sword-devel mailing list