<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Greg, thanks for the ideas.&nbsp;&nbsp; Have a
      look at this thread:<br>
      <br>
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/pipermail/sword-devel/2005-April/022109.html">http://www.crosswire.org/pipermail/sword-devel/2005-April/022109.html</a><br>
      <br>
      But let's please keep this thread pragmatic to solving the problem
      holding up this release :)<br>
      <br>
      Any suggestions for WHAT the output should be?<br>
      <br>
      I wasn't thinking of even including the &lt;div&gt; tags which are
      there simply to mark versification division.<br>
      <br>
      Troy<br>
      <br>
      <br>
      On 05/08/2013 01:15 PM, Greg Hellings wrote:<br>
    </div>
    <blockquote
cite="mid:CAHxvOVL3MH1aa6+VFLe_vfGf8iHE9uChHP_ExX7c9ozdcksV_Q@mail.gmail.com"
      type="cite">
      <div dir="ltr">Off the cuff here, it seems the issue is the
        difference in semantics of &lt;div&gt; between OSIS - where it
        marks a structural division within a text which can be of many
        different levels and layers and in XHTML where it represents a
        box of block-style layout which defaults to being the full width
        of its container.
        <div>
          <br>
        </div>
        <div>Producing "proper" output seems like it is only feasible if
          we are handling a block of output. The sample you have
          contains 3 sID and 1 eID attributes on div elements. And they
          are self-closing elements, which will typically render as
          vertical whitespace in XHTML. Ideally, any with sID="..."
          would be rendered with &lt;div&gt; and any with eID="..."
          would be rendered with &lt;/div&gt;.</div>
        <div><br>
        </div>
        <div>The problem becomes rendering a list of 30 (or however
          many) verses, if each is rendered separately by our filters.
          If &lt;div sID="gen1"/&gt; is within Gen.0.0 but &lt;div
          eID="gen1"/&gt; is at the end of the chapter, which appears to
          be the case here, then we don't properly want to generate
          something like<br>
          &lt;div&gt;</div>
        <div>&nbsp;Gen.0.0</div>
        <div style="">&lt;/div&gt;</div>
        <div>&nbsp;Gen.1.0</div>
        <div>&nbsp;Gen.1.1</div>
        <div>&nbsp;Gen.1.2</div>
        <div>&nbsp;...</div>
        <div>But rather we want something like</div>
        <div>&lt;div&gt;</div>
        <div>&nbsp;Gen.0.0</div>
        <div>&nbsp;Gen.1.0</div>
        <div>&nbsp;Gen.1.1</div>
        <div>&nbsp;Gen.1.2</div>
        <div>&nbsp;...</div>
        <div>&lt;/div&gt;<br>
          <div class="gmail_extra" style="">At least when not dealing
            with inter-linear versions, we do.</div>
          <div class="gmail_extra" style="">
            <br>
          </div>
          <div class="gmail_extra" style="">In BibleTime we have
            discussed how to properly handle this and came up with an
            interesting solution that we engineered but never
            implemented. Our thought was to store information along with
            each verse which includes a pre- and post- verse markup.
            This would need to become part of the OSIS import process,
            and it would track the "semantically" open elements such as
            &lt;div sID="gen1" /&gt; which, by XML standards are no
            longer open but the OSIS semantics designate that div is
            open until &lt;div eID="gen1" /&gt; is encountered. This
            would be in addition to the actually open XML elements.</div>
          <div class="gmail_extra" style=""><br>
          </div>
          <div class="gmail_extra" style="">Every verse entry would then
            keep a store of the open elements at its start and those
            still open at the end of the entry. Then, when an arbitrary
            range is selected for rendering - say, Genesis 1:15-25 - a
            single, complete OSIS document could be generated by taking
            Gen.1.15.pre and appending that to the text of
            Gen.1.15-Gen.1.25 and then appending Gen.1.25.post. Then a
            proper filter can operate on the entire block of text to
            generate correctly wrapping &lt;div&gt; ... &lt;/div&gt; and
            other markup.</div>
          <div class="gmail_extra" style=""><br>
          </div>
          <div class="gmail_extra" style="">Perhaps I overstepped the
            answer of what the above markup _should_ be, but I just
            wanted to toss out the solution that the BT folks have put
            brain power on to address the problem of stray
            open-and-close &lt;div&gt; elements. These seem to be the
            main problem in the sample you have presented. Again, there
            was never an implementation of this, as it would need to
            essentially re-import Sword module data to generate the pre-
            and post- data, and that went beyond the scope of any work
            heretofore on BibleTime.</div>
          <div class="gmail_extra" style=""><br>
          </div>
          <div class="gmail_extra" style="">--Greg</div>
          <div class="gmail_extra"><br>
            <div class="gmail_quote">On Wed, May 8, 2013 at 2:31 PM,
              Troy A. Griffitts <span dir="ltr">&lt;<a
                  moz-do-not-send="true"
                  href="mailto:scribe@crosswire.org" target="_blank">scribe@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">OK
                guys,<br>
                <br>
                I'm starting work on this. I've setup a test in our
                testsuite for whitespace against our OSIS reference doc.
                Here are the links:<br>
                <br>
                test:<br>
                <a moz-do-not-send="true"
                  href="http://crosswire.org/svn/sword/trunk/tests/osistest.cpp"
                  target="_blank">http://crosswire.org/svn/sword/trunk/tests/osistest.cpp</a><br>
                (whitespace test added at the end)<br>
                <br>
                OSIS Reference Document:<br>
                <a moz-do-not-send="true"
href="http://crosswire.org/svn/sword/trunk/tests/testsuite/osisReference.xml"
                  target="_blank">http://crosswire.org/svn/sword/trunk/tests/testsuite/osisReference.xml</a><br>
                <br>
                Before I start any work, I want to show what output we
                get currently. It is obviously seriously messed up.<br>
                <br>
                This is from the new XHTML filter set (which is based on
                the HTMLHREF filter set). The first obvious issue is the
                passthru of the OSIS &lt;div&gt; elements as-is. Anyone
                like to suggest exactly WHAT they would like as output
                from the XHTML filterset from the OSIS Reference
                document here? Current output below:<br>
                <br>
                <br>
                &lt;div sID="gen1" type="bookGroup"/&gt; &lt;h3&gt;Old
                Testament&lt;/h3&gt; &lt;div osisID="Gen" sID="gen2"
                type="book"/&gt; &lt;h3&gt;THE FIRST BOOK OF MOSES
                CALLED GENESIS&lt;/h3&gt; &lt;div sID="gen3"
                type="section"/&gt; &lt;h3&gt;Introduction and
                Outline&lt;/h3&gt; &lt;br /&gt; This is the
                &lt;b&gt;Book of Genesis&lt;/b&gt;, the
                &lt;i&gt;first&lt;/i&gt; book in the Bible. It may be
                outlined as follows: &lt;br /&gt;&lt;br /&gt; &lt;ul&gt;
                &lt;li&gt;&lt;i&gt;1&lt;/i&gt;Creation of Heaven and
                Earth, 1:1-2:4a&lt;/li&gt;
                &lt;li&gt;&lt;i&gt;2&lt;/i&gt;Creation of Man and Woman,
                2:4b-25&lt;/li&gt; &lt;li&gt;&lt;i&gt;3&lt;/i&gt;Fall,
                3:1-24&lt;/li&gt; &lt;li&gt;...&lt;/li&gt; &lt;/ul&gt;
                &lt;br /&gt;&lt;br /&gt; Tables work like this:
                &lt;b&gt;Column 1 Label&lt;/b&gt; &lt;b&gt;Column 2
                Label&lt;/b&gt; Column 1, Row 1 Column 2, Row 1 Column
                1, Row 2 Column 2, Row 2 &lt;br /&gt;&lt;div eID="gen3"
                type="section"/&gt;<br>
                &lt;div sID="gen7" type="majorSection"/&gt;
                &lt;h3&gt;From Creation to Abraham (1:1&#8211;11:9)&lt;/h3&gt;<br>
                [ Genesis 1:1 ] In the beginning God created the heaven
                and the earth. &lt;br /&gt;<br>
                [ Genesis 1:2 ] Text of verse 2.<br>
                <br>
                <br>
                <br>
                <br>
                _______________________________________________<br>
                sword-devel mailing list: <a moz-do-not-send="true"
                  href="mailto:sword-devel@crosswire.org"
                  target="_blank">sword-devel@crosswire.org</a><br>
                <a moz-do-not-send="true"
                  href="http://www.crosswire.org/mailman/listinfo/sword-devel"
                  target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
                Instructions to unsubscribe/change your settings at
                above page<br>
              </blockquote>
            </div>
            <br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page</pre>
    </blockquote>
    <br>
  </body>
</html>