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.

Just to be sure: you DO have the gbfhtmlhref working correctly?

Excited about the new gnomesword2 stuff!

-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 [EMAIL PROTECTED] http://www.crosswire.org/mailman/listinfo/sword-devel

Reply via email to