<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Feb 7, 2014, at 5:38 PM, Barry Drake &lt;<a href="mailto:bdrake@crosswire.org">bdrake@crosswire.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On 07/02/14 22:15, DM Smith wrote:<br><blockquote type="cite">Each front-end has it's own group, mailing list, forums, .... which have lots of people who are best able to respond to front-end questions. &nbsp;Some of the BibleTime people are on this list, but you probably will get better response going direct. &nbsp;I'm interested in what you find. I think your process of creating a new module, modifying SWORD to work with it and getting it to work in a front-end are instructive to us all.<br></blockquote><br>Thanks for your encouragement DMS. &nbsp;I think I am still on the gnomesword list, so I'll re-post there tomorrow. &nbsp;I'll drop a further message onto this list when I've got a bit further. &nbsp;Am I right in thinking that BibleTime is currently the only frontend that is able to handle Av11n versification schemes?<br></blockquote></div><br><div>As far as I know, BibleTime is the only SWORD front-end that does av11n. Xiphos will be if it is not already.</div><div><br></div><div>The JSword front-ends cannot benefit from the definition of a canon.h file as it needs to be converted to a JSword code file. The differences are fairly minor. If you want to use JSword to view the module, you'll need to update JSword as well. I mention this because the nightly build of Bible Desktop is nearly av11n ready. And STEP is fully ready. I'm not sure STEP has a desktop client yet.</div><div><br></div><div>Below is what JSword does internally:</div><div><br></div><div>Each v11n is defined by 4 arrays: two book arrays and two chapter arrays.</div><div><br></div><div>The book arrays are simply ordered lists of either OT or NT books. In SWORD there's a lot of redundant information from one v11n canon.h file. The single book list in a canon.h has number of chapters per book as well as &nbsp;3 variations of the names of the books. In JSword, the names are put in a different resource and are accessed via a symbolic constant.</div><div><br></div><div>In JSword, the array of chapters is split into OT and NT arrays. Rather than a single dimension array, JSword uses and array of arrays, indexed by book index and by chapter number.</div><div>So it looks something like this:</div><div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(78, 144, 114);"><span style="color: #000000">&nbsp; &nbsp;&nbsp;</span>/* protected */<span style="color: #000000"> </span><span style="color: #931a68">static</span><span style="color: #000000"> </span><span style="color: #931a68">final</span><span style="color: #000000"> </span><span style="color: #931a68">int</span><span style="color: #000000">[][] </span><span style="color: #0326cc">LAST_VERSE_NT</span><span style="color: #000000"> =</span></div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">&nbsp; &nbsp; {</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(78, 144, 114);"><span style="color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; </span>// Matthew</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">&nbsp; &nbsp; &nbsp; &nbsp; {</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;"><div style="margin: 0px; color: rgb(78, 144, 114);"><span style="color: rgb(0, 0, 0);">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span>//&nbsp; &nbsp; &nbsp;x0, &nbsp; &nbsp;x1, &nbsp; &nbsp;x2, &nbsp; &nbsp;x3, &nbsp; &nbsp;x4, &nbsp; &nbsp;x5, &nbsp; &nbsp;x6, &nbsp; &nbsp;x7, &nbsp; &nbsp;x8, &nbsp; &nbsp;x9,</div></div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;25,&nbsp; &nbsp; 23,&nbsp; &nbsp; 17,&nbsp; &nbsp; 25,&nbsp; &nbsp; 48,&nbsp; &nbsp; 34,&nbsp; &nbsp; 29,&nbsp; &nbsp; 34,&nbsp; &nbsp; 38,</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 42,&nbsp; &nbsp; 30,&nbsp; &nbsp; 50,&nbsp; &nbsp; 58,&nbsp; &nbsp; 36,&nbsp; &nbsp; 39,&nbsp; &nbsp; 28,&nbsp; &nbsp; 27,&nbsp; &nbsp; 35,&nbsp; &nbsp; 30,</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 34,&nbsp; &nbsp; 46,&nbsp; &nbsp; 46,&nbsp; &nbsp; 39,&nbsp; &nbsp; 51,&nbsp; &nbsp; 46,&nbsp; &nbsp; 75,&nbsp; &nbsp; 66,&nbsp; &nbsp; 20,</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">&nbsp; &nbsp; &nbsp; &nbsp; },</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #4e9072">// Mark</span></div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">&nbsp; &nbsp; &nbsp; &nbsp; {</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;45,&nbsp; &nbsp; 28,&nbsp; &nbsp; 35,&nbsp; &nbsp; 41,&nbsp; &nbsp; 43,&nbsp; &nbsp; 56,&nbsp; &nbsp; 37,&nbsp; &nbsp; 38,&nbsp; &nbsp; 50,</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 52,&nbsp; &nbsp; 33,&nbsp; &nbsp; 44,&nbsp; &nbsp; 37,&nbsp; &nbsp; 72,&nbsp; &nbsp; 47,&nbsp; &nbsp; 20,</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">&nbsp; &nbsp; &nbsp; &nbsp; },</div></div><div>...</div><div><br></div><div>By having { } around each books chapters, we can determine the number of chapters in a book with something like:</div><div>chapter_count = LAST_VERSE_NT[book_number].length</div><div><br></div><div>By splitting it into 4 arrays, we get maximum reuse. Different av11ns may have the same OT or the same NT book lists as another av11n. This allows sharing of OT and NT book lists. Also, OT and NT chapter lists (LAST_VERSE_OT, and LAST_VERSE_NT) can be shared. And they can mix and match. E.g.: Same book lists but different chapter defs.</div><div><br></div><div>Like SWORD, the chapter info is an intermediate form that is loaded when needed into an optimized internal form. It is not consulted other than at load time.</div><div><br></div><div>With Java, we need to do optimizations like this for performance and for space. It might not be needed for C++, but I'd recommend the change. It'd be transparent to front-ends.</div><div><br></div><div>Also, by having each book list be merely a book list of OSIS Bible book names and not a list with lots of other info, it would be trivial to have loader from a text file. Having separate books lists and having predefined, built-in lists allows for aliasing. Likewise, the chapter lists can be one comma separated list of chapter lengths per book per line.</div><div><br></div><div>I would love to add this to JSword. But we deliberately lag SWORD.</div><div><br></div><div>In Him,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>DM</div><div><br></div></body></html>