[sword-devel] mod2osis - linked verses ....
Greg Hellings
greg.hellings at gmail.com
Tue Apr 28 07:21:46 MST 2009
On Tue, Apr 28, 2009 at 7:50 AM, DM Smith <dmsmith at crosswire.org> wrote:
>
> On Apr 28, 2009, at 8:40 AM, Barry Drake wrote:
>
>> Hi there ......
>>
>> I've just discovered that mod2osis doesn't currently handle linked verses
>> in bible texts. It outputs the entire linked block for every verse that it
>> is linked from.
>
> There is a new method for the module: isLinked(VerseKey *v1, VerseKey* v2)
This is helpful. So can I do something like this:
VerseKey* endRange = myKey.clone();
while(myModule.isLinked(myKey, endRange)) {
endRange.increment();
}
// Necessary, because we stepped one beyond the linking range
endRange.decrement();
SWBuf osisIDValue = myKey.equals(endRange) : myKey.getOSISRef() ?
SWBuf(myKey.getOSISRef()) + SWBuf(".") + SWBuf(endRange.getOSISRef());
to determine the key range? And is a "." the proper value to use when
linking two osisIDs together into a range?
--Greg
>
> By passing the current and the next verse keys, one can determine the osisID
> to use.
>
> In Him,
> DM
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>
More information about the sword-devel
mailing list