<div dir="ltr">IBT have just passed me more information regarding their handling of empty verses to help clarify if this is an IBT module issue or not.  The following is an extract from IBT&#39;s e-mail:<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><span style="font-family:arial,sans-serif;font-size:13px">Here are examples of how IBT&#39;s OSIS source defines empty verses in the markup:</span></div><div><div><br></div></div><div><div><span style="font-family:arial,sans-serif;font-size:13px">Empty book (Epistle of Jeremiah):</span></div>
</div><div><div><span style="font-family:arial,sans-serif;font-size:13px">&lt;div type=&quot;x-Synodal-non-canonical&quot;</span><u style="font-family:arial,sans-serif;font-size:13px"></u><span style="font-family:arial,sans-serif;font-size:13px">&gt;&lt;div type=&quot;book&quot; osisID=&quot;EpJer&quot;&gt;&lt;chapter osisID=&quot;EpJer.1&quot;&gt;&lt;verse sID=&quot;EpJer.1.1-72&quot; osisID=&quot;EpJer.1.1 EpJer.1.2 EpJer.1.3 EpJer.1.4 EpJer.1.5 EpJer.1.6 EpJer.1.7 EpJer.1.8 EpJer.1.9 EpJer.1.10 EpJer.1.11 EpJer.1.12 EpJer.1.13 EpJer.1.14 EpJer.1.15 EpJer.1.16 EpJer.1.17 EpJer.1.18 EpJer.1.19 EpJer.1.20 EpJer.1.21 EpJer.1.22 EpJer.1.23 EpJer.1.24 EpJer.1.25 EpJer.1.26 EpJer.1.27 EpJer.1.28 EpJer.1.29 EpJer.1.30 EpJer.1.31 EpJer.1.32 EpJer.1.33 EpJer.1.34 EpJer.1.35 EpJer.1.36 EpJer.1.37 EpJer.1.38 EpJer.1.39 EpJer.1.40 EpJer.1.41 EpJer.1.42 EpJer.1.43 EpJer.1.44 EpJer.1.45 EpJer.1.46 EpJer.1.47 EpJer.1.48 EpJer.1.49 EpJer.1.50 EpJer.1.51 EpJer.1.52 EpJer.1.53 EpJer.1.54 EpJer.1.55 EpJer.1.56 EpJer.1.57 EpJer.1.58 EpJer.1.59 EpJer.1.60 EpJer.1.61 EpJer.1.62 EpJer.1.63 EpJer.1.64 EpJer.1.65 EpJer.1.66 EpJer.1.67 EpJer.1.68 EpJer.1.69 EpJer.1.70 EpJer.1.71 EpJer.1.72&quot;/&gt;&lt;verse eID=&quot;EpJer.1.1-72&quot;/&gt;&lt;/chapter&gt;</span><u style="font-family:arial,sans-serif;font-size:13px"></u><span style="font-family:arial,sans-serif;font-size:13px">&lt;/div&gt;&lt;/div&gt;</span></div>
</div><div><div><br style="font-family:arial,sans-serif;font-size:13px"></div></div><div><div><span style="font-family:arial,sans-serif;font-size:13px">I&#39;m not sure how osis2mod handles all this when importing to the module, but it works perfectly without warnings or errors. Also, when the resulting module is passed to the &quot;emptyvss&quot; tool, it passes this test without warnings.</span></div>
</div></blockquote></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 25 March 2014 11:38, Martin Denham <span dir="ltr">&lt;<a href="mailto:mjdenham@gmail.com" target="_blank">mjdenham@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:arial,sans-serif;font-size:13px"><div>I am having problems getting a list of BibleBooks contained in some AV modules which we know do not contain certain books.  I can&#39;t work out if the problem is with JSword, the modules, or osis2mod.</div>

<div><br></div><div>There are 2 related problems I can see:</div><div><ol><li>book.contains(nonExistingVerse) returns TRUE<br></li><li>book.getRawText(nonExistingVerse) returns &lt;chapter end tag&gt;</li></ol></div></div>

<div style="font-family:arial,sans-serif;font-size:13px">Here is a simple test to show the problem using KAZ which has Synodal v11n but does not contain any deuterocanonical books:<br></div><div style="font-family:arial,sans-serif;font-size:13px">



<br></div><div><div><font face="arial, sans-serif">    <span style="white-space:pre-wrap">        </span>SwordBook kaz = (SwordBook)Books.installed().getBook(&quot;KAZ&quot;);</font></div><div><font face="arial, sans-serif">    <span style="white-space:pre-wrap">        </span>Verse esd11Verse = new Verse(kaz.getVersification(), BibleBook.ESD1, 1, 1);</font></div>

<div><font face="arial, sans-serif">    <span style="white-space:pre-wrap">        </span>System.out.println(kaz.contains(esd11Verse));<span style="white-space:pre-wrap">        </span>// prints: <b>true</b></font></div><div><font face="arial, sans-serif">    <span style="white-space:pre-wrap">        </span>System.out.println(kaz.getRawText(esd11Verse));<span style="white-space:pre-wrap">        </span>// prints: <b>&lt;chapter eID=&quot;gen7&quot; osisID=&quot;1Esd.1&quot;/&gt;</b></font></div>

<div><font face="arial, sans-serif">    <span style="white-space:pre-wrap">        </span>Verse esd12Verse = new Verse(kaz.getVersification(), BibleBook.ESD1, 1, 2);</font></div><div><font face="arial, sans-serif">    <span style="white-space:pre-wrap">        </span>System.out.println(kaz.contains(esd12Verse));<span style="white-space:pre-wrap">        </span>// prints: <b>true</b></font></div>

<div><font face="arial, sans-serif">    <span style="white-space:pre-wrap">        </span>System.out.println(kaz.getRawText(esd12Verse));<span style="white-space:pre-wrap">        </span>// prints: <b>&lt;chapter eID=&quot;gen7&quot; osisID=&quot;1Esd.1&quot;/&gt;</b></font></div>

<div style="font-family:arial,sans-serif;font-size:13px"><br></div></div><div style="font-family:arial,sans-serif;font-size:13px">So how does &quot;&lt;chapter eID=&quot;gen7&quot; osisID=&quot;1Esd.1&quot;/&gt;&quot; get into verse content unexpectedly?</div>

<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">It seems to me like it could be either:</div><div style="font-family:arial,sans-serif;font-size:13px">



<ol><li>a module problem; but IBT say they do not add empty verse slots<br></li><li>Sword osis2mod issue<br></li><li>JSword issue: why is JSword returning a chapter end tag instead of verse content</li></ol></div><div style="font-family:arial,sans-serif;font-size:13px">



Any ideas what might cause this problem?</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Thanks</div><span class="HOEnZb"><font color="#888888"><div style="font-family:arial,sans-serif;font-size:13px">



Martin</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On 11 March 2014 12:15, DM Smith <span dir="ltr">&lt;<a href="mailto:dmsmith@crosswire.org" target="_blank">dmsmith@crosswire.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We haven&#39;t pushed this down into JSword. So far it is the responsibility of the front-end. Chris B has made it efficient to ask a Book whether it contains a Verse.<br>


<br>
Essentially, when it comes to asking a module if it has meaningful content, you want containsAny(Key verses, boolean includeIntros) and containsAny(Key verses) { return containsAny(verses, false); }<br>
<br>
I think it should ignore verse 0 by default. If it doesn&#39;t have verse content, then does the content really mean something?<br>
<br>
As you have noted contains(Key) is confusing. There are a few places where it means containsAny. Usually it means containAll. The name, contains, was chosen early as we derived from a container class where the argument was an element of the container.  That is, contains is supposed to mean isMemberOf. Later we changed the inheritance as it wasn&#39;t an &quot;is a&quot; relationship.<br>


<br>
But we need to be careful of not introducing more confusion.<br>
<br>
By the way, the list serve was holding mail for a few days.<br>
<br>
In Him,<br>
        DM<br>
<div><div><br>
On Mar 8, 2014, at 5:26 PM, Martin Denham &lt;<a href="mailto:mjdenham@gmail.com" target="_blank">mjdenham@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Is there an efficient way to find if a BibleBook is contained in a Book (Bible or commentary) using JSword?<br>
&gt;<br>
&gt; I recall this subject being discussed but can&#39;t recall the outcome.<br>
&gt;<br>
&gt; Thanks<br>
&gt; Martin<br>
</div></div>&gt; _______________________________________________<br>
&gt; jsword-devel mailing list<br>
&gt; <a href="mailto:jsword-devel@crosswire.org" target="_blank">jsword-devel@crosswire.org</a><br>
&gt; <a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/jsword-devel</a><br>
<br>
<br>_______________________________________________<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>
</div></div></blockquote></div><br></div>