Rendering the text of the footnotes will clear the entry attributes. You probably need to defer rendering them... <br>In general, I don't think you shouldn't call the current module's RenderText in the render filters.<br>
<br clear="all">God Bless,<br>Ben<br>-------------------------------------------------------------------------------------------<br>Multitudes, multitudes,<br> in the valley of decision!<br>For the day of the LORD is near<br>
in the valley of decision.<br><br>Giôên 3:14 (ESV)<br><br>
<br><br><div class="gmail_quote">On Mon, May 11, 2009 at 8:18 AM, Eeli Kaikkonen <span dir="ltr"><<a href="mailto:eekaikko@mail.student.oulu.fi">eekaikko@mail.student.oulu.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Martin Gruner wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Eeli,<br>
<br>
attached you can find the original patch by Troy with the debug method that he used. Good luck! :-P<br>
<br>
</blockquote>
<br></div>
OK, I added the debug function to bt_osishtml.cpp. It's called like this:<div class="im"><br>
<br>
#ifdef SWORD_SIMPLERENDER<br>
sword::SWBuf footnoteNumber = tag.getAttribute("swordFootnote");<br></div>
qDebug() << "swordFootnote:" << footnoteNumber;<br>
dumpEntryAttributes(myModule);<div class="im"><br>
sword::SWBuf footnoteBody = myModule->getEntryAttributes()["Footnote"][footnoteNumber]["body"];<br></div><div class="im">
buf += myModule->RenderText(footnoteBody);<br>
#endif<br>
<br></div>
In the first time in a verse, when the footnote number is 1, it gives this:<br>
<br>
(BibleTime 2.0.beta2) Debug: swordFootnote: 1 <br>
(BibleTime 2.0.beta2) Debug: ENTRY ATTRIBUTES FOR KEY: Psalms 100:2 <br>
(BibleTime 2.0.beta2) Debug: [ Footnote ] <br>
(BibleTime 2.0.beta2) Debug: [ 1 ] <br>
(BibleTime 2.0.beta2) Debug: body = [<reference osisRef="Ps.2.11">Ps. 2:11</reference>] <br>
(BibleTime 2.0.beta2) Debug: n = q <br>
(BibleTime 2.0.beta2) Debug: osisID = Ps.100.2!crossReference.q<br>
(BibleTime 2.0.beta2) Debug: osisRef = Ps.100.2 <br>
(BibleTime 2.0.beta2) Debug: refList = Ps.2.11 <br>
(BibleTime 2.0.beta2) Debug: type = crossReference <br>
(BibleTime 2.0.beta2) Debug: [ 2 ] <br>
(BibleTime 2.0.beta2) Debug: body = [<reference osisRef="Ps.95.2">Ps. 95:2</reference>] <br>
(BibleTime 2.0.beta2) Debug: n = r <br>
(BibleTime 2.0.beta2) Debug: osisID = Ps.100.2!crossReference.r<br>
(BibleTime 2.0.beta2) Debug: osisRef = Ps.100.2 <br>
(BibleTime 2.0.beta2) Debug: refList = Ps.95.2 <br>
(BibleTime 2.0.beta2) Debug: type = crossReference <br>
(BibleTime 2.0.beta2) Debug: ENTRY ATTRIBUTES end<br>
<br>
<br>
But all the rest of the footnotes in the same verse give this:<br>
<br>
BibleTime 2.0.beta2) Debug: swordFootnote: 2 [or 3 or...]<br>
(BibleTime 2.0.beta2) Debug: ENTRY ATTRIBUTES FOR KEY: Psalms 100:2 <br>
(BibleTime 2.0.beta2) Debug: ENTRY ATTRIBUTES end<br>
<br>
So, somewhere between these calls the attributes of the key have disappeared. I have made sure that the objects are the same each time.<div><div></div><div class="h5"><br>
<br>
<br>
--Eeli Kaikkonen<br>
<br>
_______________________________________________<br>
bt-devel mailing list<br>
<a href="mailto:bt-devel@crosswire.org" target="_blank">bt-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/bt-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/bt-devel</a><br>
</div></div></blockquote></div><br>