<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Yeah, this is a weird one. A book name by itself has always meant: get the entire book. There was no special treatment of single chapter books.<div><br></div><div>So prior to JSword supporting module introductions, getting the entire single chapter book meant getting chapter 1.</div><div><br></div><div>Single chapter books now have two chapters 0 and 1.</div><div><br></div><div>JSword never required for any verse to be present. (E.g. a module might be a work in progress; only the NT; only the OT; only John; ...) But now with introductions being supported, it is highly likely that a "verse" is not present.</div><div><br></div><div>I agree with Chris that verse 0 (and chapter 0) should not be obvious to the user. It should be hidden as much as possible to the user. It is for the most part, but there is a bit more to do. Obviously this is an example.</div><div><br></div><div>Chris has added the ability to check the module to see if it contains a verse and by extension to see if has introductions. He has requested that a SWORD module's conf have a flag indicating whether it has introductions. That does not appear like it will happen.<br><div><br></div><div>To specify any chapter you can used the following:</div><div>Obad 1:1 - ff</div><div><br></div><div>ff is a special marker that is commonly used in theological writings that means "and following", but since we don't know how much beyond, we take it to mean "until the end".</div><div><br></div><div>Currently w/in JSword AccuracyType parses a reference and uses v11n.getLastChapter(pbook) == 1 to determine whether the book is a single chapter book. Maybe we should have v11n.isSingleChapterBook(book)? (or a better name)</div><div><br></div><div>When showing the first verse in a range, we probably want to skip intros?</div><div><br></div><div>Anyway, the solution to this should be put into JSword because it will be an issue to all frontends.</div><div><br></div><div>Ideas are welcome.</div><div><br></div><div>Hope these ideas are helpful.</div><div><br></div><div>In Him,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>DM</div><div><br><div><div><div>On Jul 5, 2013, at 5:20 PM, Martin Denham <<a href="mailto:mjdenham@gmail.com">mjdenham@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">To clarify the problem a little, the issue is that Obadiah is a single chapter book and so 'Obd 1' is interpreted as 'Obadiah verse 1' not chapter 1. Before chapter 0 and verse 0 were introduced 'Obd' was interpreted as 'Obadiah chapter 1' but no longer. So the problem is I don't know how to specify 'Obadiah chapter 1' as a string - or maybe the previous long string would work i.e. include the word chapter before 1.<div>
<br></div><div>The parsing is spread out around and Bible but the key parts are:</div><div> Key reading = PassageKeyFactory.getKey( 'Obd' ))<br></div><div> Verse verse = KeyUtil.getVerse(key);<br></div><div> // show chapter containing verse</div>
<div><br></div><div>Martin</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 5 July 2013 22:01, Chris Burrell <span dir="ltr"><<a href="mailto:chris@burrell.me.uk" target="_blank">chris@burrell.me.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><div dir="ltr">Sounds like a bug for short books. I don't think JSword should be passing back verses that don't exist. How are you getting the verse?<div>
<br></div><div>Are you using </div><div><br></div>
<div>passage.iterator().next() ?</div><div><br></div><div>Presumably, the iterator is basing itself from on the versification ordinal... Perhaps this highlights a bug with our versification tables? In that for short books, we should not have a chapter 0...</div>
<div>Chris</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On 5 July 2013 21:53, Martin Denham <span dir="ltr"><<a href="mailto:mjdenham@gmail.com" target="_blank">mjdenham@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><div><div class="h5"><div dir="ltr">Can I ask for some advice?<div><br></div><div><div>And Bible stores strings like 'Matt 1', 'Obd' to specify a daily reading.<br>
</div><div><br></div><div>For 'Matt 1' PassageKeyFactory returns Matt chapter 1 and AB can correctly navigate to the first verse Matt 1:1.</div>
<div>However for 'Obd' PassageKeyFactory returns Obadiah 0:0-Obadiah 1:21 and AB attempts to navigate to the first verse which is Obd 0:0 which normally does not exist.</div><div><br></div><div><div>I am a bit stuck for an elegant solution without coding something horrible like:</div>
<div> if (verse.chapter==0) verse.setChapter(1)</div><div>Any suggestions?</div></div><div><br></div><div>Thanks<span><font color="#888888"><br></font></span></div><span><font color="#888888">
Martin</font></span></div><div><br></div><div><div>P.S. If anybody uses the Chronological Daily readings in And Bible you may have noticed that pressing Obadiah gave a blank page a couple of days ago due to the above issue.</div>
<div><br></div></div></div>
</div></div></blockquote></div></div></blockquote></div></div></blockquote></div><br></div></div></div></body></html>