<div dir="ltr">I think this is osis only. The thml (and gbf) filters shouldn&#39;t need to be changed.<br><br clear="all">God Bless,<br>Ben<br>-------------------------------------------------------------------------------------------<br>
The Lord is not slow to fulfill his promise as some count slowness,<br>but is patient toward you, not wishing that any should perish,<br>but that all should reach repentance.<br>2 Peter 3:9 (ESV)<br>
<br><br><div class="gmail_quote">On Mon, Jul 28, 2008 at 8:46 PM, Manfred Bergmann <span dir="ltr">&lt;<a href="mailto:bergmannmd@web.de">bergmannmd@web.de</a>&gt;</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;">
Yes, right, in the end-of-note handler I could still get the cross-<br>
refs per note.<br>
This is for OSIS texts. Needs to be done in all source HTML filters<br>
probably then?<br>
<br>
<br>
Manfred<br>
<br>
<br>
Am 28.07.2008 um 12:19 schrieb Ben Morgan:<br>
<div><div></div><div class="Wj3C7c"><br>
&gt; The cross-references (which are omitted) are contained in a note<br>
&gt; (which isn&#39;t omitted), which will have the type set to cross-<br>
&gt; reference (or something like that)<br>
&gt; The entry attributes has the original osis text, as well as the<br>
&gt; references it found. You can process this in the end-of-note handler.<br>
&gt;<br>
&gt; God Bless,<br>
&gt; Ben<br>
&gt; -------------------------------------------------------------------------------------------<br>
&gt; The Lord is not slow to fulfill his promise as some count slowness,<br>
&gt; but is patient toward you, not wishing that any should perish,<br>
&gt; but that all should reach repentance.<br>
&gt; 2 Peter 3:9 (ESV)<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Jul 28, 2008 at 5:18 PM, Manfred Bergmann<br>
&gt; &lt;<a href="mailto:bergmannmd@web.de">bergmannmd@web.de</a>&gt; wrote:<br>
&gt; Hi Ben.<br>
&gt;<br>
&gt; Ok, one can get the cross-references by getting the entry attributes.<br>
&gt; But if the body is not passed in again to the filter you can&#39;t figure<br>
&gt; anymore to which word the cross-reference is related to by just<br>
&gt; parsing the attributes.<br>
&gt; The only chance to get the relationship is to show the information in<br>
&gt; the tooltip or while clicking on the cross-ref link.<br>
&gt; Please correct me if I&#39;m wrong.<br>
&gt; If this is correct I have to say that this is quite unflexible.<br>
&gt; If someone chooses to not render anything related to cross-references<br>
&gt; but still wants to have the data (to show it somewhere else) there is<br>
&gt; no way to get the word -&gt; cross-ref relationship.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Regards,<br>
&gt; Manfred<br>
&gt;<br>
&gt;<br>
&gt; Am 28.07.2008 um 01:35 schrieb Ben Morgan:<br>
&gt;<br>
&gt; &gt; Yes, there was a change.<br>
&gt; &gt; I had to change BPBible as well :)<br>
&gt; &gt;<br>
&gt; &gt; &gt;From r2157:<br>
&gt; &gt; Modified: trunk/src/modules/filters/<br>
&gt; &gt; osisfootnotes.cpp<br>
&gt; &gt; ===================================================================<br>
&gt; &gt; --- trunk/src/modules/filters/osisfootnotes.cpp 2008-05-13 02:58:16<br>
&gt; &gt; UTC (rev 2156)<br>
&gt; &gt; +++ trunk/src/modules/filters/osisfootnotes.cpp 2008-05-13 23:37:56<br>
&gt; &gt; UTC (rev 2157)<br>
&gt; &gt; @@ -108,7 +108,7 @@<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hide = false;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (option ||<br>
&gt; &gt; (startTag.getAttribute(&quot;type&quot;) &amp;&amp; !<br>
&gt; &gt; strcmp(startTag.getAttribute(&quot;type&quot;), &quot;crossReference&quot;))) { &nbsp; &nbsp;// we<br>
&gt; &gt; want the tag in the text; crossReferences are handled by another<br>
&gt; &gt; filter<br>
&gt; &gt;<br>
&gt; text.append(startTag);<br>
&gt; &gt; -<br>
&gt; text.append(tagText);<br>
&gt; &gt; +//<br>
&gt; &gt; text.append(tagText); &nbsp; // we don&#39;t put the body back in because it<br>
&gt; &gt; is retrievable from EntryAttributes[&quot;Footnotes&quot;][][&quot;body&quot;].<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else &nbsp; &nbsp;continue;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
&gt; &gt;<br>
&gt; &gt; As it says, you can just get the text using getEntryAttributes at<br>
&gt; &gt; the end of the note.<br>
&gt; &gt;<br>
&gt; &gt; The way BPBible installs custom filters is by subclassing the<br>
&gt; &gt; MarkupFilterMgr&#39;s AddRenderFilters, rather than the SWMgr&#39;s<br>
&gt; &gt;<br>
&gt; &gt; It would be nice if you could pass the filters you wanted used in,<br>
&gt; &gt; though. This would be a pretty common use case...<br>
&gt; &gt;<br>
&gt; &gt; God Bless,<br>
&gt; &gt; Ben<br>
&gt; &gt;<br>
&gt; -------------------------------------------------------------------------------------------<br>
&gt; &gt; The Lord is not slow to fulfill his promise as some count slowness,<br>
&gt; &gt; but is patient toward you, not wishing that any should perish,<br>
&gt; &gt; but that all should reach repentance.<br>
&gt; &gt; 2 Peter 3:9 (ESV)<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Sun, Jul 27, 2008 at 9:09 PM, Manfred Bergmann<br>
&gt; &gt; &lt;<a href="mailto:bergmannmd@web.de">bergmannmd@web.de</a>&gt; wrote:<br>
&gt; &gt; Hi Troy.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Am 26.07.2008 um 18:44 schrieb Troy A. Griffitts:<br>
&gt; &gt;<br>
&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; Do you have:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;swordManager.setGlobalOption(&quot;Cross-references&quot;, &quot;On&quot;);<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; anywhere in your code?<br>
&gt; &gt;<br>
&gt; &gt; Yes.<br>
&gt; &gt; I just tested a version of MacSword with Sword library 1.5.10 where<br>
&gt; &gt; the cross ref list (&lt;reference&gt; elements) are placed inside the note<br>
&gt; &gt; element and are passed to the HTML filter.<br>
&gt; &gt; Has there been a change for this from 1.5.10 to 1.5.11?<br>
&gt; &gt;<br>
&gt; &gt; &gt; Yes. &nbsp;You should never have to call AddRenderFilter to a module,<br>
&gt; &gt; &gt; though<br>
&gt; &gt; &gt; we do allow you to add your own special filters by overriding the<br>
&gt; &gt; &gt; virtual SWMgr::AddRenderFilters() method if one of the default<br>
&gt; SWORD<br>
&gt; &gt; &gt; filter sets does not work for you. &nbsp;Not sure how MacSword does it<br>
&gt; &gt; now.<br>
&gt; &gt;<br>
&gt; &gt; Hmm, we are doing exactly that ATM.<br>
&gt; &gt; We didn&#39;t override AddRenderFilters() in SWMgr but set Filter<br>
&gt; subclass<br>
&gt; &gt; instances for every module in a loop via Module::AddRenderFilter().<br>
&gt; &gt; So the prefered way is to do this via SWMgr::AddRenderFilters().<br>
&gt; &gt;<br>
&gt; &gt; &gt; The MarkupFilterMgr is the mechanism to ask SWORD to give you a<br>
&gt; &gt; &gt; specific<br>
&gt; &gt; &gt; output markup from RenderText(). &nbsp;This code figures out which<br>
&gt; filter<br>
&gt; &gt; &gt; set<br>
&gt; &gt; &gt; to apply to each module depending on the module SourceType (OSIS,<br>
&gt; &gt; GBF,<br>
&gt; &gt; &gt; ThML, etc...) and will apply the correct filters to meet your<br>
&gt; &gt; &gt; requested<br>
&gt; &gt; &gt; output type. &nbsp;But if you can&#39;t use any of the default filter sets,<br>
&gt; &gt; &gt; then<br>
&gt; &gt; &gt; you&#39;ll have to override SWMgr::AddRenderFilters() and apply your<br>
&gt; &gt; &gt; custom<br>
&gt; &gt; &gt; filters.<br>
&gt; &gt;<br>
&gt; &gt; We did that and used RenderFilters from BibleTime project from 2001.<br>
&gt; &gt; But I adapted some changes of the current Sword render filters so<br>
&gt; the<br>
&gt; &gt; new attributes are checked for additionally to the depricated ones.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Regards,<br>
&gt; &gt; Manfred<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
&gt; &gt; <a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
&gt; &gt; Instructions to unsubscribe/change your settings at above page<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
&gt; &gt; <a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
&gt; &gt; Instructions to unsubscribe/change your settings at above page<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
&gt; <a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
&gt; Instructions to unsubscribe/change your settings at above page<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
&gt; <a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
&gt; Instructions to unsubscribe/change your settings at above page<br>
<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>
</div></div></blockquote></div><br></div>