<div dir="ltr">On the fix up, I don't think we really want that behaviour.<div><br></div><div>I don't think "your two things that are needed" would solve this case. The behaviour I have working correctly is for verses that are in a versification but not in a module. (not sure I can explain why, but I don't get a NoSuchKey exception). The problem we need to solve is for OSMHB, for which Mat 1 is neither in the versification, nor in the module. (so, we presumably need a third check to see if it's in any other versification?)<br>
</div><div><br></div><div>As an aside, while we decide on a way forward for JSword, my current workaround is:<br></div><div><br></div><div>- get the key for book X</div><div>- if NoSuchKeyException, attempt to get it for KJVA (if installed), if this works, then return an empty key</div>
<div>- if still NoSuchKeyException, or KJVA not installed, attempt to do the same in the ESV (which is NRSV now).</div><div><br></div><div>For me, returning an empty key is similar to the case where a module doesn't contain the key in question.</div>
<div><br></div><div>Cheers</div><div>Chris</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 6 August 2013 12:59, DM Smith <span dir="ltr"><<a href="mailto:dmsmith@crosswire.org" target="_blank">dmsmith@crosswire.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Another comment: JSword differs from SWORD in that it does not try to fix up an invalid chapter:verse. In SWORD, Gen 1:9999999 would parse this as the last verse in Revelation. We have such fix up code in JSword, but don't use it.<br>
<br>
In Him,<br>
DM<br>
<div class="HOEnZb"><div class="h5"><br>
On Aug 6, 2013, at 7:53 AM, DM Smith <<a href="mailto:dmsmith@crosswire.org">dmsmith@crosswire.org</a>> wrote:<br>
<br>
> Couple of thoughts.<br>
><br>
> When we only had the KJV versification, it made sense to throw out non-KJV references as invalid.<br>
><br>
> With v11n, we have v11ns w/ just the OT and those with OT and NT. There are none that have only the NT. Though you'd think that a Greek one would have an NT only versification.<br>
><br>
> This explains what you are seeing.<br>
><br>
> There are two things that are needed (which I think are in there):<br>
> A check to see if the module contains a verse.<br>
> A check to see if a verse is in the versification.<br>
><br>
> I agree w/ parsing not failing except when unparseable. I do think that it no longer complains about chapters and verses that are not in the v11n. So it is only an issue w/ book names.<br>
><br>
> Regarding parsing, I think it should use most book names, not just those in the v11n. But should it be all? Should it always include the apocrypha book names? If a user mistypes a book name should it get a hit on an apocrypha or only on the canon?<br>
><br>
> One of the things I think have been needed for a long time is a parser that doesn't try to guess the book name. This would be for osisID/osisRef. Most references that JSword deals with are encoded within modules.<br>
><br>
> Aside: Today, we do a lenient parse which fails on osisIDs. Upon failure, it mungs the osisID and re-parses. If we had an osisID parser, we'd reverse this.<br>
><br>
> In Him,<br>
> DM<br>
><br>
> On Aug 5, 2013, at 12:42 PM, Chris Burrell <<a href="mailto:chris@burrell.me.uk">chris@burrell.me.uk</a>> wrote:<br>
><br>
>> Hi<br>
>><br>
>> I'm having a strange behaviour due to how our versifications are implemented.<br>
>><br>
>> If I'm looking at the OSMHB module, then looking up Mat 1 gives me a NoSuchKeyException<br>
>> If I'm looking at the TR module, then looking up Gen.1 gives me an empty passage.<br>
>><br>
>> STEP shows a message saying the module doesn't cover the passage in the latter case. The former case is tricky, since the reference could be anything at all...<br>
>><br>
>> What are your thoughts? Ideally, I'd want to say "invalid" when the reference is something completely unparseable. However if it's simply not present in the versification, then I'd probably want to say that module doesn't cover the passage.<br>
>><br>
>> We get similar issues for Apocryphal books. Any thoughts?<br>
>> Chris<br>
>><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>
> _______________________________________________<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>
</div></div></blockquote></div><br></div>