[sword-devel] filters
Terry Biggs
sword-devel@crosswire.org
Fri, 19 Dec 2003 21:35:11 -0500
On Fri, 2003-12-19 at 20:59, Troy A. Griffitts wrote:
> What module are you using to test the thmlhtmlhref code. It looks ok,
> but maybe the footnotes in thml aren't in the 'lastTextNode' in the
> markup. I'm not sure, but it would help if I knew what module you're
> using to test so I could look at the markup.
>
the ISV
> Just to be sure: you DO have the gbfhtmlhref working correctly?
It works with the KJVlight but not with the ASV. So maybe it can't be
done.
>
> Excited about the new gnomesword2 stuff!
Yeah me too :)
>
> -Troy.
>
>
>
> Terry Biggs wrote:
> > Troy help!
> >
> > I'm trying to make footnotes in the gbfhtmlhref and thmlhtmlhref filters
> > look like the osis filter.
> >
> > I put this code in the gbfhtmlhref filter and it worked as expected.
> >
> >
> > else if (!strncmp(token, "Rf", 2)) {
> > buf += "<a href=\"note=";
> > buf += u->lastTextNode.c_str();
> > buf += "\">";
> > buf += "<small><sup>*n</sup></small></a>";
> > // let's let text resume to output again
> > u->suspendTextPassThru = false;
> > }
> > else if (!strncmp(token, "RF", 2)) {
> > if (u->hasFootnotePreTag) {
> > u->hasFootnotePreTag = false;
> > buf += "</i> ";
> > }
> > u->suspendTextPassThru = true;
> > }
> >
> > I put this in the thmlhtmlhref filter and mostly u->lastTextNode is
> > empty. the footnotes are removed from the text but are not in
> > u->lastTextNode.
> >
> >
> > else if (tag.getName() && !strcmp(tag.getName(), "note")) {
> > if (tag.isEndTag()) {
> > buf += "<a href=\"note=";
> > buf += u->lastTextNode.c_str();
> > buf += "\">";
> > buf += "<small><sup>*n</sup></small></a>";
> > // let's let text resume to output again
> > u->suspendTextPassThru = false;
> > }
> > else {
> > // let's stop text from going to output
> > u->suspendTextPassThru = true;
> > }
> > }
> >
> > thanks
> > Terry
>
> _______________________________________________
> sword-devel mailing list
> sword-devel@crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
--