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