[sword-devel] HTML filter cross references link

Manfred Bergmann bergmannmd at web.de
Fri Jul 25 15:42:42 MST 2008



Am 25.07.2008 um 13:57 schrieb Troy A. Griffitts:

> 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.

>      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?

> and running:
>
> ./lookup ESV jn2.2
>
> Produces this:
>
> [scribe at laptop cmdline]$ ./lookup ESV jn2.2
> ==Raw=Entry===============
> John 2:2:
> Jesus also was invited to the wedding with <note type="crossReference"
> osisID="John.2.2.xref_j" n="j"><reference
> osisRef="John.1.40-John.1.49">ch. 1:40-49</reference></note>his  
> disciples.

So inside the <node> tag there is a <reference> tag which has the  
cross-references.

>
> ==Render=Entry============
> Jesus also was invited to the wedding with <a
> href="passagestudy.jsp? 
> action=showNote&type=x&value=1&module=ESV&passage=John 
> +2%3A2"><small><sup>*x</sup></small></a>his
> disciples.
> ==========================
> Entry Attributes:
>
> [ Footnote ]
> 	[ 1 ]
> 		body = <reference osisRef="John.1.40-John.1.49">ch. 1:40-49</ 
> reference>
> 		n = j
> 		osisID = John.2.2.xref_j
> 		refList = John.1.40-John.1.49
> 		type = crossReference

MacSword is not showing cross-references and footnotes as should.  
Actually it doesn't show them at all.
We use a OSIS HTML HREF render filter subclass which checks for note,  
reference and some other tags.
Interesstingly the note tag is called for ESV but reference tag is  
not. Need to further investigate what's happening there.

> Hope this helps (and works).

Yep, thanks. I'm getting used to Sword API more and more. :)

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.
Some information should be shown in the bible text display like red  
words of Jesus. But the bible text display should be quite simple in  
general and the meta information should be made available for lookup  
in a floating window that is always on top (transparent if not active)  
and the user can switch between all available meta information  
categories there (x-refs, footnotes, ...; not sure yet if this would  
make sense to strong's and morph).
That means I would like to collect all meta information for verse  
references, store them in an appropriate data structure and display  
them in this floating window while the data is synched for verses when  
the user scrolls in the bible text view.

What would be the prefered place to collect this data. Should it be  
done in a subclass of a render filter. All information would be  
available there, right?


Regards,
Manfred


>
>
>       -Troy.
>
>
>
>
> Manfred Bergmann wrote:
>> Hi.
>>
>> I trying to figure out how to get or show cross-references.
>> If I use ESV and apply the OSISHTMLHREF filter a link is displayed
>> next to the word that has a cross reference attached.
>> But the link data doesn't give the actual cross-reference, there is a
>> passage attribute which is the current verse.
>>
>> I think I need some help.
>>
>>
>> Regards,
>> Manfred
>>
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page




More information about the sword-devel mailing list