<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><div><br>On Oct 23, 2012, at 7:52 PM, DM Smith &lt;<a href="mailto:dmsmith@crosswire.org">dmsmith@crosswire.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>Jsword doesn't handle links well. It follows the link and gets back what was<br></div></div></blockquote><div><br></div>given for what is linked. This is presented as the content.&nbsp;<div><br></div><div>The problem is what to return when Matt 1:3 is requested or Matt 1:2-7.&nbsp;</div><div><br></div><div>In the module the link is not to a verse but to an offset and a size. To determine what is linked you have to check whether the verse before and/or after have the same offset and size. If so keep going in the same direction looking for more. Once fully expanded the &lt;verse&gt; needs to wrap it w/ the correct osisID. Then mark those verses off the list of what was asked. If more verses were returned than asked adjust the request to reflect that.&nbsp;</div><div><br></div><div>The interface that is needed is something like:</div><div>book.isLinked(v, v + 1) [and v -1].</div><div><br></div><div>Maybe it should be lower. In backend.&nbsp;</div><div><br></div><div>Note this algorithm is overly complex when compared to a chapter at a time front-end.</div><div><br></div><div>In Him,</div><div>DM&nbsp;</div><div><br><blockquote type="cite"><div><div><br>Cent from my fone so theer mite be tipos. ;)</div><div><br>On Oct 23, 2012, at 4:15 PM, Chris Burrell &lt;<a href="mailto:chris@burrell.me.uk">chris@burrell.me.uk</a>&gt; wrote:<br><br></div><blockquote type="cite"><div>You're absolutely right. Both mod2osis and then osis2mod get back roughly the same data... The problem therefore seems to be with JSword, unless i don't understand what linking should do... Here's my source:<div>
<br></div><div><div>&lt;div type="section" annotateType="commentary" annotateRef="Matt.1"&gt;&nbsp;</div><div>&nbsp; &nbsp; &lt;figure src="<a href="http://localhost/step-web/images/AlfordGT_40_Mat-0150.jpg">http://localhost/step-web/images/AlfordGT_40_Mat-0150.jpg</a>" 
                                        alt="Matthew 1, Page 1"&gt;&lt;caption&gt;Matthew 1, Page 1&lt;/caption&gt;
                                &lt;/figure&gt;&nbsp;</div><div>&nbsp; &nbsp; &lt;figure src="<a href="http://localhost/step-web/images/AlfordGT_40_Mat-0151.jpg">http://localhost/step-web/images/AlfordGT_40_Mat-0151.jpg</a>" 
                                        alt="Matthew 1, Page 1"&gt;&lt;caption&gt;Matthew 1, Page 1&lt;/caption&gt;&lt;/figure&gt;&nbsp;</div><div>[...]</div><div>&lt;/div&gt;</div><div><br></div><div>the mod2osis command gives me the above (approx, where's it has got rid of the hierarchy and put some sId and eId, presumably for start and end of the divs). However, when reading it through JSword, &nbsp;I get each individual verse:</div>
<div><br></div><div><div>&nbsp; &lt;verse osisID="Matt.1.1"&gt;</div><div>&nbsp; &nbsp; &lt;div sID="gen1" type="x-testament" /&gt;</div><div>&nbsp; &nbsp; &lt;div osisID="Matt" sID="gen2" type="book" /&gt;</div>
<div>&nbsp; &nbsp; &lt;div annotateRef="Matt.1" annotateType="commentary" sID="gen3" type="section" /&gt;</div><div>&nbsp; &nbsp; &lt;figure alt="Matthew 1, Page 1" src="<a href="http://localhost/step-web/images/AlfordGT_40_Mat-0150.jpg">http://localhost/step-web/images/AlfordGT_40_Mat-0150.jpg</a>"&gt;</div>
<div>&nbsp; &nbsp; &nbsp; &lt;caption&gt;Matthew 1, Page 1&lt;/caption&gt;</div><div>&nbsp; &nbsp; &lt;/figure&gt;</div><div>&nbsp; &nbsp; &lt;figure alt="Matthew 1, Page 1" src="<a href="http://localhost/step-web/images/AlfordGT_40_Mat-0151.jpg">http://localhost/step-web/images/AlfordGT_40_Mat-0151.jpg</a>"&gt;</div>
<div>&nbsp; &nbsp; &nbsp; &lt;caption&gt;Matthew 1, Page 1&lt;/caption&gt;</div><div>&nbsp; &nbsp; &lt;/figure&gt;</div><div>&nbsp; &nbsp; &lt;div annotateRef="Matt.1" annotateType="commentary" eID="gen3" type="section" /&gt;</div>
<div>&nbsp; &nbsp; &lt;div eID="gen2" osisID="Matt" type="book" /&gt;</div><div>&nbsp; &nbsp; &lt;div eID="gen1" type="x-testament" /&gt;</div><div>&nbsp; &lt;/verse&gt;</div><div>&nbsp; &lt;verse osisID="Matt.1.2"&gt;</div>
<div>&nbsp; &nbsp; &lt;div sID="gen1" type="x-testament" /&gt;</div><div>&nbsp; &nbsp; &lt;div osisID="Matt" sID="gen2" type="book" /&gt;</div><div>&nbsp; &nbsp; &lt;div annotateRef="Matt.1" annotateType="commentary" sID="gen3" type="section" /&gt;</div>
<div>&nbsp; &nbsp; &lt;figure alt="Matthew 1, Page 1" src="<a href="http://localhost/step-web/images/AlfordGT_40_Mat-0150.jpg">http://localhost/step-web/images/AlfordGT_40_Mat-0150.jpg</a>"&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;caption&gt;Matthew 1, Page 1&lt;/caption&gt;</div>
<div>&nbsp; &nbsp; &lt;/figure&gt;</div><div>&nbsp; &nbsp; &lt;figure alt="Matthew 1, Page 1" src="<a href="http://localhost/step-web/images/AlfordGT_40_Mat-0151.jpg">http://localhost/step-web/images/AlfordGT_40_Mat-0151.jpg</a>"&gt;</div>
<div>&nbsp; &nbsp; &nbsp; &lt;caption&gt;Matthew 1, Page 1&lt;/caption&gt;</div><div>&nbsp; &nbsp; &lt;/figure&gt;</div><div>&nbsp; &nbsp; &lt;div annotateRef="Matt.1" annotateType="commentary" eID="gen3" type="section" /&gt;</div>
<div>&nbsp; &nbsp; &lt;div eID="gen2" osisID="Matt" type="book" /&gt;</div><div>&nbsp; &nbsp; &lt;div eID="gen1" type="x-testament" /&gt;</div><div>&nbsp; &lt;/verse&gt;</div><div><br></div><div><br>
</div><div>Chris</div><div><br></div><div><br><br><div class="gmail_quote">On 23 October 2012 20:49, Brian J Dumont <span dir="ltr">&lt;<a href="mailto:brian.j.dumont@gmail.com" target="_blank">brian.j.dumont@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 bgcolor="#FFFFFF" text="#000000">
    <div>It should not be doing that.&nbsp; When you
      run osis2mod, you should see something like <br>
      Gen.1.2 linked to Gen.1.1<br>
      Gen.1.3 linked to Gen.1.1<br>
      Gen.1.4 linked to Gen.1.1<br>
      etc.<br>
      <br>
      They should all be handled internally by links not copies.&nbsp; Also,
      front-ends should be smart enough to understand links, so when you
      have "commentary by chapter" selected, you should only see this
      content once.<br>
      <br>
      my build script for this module is very simple:<br>
      xmllint --noout --schema
      <a href="http://www.bibletechnologies.net/osisCore.2.1.1.xsd" target="_blank">http://www.bibletechnologies.net/osisCore.2.1.1.xsd</a> art.osis<br>
      osis2mod mod/ art.osis<span class="HOEnZb"><font color="#888888"><br>
      <br>
      Brian</font></span><div><div class="h5"><br>
      <br>
      On 10/23/2012 03:38 PM, Chris Burrell wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">Thanks Brian. I see you used the following fragment:
      <div><br>
      </div>
      <div>&lt;div type="section" annotateType="commentary"
        annotateRef="Gen.1.1-Gen.1.5"&gt;</div>
      <div><br>
      </div>
      <div>Unfortunately, what that seems to do is make 5 verses
        (Gen.1.1, Gen.1.2, etc.) and copies all the content into it.
        Unless I'm misunderstanding something?&nbsp;</div>
      <div><br>
      </div>
      <div>Did you use osis2mod? or another tool to create your module
        from the source you sent me?</div>
      <div><br>
      </div>
      <div>Chris</div>
      <div><br>
        <br>
        <div class="gmail_quote">On 23 October 2012 20:15, Brian J
          Dumont <span dir="ltr">&lt;<a href="mailto:brian.j.dumont@gmail.com" target="_blank">brian.j.dumont@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 bgcolor="#FFFFFF" text="#000000">
              <div>Hi Chris,<br>
                <br>
                This is the source for BibleArtBW, which is also an OSIS
                commentary containing images<br>
                <br>
                Hopefully you may find it useful,<br>
                Brian
                <div>
                  <div><br>
                    <br>
                    <br>
                    On 10/23/2012 03:10 PM, Chris Burrell wrote:<br>
                  </div>
                </div>
              </div>
              <div>
                <div>
                  <blockquote type="cite">
                    <p>Hi DM</p>
                    <p>I have a collection of images tagged by chapter
                      and there can be more than one image per chapter.
                      each image is a page from a commentary. are there
                      perhaps other tools to create such modules?</p>
                    <p>Chris</p>
                    <div class="gmail_quote">On Oct 23, 2012 7:17 PM,
                      "DM Smith" &lt;<a href="mailto:dmsmith@crosswire.org" target="_blank">dmsmith@crosswire.org</a>&gt;
                      wrote:<br type="attribution">
                      <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> osis2mod is for Bible's
                        and commentaries that are verse by verse. It
                        does not work with all forms of osis input.<br>
                        <br>
                        What kind of module are you trying to build?<br>
                        <br>
                        In Him,<br>
                        &nbsp; &nbsp; &nbsp; &nbsp; DM<br>
                        <br>
                        On Oct 23, 2012, at 1:59 PM, Chris Burrell &lt;<a href="mailto:chris@burrell.me.uk" target="_blank">chris@burrell.me.uk</a>&gt;
                        wrote:<br>
                        <br>
                        &gt; Hi<br>
                        &gt;<br>
                        &gt; I'm attempting to write my first OSIS
                        module. I've got it all zipping up, etc. However
                        there is no content. I have a chapter block with
                        a list of figures inside.<br>
                        &gt;<br>
                        &gt; According to the OSIS manual that is
                        acceptable:<br>
                        &gt; 7.6.1. Elements allowed in chapter elements<br>
                        &gt;<br>
                        &gt; However, when I reverse the process with
                        mod2osis, I see that there is no content, my
                        list of figures in each chapter are absent, and
                        I have no chapters either...<br>
                        &gt;<br>
                        &gt; Any ideas what might be happening and what
                        I'm doing wrong?<br>
                        &gt; Chris<br>
                        &gt;<br>
                        &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>
                      </blockquote>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>_______________________________________________
jsword-devel mailing list
<a href="mailto:jsword-devel@crosswire.org" target="_blank">jsword-devel@crosswire.org</a>
<a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/jsword-devel</a>
</pre>
                  </blockquote>
                  <br>
                  <br>
                </div>
              </div>
              <span><font color="#888888">
                  <pre cols="72">-- 
-----------------------------------------------------------------------
The opposite of fear is not courage; the opposite of fear is Faith. The 
devil has Fear Alone; we have Faith Alone – Christ Alone.  Fear looks 
inward, and finds nothing. Faith looks outside itself to Jesus the 
Crucified, and finds everything.  - Todd Wilken
</pre>
                </font></span></div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <br>
    <pre cols="72">-- 
-----------------------------------------------------------------------
The opposite of fear is not courage; the opposite of fear is Faith. The 
devil has Fear Alone; we have Faith Alone – Christ Alone.  Fear looks 
inward, and finds nothing. Faith looks outside itself to Jesus the 
Crucified, and finds everything.  - Todd Wilken
</pre>
  </div></div></div>

</blockquote></div><br></div></div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>jsword-devel mailing list</span><br><span><a href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a></span><br><span><a href="http://www.crosswire.org/mailman/listinfo/jsword-devel">http://www.crosswire.org/mailman/listinfo/jsword-devel</a></span><br></div></blockquote></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>jsword-devel mailing list</span><br><span><a href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a></span><br><span><a href="http://www.crosswire.org/mailman/listinfo/jsword-devel">http://www.crosswire.org/mailman/listinfo/jsword-devel</a></span><br></div></blockquote></div></body></html>