[sword-devel] HTML filter cross references link

Manfred Bergmann bergmannmd at web.de
Sun Jul 27 04:09:11 MST 2008

Hi Troy.

Am 26.07.2008 um 18:44 schrieb Troy A. Griffitts:

> 	Do you have:
>      swordManager.setGlobalOption("Cross-references", "On");
> anywhere in your code?

I just tested a version of MacSword with Sword library 1.5.10 where  
the cross ref list (<reference> elements) are placed inside the note  
element and are passed to the HTML filter.
Has there been a change for this from 1.5.10 to 1.5.11?

> Yes.  You should never have to call AddRenderFilter to a module,  
> though
> we do allow you to add your own special filters by overriding the
> virtual SWMgr::AddRenderFilters() method if one of the default SWORD
> filter sets does not work for you.  Not sure how MacSword does it now.

Hmm, we are doing exactly that ATM.
We didn't override AddRenderFilters() in SWMgr but set Filter subclass  
instances for every module in a loop via Module::AddRenderFilter().
So the prefered way is to do this via SWMgr::AddRenderFilters().

> The MarkupFilterMgr is the mechanism to ask SWORD to give you a  
> specific
> output markup from RenderText().  This code figures out which filter  
> set
> to apply to each module depending on the module SourceType (OSIS, GBF,
> ThML, etc...) and will apply the correct filters to meet your  
> requested
> output type.  But if you can't use any of the default filter sets,  
> then
> you'll have to override SWMgr::AddRenderFilters() and apply your  
> custom
> filters.

We did that and used RenderFilters from BibleTime project from 2001.
But I adapted some changes of the current Sword render filters so the  
new attributes are checked for additionally to the depricated ones.


More information about the sword-devel mailing list