[sword-devel] HTML filter cross references link
Troy A. Griffitts
scribe at crosswire.org
Sat Jul 26 09:44:15 MST 2008
Do you have:
anywhere in your code?
A few comments:
> Alright, understood.
> getRawEntry() always delivers the raw entry.
> And with getEntryAttributes() there is always access to the entry
> attributes and can be parsed.
> The raw entry and the attributes I guess depends on the raw material
> (OSIS, GBF, ThML, ...).
As a frontend developer, you should never need access to getRawEntry().
>> Changing a line near the top of lookup.cpp swapping the filter use
>> the HTMLREF set:
>> // SWMgr manager(new MarkupFilterMgr(FMT_WEBIF));
> What does this filter actually do?
> I have seen in the sources that it does for some tags forward to
> HTMLHREFS filter.
The WEBIF filter-set is used by SWORDWeb. We are trying to unify the
HTML filter sets so that everyone desiring HTML output is happy with the
same filter-set. It will probably be HTMLHREF. We've made some good
progress. Should be there soon now that development is picking up
again. I would like to know what MacSword changes from HTMLHREF so that
we can accommodate you, as well.
>> SWMgr manager(new MarkupFilterMgr(FMT_HTMLHREF));
> Is this initialization of SWMgr with this MarkupFilterMgr the same as
> if to all modules AddRenderFilter() would be called?
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.
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
> One thing I have in mind for MacSword2 is that actually all options
> are turned on by default.
> I would like to get all possible meta information for the current
> reference(s) that the user entered or that are displayed.
I know this isn't exactly what you want, but:
will return all options available in the module set the user has
installed. I realize it is not limited to the current view-- only
limited to the available modules install-- but it is a limited subset
and not the entire set. Maybe we could add an 'on/off' concept in
SWModule, and would allow you to turn modules on and off based on what
the user is currently using and then we could make getGlobalOptions()
return a narrower set of options for only the SWModule objects which are
turned 'on'. Dunno. Let me know how we can help you.
More information about the sword-devel