<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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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><div>Thanks<span><font color="#888888"><br></font></span></div></div><span><font color="#888888"><div>
Martin</div></font></span></div><div><br></div><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>
<br></div></div>_______________________________________________<br>
jsword-devel mailing list<br>
<a href="mailto:jsword-devel@crosswire.org" target="_blank">jsword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/jsword-devel</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
jsword-devel mailing list<br>
<a href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/jsword-devel</a><br>
<br></blockquote></div><br></div>