<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">A bit more on osis2mod and &lt;lg&gt;.<div><br></div><div>Osis2mod takes valid OSIS and transforms BSP (Book/Section/Paragraph) into BCV (Book/Chapter/Verse) it so that it will will have valid xml fragments for every verse, when wrapped with a &lt;verse&gt; element.</div><div><br></div><div>In the transformation, each element which can cross verse boundaries (start or end in a verse but not both) into a milestoned element that is syntatically valid OSIS. However, this does guarantee that the element in context is valid.</div><div><br></div><div>This is the case for &lt;lg&gt; as it is transformed from it's container form to its milestoned form. The &lt;l&gt; elements, whether milestoned or not are not allowed anywhere but in an &lt;lg&gt; element. This is a bug in the OSIS spec. Either the &lt;lg&gt; element has to change to not be milestoned or the container elements for &lt;lg&gt; have to be modified to allow &lt;l&gt; (as has been done with &lt;lb/&gt;. I think the latter.</div><div><br></div><div>Ben's "hack" is a proper observation. &lt;lg&gt; should have as little presentation tied to it as possible. What you are attempting is necessary. Always assume that every &lt;l&gt; is in an &lt;lg&gt;.</div><div><br></div><div>So the ESV, when presented to osis2mod was valid BSP OSIS. Note that in a few instances, the &lt;lg&gt; is not in the same chapter.</div><div><br></div><div>The problem with "stuff" being put into verse 0 (aka intros) is that the everything before the first verse in a chapter is put into the chapter intro until osis2mod sees something that indicates that the intro is done and the rest of the "stuff" goes with the verse. (This is documented in the wiki and in the code and I've mentioned it in detail here also.) But suffice it to say, the simple solution is to add &lt;div type="section"&gt; around groups of verses. That will divide what is before it for the intro and what is after it for verse 1.</div><div><br></div><div>Hope this helps,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>DM</div><div><br><div><div>On Feb 5, 2013, at 6:49 AM, Nic Carter &lt;<a href="mailto:niccarter@mac.com">niccarter@mac.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div>Well, as far as I'm aware, I have the ESV poetry 100% correct in PS now. And given I use either the ESV or the KJV in PS &amp; the KJV doesn't do indentation, PS does poetry 100% correct for _me_ ;)<div><br></div><div>So I'm going to leave it at that, and get on with other stuff. :)</div><div><br></div><div>Which reminds me, if anyone else is interested in beta testing PocketSword, please shoot me a private email, as it's been so long since I did beta testing for it that half of my beta testers have other commitments now &amp; can no longer help out. &nbsp;:)</div><div><br></div><div><br></div><div>Thanks, ybic</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>nic... &nbsp;:)</div><div><br></div><div>ps: Thanks for your help Ben! I agree, that having some way of keeping track of which tags are currently open would be great. I was going to hack together some stuff, such as the ability to create your own userData stuff &amp; pass that through to the filters, but I doubt that that would be accepted into SVN &amp; so I coded my stuff in Objective-C instead, meaning it'll only work in PS &amp; Eloquent/MacSword. :)</div><div><br></div><div>pps: in my delvings into SWORD I noticed a few comments regarding binary compat with 1.6.x and I was wondering if those were going to be cleared up before 1.7.0 was going to be released?</div><div>
<br><div><div>On 05/02/2013, at 9:57 PM, Ben Morgan &lt;<a href="mailto:benpmorgan@gmail.com">benpmorgan@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Yep, there are lots of inconsistencies. Hopefully over time with more support they will tend to go away.<div><br></div><div>Just to be clear with the ESV, I doubt it is incorrectly encoded. It's just it's not encoded in a way that greatly helps per-chapter rendering (or even per-verse) rendering. Especially the presence of per-verse rendering (e.g. in a list of cross-references) means that you have to be able dispense with &lt;lg&gt;s and infer them from the &lt;l&gt; (side note: it would be nice if SWORD provided some way of keeping track of what tags are open at which verses so partial renders will work (e.g. for &lt;q&gt; - Words of Jesus, &lt;lg&gt;, paragraphs, etc.))</div>

<div><br></div><div>When I looked recently, the WEB was encoded in such a way that I found I didn't have the time to make it work properly, mostly due to the &lt;lg&gt; being at the end of the previous verse - I believe due to issues with osis2mod as previously discussed. I still think this needs fixing.&nbsp;</div>

<div>I think they should definitely be tied to the verse they start at.</div><div><br clear="all"><div>God Bless,<br>Ben<br>-------------------------------------------------------------<br>
        <div>
        <div>For I have no pleasure in the death of anyone, <br>declares the Lord <span style="font-variant:small-caps">God</span>; so turn, and live.”<br>Ezekiel 18:32 (ESV)</div>
        </div>
        
<br></div>
<br><br><div class="gmail_quote">On Tue, Feb 5, 2013 at 9:33 PM, Nic Carter <span dir="ltr">&lt;<a href="mailto:niccarter@mac.com" target="_blank">niccarter@mac.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Hi gang,<br>
<br>
I just wanted to touch base with where I'm at with the poetry stuff.<br>
<br>
Taking Ben's code as a guide, I've ported it across to SWORD and it's kinda working. You can see my current version on bit bucket.<br>
<br>
Note that this current version is very similar to the patch I sent through a few days ago, but I'm going to suggest that we don't implement this in SWORD just yet.<br>
<br>
The reason being that I have discovered that we need to incorporate Ben's hack to work around the fact that modules may not be properly formed OSIS &amp; may contain &lt;l&gt;s outside of &lt;lg&gt;s. This then simply makes things look messy and so I have had to write more code to work around this, but I've done this in Objective-C as I couldn't figure out how to save state between subsequent calls to renderText().<br>


<br>
Note that I now also always retrieve verse 0 for each and every chapter in order to gather any required formatting that is missing from verse 1, but as verse 0 often is simply "&lt;br /&gt;", I check for this and simply discard verse 0 if that's what it is. :)<br>


<br>
As it appears that the ESV is going to be ready soon, perhaps an option is for us to add checking of &lt;l&gt; inside &lt;lg&gt;s as part of our OSIS validation and hold off incorporating any poetry code into SWORD until we know our modules are good enough?<br>


<br>
However, what is the "proper" way of encoding these indented lines in OSIS? The WEB module opens its &lt;l&gt; tags at the end of each verse for the line starting in the next verse. This seems weird to me, and I would have thought that it would make more sense to start the verse with the &lt;l&gt; as that is where the text corresponding to that &lt;l&gt; is located?<br>


<br>
So, yes, for me this is revealing more inconsistencies between modules and how they have been constructed. And as I don't particularly know what is the "correct" way of forming the OSIS, I don't know which is the "correct" way to be coding this.<br>


<br>
<br>
Thanks, ybic<br>
&nbsp; &nbsp; &nbsp; &nbsp; nic... &nbsp;:)<br>
<br>
_______________________________________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
<a 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>
_______________________________________________<br>sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br><a href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>Instructions to unsubscribe/change your settings at above page</blockquote></div><br></div></div>_______________________________________________<br>sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br><a href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>Instructions to unsubscribe/change your settings at above page</blockquote></div><br></div></body></html>