I think I fixed the verse issue by having empty spans to make up for the height (bit of a hack). Another way might be to set the height of the verse to be 1em x the number of displayed lines. I think that helped to an extent in the past.<div>
<br></div><div>One interesting thing, with KJV at least is the punctuation and whitespace. (I&#39;ve now updated this with some approximation of what I mean <a href="http://crosswire.org/~chrisburrell">http://crosswire.org/~chrisburrell</a> - click the config button if you want to show in stacks and you&#39;ll have to select kjv and the passage again! ). You can see straight away there&#39;s a slight issue. And that is because the punctuation isn&#39;t included in the W elements. It&#39;s some text() that has for direct parent a verse. Makes it quite hard to do properly in XSLT. Ideally I reckon, we should try and parse it into the previous child. How, not quite sure yet... Also look at Romans 1:4, you can see at least 4 spaces. That&#39;s because there are 4 strongs that have been tagged, but don&#39;t have any associated words. The question really, is whether to show them at all!? They don&#39;t tell us much really, and almost suggest that these words didn&#39;t make it in to the translation... So I&#39;d be intrigued to see if you can amend your interlinear and still have the punctuation and spaces display correctly AND have the Ws spaced correctly when there is no punctuation.</div>
<div><br></div><div>As for the bug, this can be discussed on the other thread. This the singleton issue that I believe is in the driver reading the passage, which means passages get mixed up. For me, it&#39;s definitely a concurrency issue, since my left and right panes, when set to the same book, loaded up and mixed up the passages between themselves. </div>
<div><br></div><div>As for the parameter, I mean one that gets set in the Transformer before the xslt is processed. Let me share some real code.</div><div><br></div><div>Top of the stylesheet before anything is declared:</div>
<div><div><br></div><div>&lt;xsl:param name=&quot;InterlinearProvider&quot; /&gt; &lt;!-- passed in as a java object from code --&gt;</div></div><div>&lt;xsl:variable name=&quot;interlinearProviderService&quot; select=&quot;jsword:com.tyndalehouse.step.core.xsl.IPSample.new()&quot; /&gt; &lt;!-- creating instance in spreadsheet to show the problem --&gt;</div>
<div><br></div><div><div>&lt;!-- this works and I can thereby confirm that InterlinearProvider is an object of the right type --&gt;</div><div>&lt;xsl:variable name=&quot;interlinearWord&quot; select=&quot;jsword:getWord($interlinearProviderService, $InterlinearProvider)&quot;/&gt;--&gt;</div>
<div>&lt;xsl:value-of select=&quot;$interlinearWord&quot;/&gt;    </div><div><br></div><div>&lt;!-- this doesn&#39;t work --&gt;</div><div>&lt;xsl:variable name=&quot;interlinearWord&quot; select=&quot;jsword:getWord($InterlinearProvider, $InterlinearProvider)&quot;/&gt;</div>
<div>&lt;xsl:value-of select=&quot;$interlinearWord&quot;/&gt;</div><div>    </div><div>The function signature for the purpose of the test was getWord(Object o);</div><div><br></div><div>But I&#39;ve tried with getWord() (calling getWord($InterlinearProvider) doesn&#39;t work, calling getWord($interlinearProviderService) does work. I&#39;ve also tried getWord(String,String), etc.</div>
<div><br></div><div>So it seems it works for things that initialised in the XSLT (interlinearProviderService), but not for those outside, even though I can see that the stylesheet thinks of $InterlinearProvider as a java object, cos I can pass it in and have look at its properties in debug mode.</div>
<div><br></div><div>I&#39;ve also tried copy the xsl:param to xsl:variable first and calling getWord($copiedVariable) but that didn&#39;t work either.</div><div><br></div><div>Does that make more sense?</div></div><div>Chris</div>
<div><br></div><br><div class="gmail_quote">On 9 November 2010 20:56, DM Smith <span dir="ltr">&lt;<a href="mailto:dmsmith@crosswire.org">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;">


  
    
  
  <div bgcolor="#ffffff" text="#000000"><div class="im">
    On 11/09/2010 11:19 AM, Chris Burrell wrote:
    <blockquote type="cite">Trent/All
      <div><br>
      </div>
      <div>I have successfully managed to call instance methods on
        variables set and initialised in the XSL. However, as soon as I
        change to a parameter that is passed in (using the same format
        jsword:getWord($interlinearObj, arg1, arg2) ) my stylesheet
        refuses to compile at runtime. I&#39;ve also tried copying the
        &quot;xsl:parameter&quot; into the xsl:variable, but that doesn&#39;t work
        either.</div>
    </blockquote>
    <br></div>
    I&#39;m not sure if you mean a parameter to the stylesheet. If so in the
    top of BD&#39;s xslt it copies the values into variables and uses them.<br>
    <br>
    If you mean a parameter to a template, I&#39;m not sure what the problem
    would be. You might need to use some quoting magic. Can&#39;t remember
    off the top of my head how it is done. Maybe ${xyz}???<br>
    <br>
    If you mean that $interlinearObj is not a string or a number, then
    that is likely to be your problem.<div><div></div><div class="h5"><br>
    <br>
    <blockquote type="cite">
      <div><br>
      </div>
      <div>However I am able to pass the parameter as an instance method
        parameter (so I could pass it to X that would instantiated
        during the XSL transformation, and then invoke the method on
        it?). Or I could pass in parameters to initialise it in the XSL,
        as opposed to passing in the already-instantiated object into
        the XSL and trying to invoke a method on that...</div>
      <div><br>
      </div>
      <div>So no biggies... But would have been nicer to provide an
        object that the XSL just needs to use, rather than set up as
        well.</div>
      <div>Any ideas?</div>
      <div><br>
      </div>
      <div>Chris</div>
      <div><br>
        <br>
        <div class="gmail_quote">
          On 7 November 2010 00:04, Chris Burrell <span dir="ltr">&lt;<a href="mailto:chris@burrell.me.uk" target="_blank">chris@burrell.me.uk</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
            On this last note, I believe we have concurrency issues. I
            have a two column page, displaying one passage each. On load
            of the page they load up a passage each, but then this once,
            the passage on the right (only verse 1) has gone to the left
            (which was requesting just one verse but from a different
            passage:
            <div>
              <br>
            </div>
            <div>left pane: requested Acts 2:10, got Romans 1:1</div>
            <div>right pane: corrupt XML in verse 1, verse 2 seems to be
              Romans 1:2-following</div>
            <div><br>
            </div>
            <div>Anyone else come across those issues?</div>
            <div>
              Chris</div>
            <div>
              <div>
                <div><br>
                  <div class="gmail_quote">On 6 November 2010 20:53,
                    Chris Burrell <span dir="ltr">&lt;<a href="mailto:chris@burrell.me.uk" target="_blank">chris@burrell.me.uk</a>&gt;</span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
                      Another question too. It seems sometimes, both in
                      bible desktop and my current application, the html
                      rendered is broken?
                      <div><br>
                      </div>
                      <div>Any ideas why that might be?</div>
                      <div><br>
                      </div>
                      <div>For example, I get:</div>
                      <div>
                        &quot;&lt;div class=&quot;passageText
                        ui-widget&quot;&gt;&lt;div&gt;&lt;h2
                        class=&quot;heading&quot;&gt;Acts 2:10&lt;/h2&gt;&lt;span
                        class=&quot;verse&quot;&gt;&lt;span class=&quot;w&quot;&gt;&lt;sup
                        class=&quot;verseNumber&quot;&gt;10&lt;/sup&gt;&lt;/span&gt;&lt;span
                        class=&quot;w&quot;<b>&gt;&lt;span
                          class=&quot;text&quot;&gt;emma=&quot;strong:G1909&quot;
                          morph=&quot;robinson:PREP</b>&quot; src=&quot;4&quot;&amp;gt;upon
                        every soul of man that doeth evil, of the Jew
                        first, and also of the
                        Gentile;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
                        &lt;/div&gt;&lt;/div&gt;&quot;</div>
                      <div><br>
                      </div>
                      <div>The above in bold shows that it didn&#39;t get
                        XSLTed properly.</div>
                      <div><br>
                      </div>
                      <div>Instead of &quot;&lt;div class=&quot;passageText
                        ui-widget&quot;&gt;&lt;div&gt;&lt;h2
                        class=&quot;heading&quot;&gt;Acts 2:10&lt;/h2&gt;&lt;span
                        class=&quot;verse&quot;&gt;&lt;sup
                        class=&quot;verseNumber&quot;&gt;10&lt;/sup&gt;&lt;span
                        class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;&amp;nbsp;&lt;/span&gt;
                        &lt;/span&gt;&lt;span class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;&amp;nbsp;&lt;/span&gt;
                        &lt;/span&gt;&lt;span class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;Phrygia&lt;/span&gt;&lt;/span&gt;,
                        &lt;span class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;&amp;nbsp;&lt;/span&gt;
                        &lt;/span&gt;&lt;span class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;and&lt;/span&gt;&lt;/span&gt;
                        &lt;span class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;Pamphylia&lt;/span&gt;&lt;/span&gt;,
                        &lt;span class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;in
                        Egypt&lt;/span&gt;&lt;/span&gt;, &lt;span
                        class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;and&lt;/span&gt;&lt;/span&gt;
                        &lt;span class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;in the
                        parts&lt;/span&gt;&lt;/span&gt; &lt;span
                        class=&quot;w&quot;&gt;&lt;span class=&quot;text&quot;&gt;of
                        Libya&lt;/span&gt;&lt;/span&gt; &lt;span
                        class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;about&lt;/span&gt;&lt;/span&gt;
                        &lt;span class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;Cyrene&lt;/span&gt;&lt;/span&gt;,
                        &lt;span class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;and&lt;/span&gt;&lt;/span&gt;
                        &lt;span class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;strangers&lt;/span&gt;&lt;/span&gt;
                        &lt;span class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;of
                        Rome&lt;/span&gt;&lt;/span&gt;, &lt;span
                        class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;Jews&lt;/span&gt;&lt;/span&gt;
                        &lt;span class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;&amp;nbsp;&lt;/span&gt;
                        &lt;/span&gt;&lt;span class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;and&lt;/span&gt;&lt;/span&gt;
                        &lt;span class=&quot;w&quot;&gt;&lt;span
                        class=&quot;text&quot;&gt;proselytes&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt;
                        &lt;/div&gt;&lt;/div&gt;&quot;</div>
                      <div><br>
                      </div>
                      <div>So somehow it lost a whole load on the way
                        out of the XSLT? The only difference is that the
                        first one is on startup of the server, the
                        second is with a refresh in the browser. Perhaps
                        something hasn&#39;t loaded up correctly/entirely?</div>
                      <div><br>
                      </div>
                      <font color="#888888">
                        <div>Chris</div>
                      </font>
                      <div>
                        <div>
                          <div><br>
                            <div class="gmail_quote">On 5 November 2010
                              23:10, Chris Burrell <span dir="ltr">&lt;<a href="mailto:chris@burrell.me.uk" target="_blank">chris@burrell.me.uk</a>&gt;</span>
                              wrote:<br>
                              <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
                                Thanks DM. So I found this page
                                (again)! <a href="http://www.crosswire.org/%7Edmsmith/interlinear/" target="_blank">http://www.crosswire.org/~dmsmith/interlinear/</a>
                                <div><br>
                                </div>
                                <div>And managed to replicate (and
                                  solve?) the issues I found originally
                                  when I looked at it before:</div>
                                <div><br>
                                </div>
                                <div>1st When lines in the interlinear
                                  only have 1 line (i.e. no 2nd/3rd or
                                  4th line). As a result, when the text
                                  wraps, it floats below the first line.
                                  As a hack (although on could argue
                                  that there is an empty spot there,
                                  rather than nothing), I think we can
                                  put a
                                  &lt;span&gt;&amp;nbsp;&lt;/span&gt; or
                                  we could use a height maybe? (not
                                  quite so good, unless we specify in
                                  ems and exs). And the second thing is
                                  that within a particular word stack,
                                  the words might wrap. I believe this
                                  particular issue is only visible in
                                  IE. For IE 8, the fix is to put a
                                  whitespace: nowrap CSS directive. Not
                                  sure if that helps on IE6 and 7
                                  though? Spec says it should be
                                  supported on both browsers.</div>
                                <div><br>
                                </div>
                                <div>And yup, I&#39;m targetting web
                                  environments, and also web mobile
                                  browsers. </div>
                                <div>Chris</div>
                                <div>
                                  <div>
                                    <div><br>
                                      <br>
                                      <div class="gmail_quote">On 5
                                        November 2010 20:09, 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:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
                                          <div bgcolor="#ffffff" text="#000000"> I&#39;m heading
                                            out for the weekend. In a
                                            few minutes. <br>
                                            It&#39;ll probably be Monday
                                            evening when I send it.<br>
                                            <br>
                                            The solution uses spans with
                                            their display set to block.<br>
                                            <font color="#888888"> <br>
                                              -- DM</font>
                                            <div>
                                              <div><br>
                                                <br>
                                                On 11/05/2010 03:55 PM,
                                                Chris Burrell wrote:
                                                <blockquote type="cite">DM,
                                                  you said you might
                                                  have an intearlinear
                                                  model that worked? I
                                                  had another look to
                                                  see how I did mine
                                                  previously, and found
                                                  that in fact I used
                                                  tables. I think I
                                                  struggled for quite a
                                                  while to get a model
                                                  working across
                                                  browsers using DIVs,
                                                  but none of them
                                                  seemed to wrap
                                                  properly at the end of
                                                  the line.  But
                                                  unfortunately table
                                                  layouts are slow and
                                                  therefore it would be
                                                  better to have divs. 
                                                  <div> <br>
                                                  </div>
                                                  <div>Would you be able
                                                    to let me have your
                                                    samples?</div>
                                                  <div>Chris<br>
                                                    <br>
                                                    <div class="gmail_quote">On
                                                      5 November 2010
                                                      19:21, Chris
                                                      Burrell <span dir="ltr">&lt;<a href="mailto:chris@burrell.me.uk" target="_blank">chris@burrell.me.uk</a>&gt;</span>
                                                      wrote:<br>
                                                      <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">What&#39;s
                                                        GNT? Greek New
                                                        Testament? I
                                                        think we can do
                                                        more than that
                                                        too. If other
                                                        Bible versions
                                                        have strong
                                                        numbers and/or
                                                        morphology tags,
                                                        then we can put
                                                        those in
                                                        parallel, and
                                                        end up having
                                                        French with
                                                        English
                                                        &quot;subtitles&quot;, or
                                                        English with
                                                        English, as well
                                                        as English with
                                                        Greek, etc.
                                                        <div> <br>
                                                        </div>
                                                        <div>So I&#39;ve had
                                                          a look at the
                                                          framework so
                                                          far and it
                                                          seems fairly
                                                          easy not to
                                                          use Bible
                                                          Desktop
                                                          components and
                                                          have a good
                                                          XSLT
                                                          transformation.
                                                          So all we
                                                          would need to
                                                          add is some
                                                          helpers that
                                                          users can
                                                          easily
                                                          integrate into
                                                          their XSLTs.
                                                          It would nice
                                                          to have some
                                                          sample XSLs
                                                          for people to
                                                          use. So for
                                                          example, I&#39;ve
                                                          had to strip
                                                          out all the
                                                          CSS and font
                                                          tags from the
                                                          Bible Desktop
                                                          one so as to
                                                          produce a good
                                                          XHTML
                                                          compliant
                                                          one. </div>
                                                        <div><br>
                                                        </div>
                                                        <div>Say we give
                                                          the XSLT a
                                                          InterlinearProvider
                                                          initialised
                                                          with its
                                                          version and
                                                          passage, as it
                                                          parses the
                                                          strong/morph
                                                          option we can
                                                          then call
                                                          get($provider,
                                                          @strong,
                                                          @morph), which
                                                          would in turn
                                                          optionally
                                                          return the
                                                          correct words
                                                          (or best word
                                                          since
                                                          sometimes you
                                                          may have
                                                          multiple
                                                          options in
                                                          modules tagged
                                                          with strong
                                                          numbers only.
                                                          In fact it
                                                          would be
                                                          better to have
                                                          something like
                                                          get($provider,
                                                          osis_verse_id,
                                                          @strong,
                                                          @morph). Since
                                                          then, if we
                                                          don&#39;t have the
                                                          morphology of
                                                          the word, at
                                                          least we can
                                                          limit the
                                                          lookups to
                                                          those words
                                                          that are
                                                          tagged in a
                                                          particular
                                                          verse (that
                                                          assumes that
                                                          versification
                                                          is comparable
                                                          between
                                                          versions).</div>
                                                        <div><br>
                                                        </div>
                                                        <div>We&#39;ll want
                                                          to add options
                                                          to have tagged
                                                          information
                                                          displayed on
                                                          the side of a
                                                          word/phrase or
                                                          below a
                                                          word/phrase.
                                                          At the moment
                                                          the XSLT
                                                          displays morph
                                                          and strong
                                                          tags next to
                                                          the text. I&#39;ll
                                                          add some
                                                          transformations
                                                          to have it on
                                                          separate
                                                          lines. Then we
                                                          can reuse the
                                                          same
                                                          transformations
                                                          to line up
                                                          text beneath
                                                          it. </div>
                                                        <div><br>
                                                        </div>
                                                        <div>DM, I had a
                                                          look at <span style="font-family:arial,sans-serif;border-collapse:collapse">&quot;flying

                                                          saucer&quot; , but
                                                          didn&#39;t quite
                                                          understand
                                                          where it comes
                                                          in? Would the
                                                          idea be
                                                          instead of the
                                                          XSLT? And have
                                                          it transform
                                                          to different
                                                          UIs?</span></div>
                                                        <div><br>
                                                        </div>
                                                        <font color="#888888">
                                                          <div>Chris</div>
                                                        </font>
                                                        <div>
                                                          <div>
                                                          <div><br>
                                                          <br>
                                                          <div class="gmail_quote">On
                                                          5 November
                                                          2010 03:51,
                                                          Tonny Kohar <span dir="ltr">&lt;<a href="mailto:tonny.kohar@gmail.com" target="_blank">tonny.kohar@gmail.com</a>&gt;</span>
                                                          wrote:<br>
                                                          <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"> Hi,<br>
                                                          <div><br>
                                                          On Thu, Nov 4,
                                                          2010 at 11:30
                                                          PM, DM Smith
                                                          &lt;<a href="mailto:dmsmith@crosswire.org" target="_blank">dmsmith@crosswire.org</a>&gt;

                                                          wrote:<br>
                                                          &gt; Much of
                                                          the
                                                          transformations
                                                          is done in
                                                          BibleDesktop.
                                                          Refactoring
                                                          these and<br>
                                                          &gt; putting
                                                          it into JSword
                                                          and/or common
                                                          would be good.<br>
                                                          &gt;<br>
                                                          <br>
                                                          </div>
                                                          +1<br>
                                                          Yes it would
                                                          be nice to
                                                          have this
                                                          under JSword
                                                          instead of
                                                          BIbleDesktop<br>
                                                          <br>
                                                          Sincerely<br>
                                                          Tonny Kohar<br>
                                                          </blockquote>
                                                          </div>
                                                          </div>
                                                          </div>
                                                        </div>
                                                      </blockquote>
                                                    </div>
                                                  </div>
                                                </blockquote>
                                              </div>
                                            </div>
                                          </div>
                                        </blockquote>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </blockquote>
                            </div>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <br>
  </div></div></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>