[sword-svn] r2677 - in trunk: include src/modules/filters
charcoal at crosswire.org
charcoal at crosswire.org
Sun Feb 12 18:48:36 MST 2012
Author: charcoal
Date: 2012-02-12 18:48:36 -0700 (Sun, 12 Feb 2012)
New Revision: 2677
Modified:
trunk/include/gbfhtmlhref.h
trunk/include/gbfxhtml.h
trunk/include/osishtmlhref.h
trunk/include/osisxhtml.h
trunk/include/teihtmlhref.h
trunk/include/thmlhtmlhref.h
trunk/include/thmlxhtml.h
trunk/src/modules/filters/gbfhtmlhref.cpp
trunk/src/modules/filters/gbfxhtml.cpp
trunk/src/modules/filters/osishtmlhref.cpp
trunk/src/modules/filters/osisxhtml.cpp
trunk/src/modules/filters/teihtmlhref.cpp
trunk/src/modules/filters/thmlhtmlhref.cpp
trunk/src/modules/filters/thmlxhtml.cpp
Log:
add setRenderNoteNumbers to get n=X content attached to *n/*x
Modified: trunk/include/gbfhtmlhref.h
===================================================================
--- trunk/include/gbfhtmlhref.h 2012-01-30 18:56:15 UTC (rev 2676)
+++ trunk/include/gbfhtmlhref.h 2012-02-13 01:48:36 UTC (rev 2677)
@@ -28,6 +28,7 @@
/** this filter converts GBF text to HTML text with hrefs
*/
class SWDLLEXPORT GBFHTMLHREF : public SWBasicFilter {
+ bool renderNoteNumbers;
protected:
class MyUserData : public BasicFilterUserData {
public:
@@ -41,6 +42,7 @@
virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
public:
GBFHTMLHREF();
+ void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; }
};
SWORD_NAMESPACE_END
Modified: trunk/include/gbfxhtml.h
===================================================================
--- trunk/include/gbfxhtml.h 2012-01-30 18:56:15 UTC (rev 2676)
+++ trunk/include/gbfxhtml.h 2012-02-13 01:48:36 UTC (rev 2677)
@@ -28,6 +28,7 @@
/** this filter converts GBF text to classed XHTML text
*/
class SWDLLEXPORT GBFXHTML : public SWBasicFilter {
+ bool renderNoteNumbers;
protected:
class MyUserData : public BasicFilterUserData {
public:
@@ -42,6 +43,7 @@
public:
GBFXHTML();
virtual const char *getHeader() const;
+ void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; }
};
SWORD_NAMESPACE_END
Modified: trunk/include/osishtmlhref.h
===================================================================
--- trunk/include/osishtmlhref.h 2012-01-30 18:56:15 UTC (rev 2676)
+++ trunk/include/osishtmlhref.h 2012-02-13 01:48:36 UTC (rev 2677)
@@ -30,6 +30,7 @@
class SWDLLEXPORT OSISHTMLHREF : public SWBasicFilter {
private:
bool morphFirst;
+ bool renderNoteNumbers;
protected:
// used by derived classes so we have it in the header
class TagStacks;
@@ -58,6 +59,7 @@
public:
OSISHTMLHREF();
void setMorphFirst(bool val = true) { morphFirst = val; }
+ void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; }
};
SWORD_NAMESPACE_END
Modified: trunk/include/osisxhtml.h
===================================================================
--- trunk/include/osisxhtml.h 2012-01-30 18:56:15 UTC (rev 2676)
+++ trunk/include/osisxhtml.h 2012-02-13 01:48:36 UTC (rev 2677)
@@ -30,6 +30,7 @@
class SWDLLEXPORT OSISXHTML : public SWBasicFilter {
private:
bool morphFirst;
+ bool renderNoteNumbers;
protected:
// used by derived classes so we have it in the header
class TagStacks;
@@ -58,6 +59,7 @@
public:
OSISXHTML();
void setMorphFirst(bool val = true) { morphFirst = val; }
+ void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; }
virtual const char *getHeader() const;
};
Modified: trunk/include/teihtmlhref.h
===================================================================
--- trunk/include/teihtmlhref.h 2012-01-30 18:56:15 UTC (rev 2676)
+++ trunk/include/teihtmlhref.h 2012-02-13 01:48:36 UTC (rev 2677)
@@ -29,6 +29,7 @@
*/
class SWDLLEXPORT TEIHTMLHREF : public SWBasicFilter {
private:
+ bool renderNoteNumbers;
protected:
class MyUserData : public BasicFilterUserData {
@@ -45,6 +46,7 @@
virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
public:
TEIHTMLHREF();
+ void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; }
};
SWORD_NAMESPACE_END
Modified: trunk/include/thmlhtmlhref.h
===================================================================
--- trunk/include/thmlhtmlhref.h 2012-01-30 18:56:15 UTC (rev 2676)
+++ trunk/include/thmlhtmlhref.h 2012-02-13 01:48:36 UTC (rev 2677)
@@ -30,6 +30,7 @@
*/
class SWDLLEXPORT ThMLHTMLHREF : public SWBasicFilter {
SWBuf imgPrefix;
+ bool renderNoteNumbers;
protected:
class MyUserData : public BasicFilterUserData {
public:
@@ -48,6 +49,7 @@
ThMLHTMLHREF();
virtual const char *getImagePrefix() { return imgPrefix.c_str(); }
virtual void setImagePrefix(const char *newImgPrefix) { imgPrefix = newImgPrefix; }
+ void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; }
};
SWORD_NAMESPACE_END
#endif /* _THMLHTMLHREF_H */
Modified: trunk/include/thmlxhtml.h
===================================================================
--- trunk/include/thmlxhtml.h 2012-01-30 18:56:15 UTC (rev 2676)
+++ trunk/include/thmlxhtml.h 2012-02-13 01:48:36 UTC (rev 2677)
@@ -30,6 +30,7 @@
*/
class SWDLLEXPORT ThMLXHTML : public SWBasicFilter {
SWBuf imgPrefix;
+ bool renderNoteNumbers;
protected:
class MyUserData : public BasicFilterUserData {
public:
@@ -49,6 +50,7 @@
virtual const char *getImagePrefix() { return imgPrefix.c_str(); }
virtual void setImagePrefix(const char *newImgPrefix) { imgPrefix = newImgPrefix; }
virtual const char *getHeader() const;
+ void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; }
};
SWORD_NAMESPACE_END
Modified: trunk/src/modules/filters/gbfhtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/gbfhtmlhref.cpp 2012-01-30 18:56:15 UTC (rev 2676)
+++ trunk/src/modules/filters/gbfhtmlhref.cpp 2012-02-13 01:48:36 UTC (rev 2677)
@@ -73,7 +73,8 @@
addTokenSubstitute("JR", "<div align=\"right\">"); // right align begin
addTokenSubstitute("JC", "<div align=\"center\">"); // center align begin
addTokenSubstitute("JL", "</div>"); // align end
-
+
+ renderNoteNumbers = false;
}
@@ -231,6 +232,7 @@
else if (!strcmp(tag.getName(), "RF")) {
SWBuf type = tag.getAttribute("type");
SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
+ SWBuf noteName = tag.getAttribute("n");
VerseKey *vkey = NULL;
// see if we have a VerseKey * or descendant
SWTRY {
@@ -240,10 +242,11 @@
if (vkey) {
// leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt.
//char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
- buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=n&value=%s&module=%s&passage=%s\"><small><sup class=\"n\">*n</sup></small></a> ",
+ buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=n&value=%s&module=%s&passage=%s\"><small><sup class=\"n\">*n%s</sup></small></a> ",
URL::encode(footnoteNumber.c_str()).c_str(),
URL::encode(u->version.c_str()).c_str(),
- URL::encode(vkey->getText()).c_str());
+ URL::encode(vkey->getText()).c_str(),
+ (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str(): ""));
}
u->suspendTextPassThru = true;
}
Modified: trunk/src/modules/filters/gbfxhtml.cpp
===================================================================
--- trunk/src/modules/filters/gbfxhtml.cpp 2012-01-30 18:56:15 UTC (rev 2676)
+++ trunk/src/modules/filters/gbfxhtml.cpp 2012-02-13 01:48:36 UTC (rev 2677)
@@ -80,6 +80,7 @@
addTokenSubstitute("JC", "<div align=\"center\">"); // center align begin
addTokenSubstitute("JL", "</div>"); // align end
+ renderNoteNumbers = false;
}
@@ -168,6 +169,7 @@
else if (!strcmp(tag.getName(), "RF")) {
SWBuf type = tag.getAttribute("type");
SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
+ SWBuf noteName = tag.getAttribute("n");
VerseKey *vkey = NULL;
// see if we have a VerseKey * or descendant
SWTRY {
@@ -177,10 +179,11 @@
if (vkey) {
// leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt.
//char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
- buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=n&value=%s&module=%s&passage=%s\"><small><sup class=\"n\">*n</sup></small></a> ",
+ buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=n&value=%s&module=%s&passage=%s\"><small><sup class=\"n\">*n%s</sup></small></a> ",
URL::encode(footnoteNumber.c_str()).c_str(),
URL::encode(u->version.c_str()).c_str(),
- URL::encode(vkey->getText()).c_str());
+ URL::encode(vkey->getText()).c_str(),
+ (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str(): ""));
}
u->suspendTextPassThru = true;
}
Modified: trunk/src/modules/filters/osishtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/osishtmlhref.cpp 2012-01-30 18:56:15 UTC (rev 2676)
+++ trunk/src/modules/filters/osishtmlhref.cpp 2012-02-13 01:48:36 UTC (rev 2677)
@@ -155,6 +155,7 @@
// addTokenSubstitute("/lg", "<br />");
morphFirst = false;
+ renderNoteNumbers = false;
}
@@ -240,6 +241,7 @@
if (!strongsMarkup) { // leave strong's markup notes out, in the future we'll probably have different option filters to turn different note types on or off
SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
+ SWBuf noteName = tag.getAttribute("n");
VerseKey *vkey = NULL;
char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
@@ -253,22 +255,24 @@
SWCATCH ( ... ) { }
if (vkey) {
//printf("URL = %s\n",URL::encode(vkey->getText()).c_str());
- buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup class=\"%c\">*%c</sup></small></a>",
+ buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup class=\"%c\">*%c%s</sup></small></a>",
ch,
URL::encode(footnoteNumber.c_str()).c_str(),
URL::encode(u->version.c_str()).c_str(),
URL::encode(vkey->getText()).c_str(),
ch,
- ch);
+ ch,
+ (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str() : ""));
}
else {
- buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup class=\"%c\">*%c</sup></small></a>",
+ buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup class=\"%c\">*%c%s</sup></small></a>",
ch,
URL::encode(footnoteNumber.c_str()).c_str(),
URL::encode(u->version.c_str()).c_str(),
URL::encode(u->key->getText()).c_str(),
ch,
- ch);
+ ch,
+ (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str() : ""));
}
}
}
Modified: trunk/src/modules/filters/osisxhtml.cpp
===================================================================
--- trunk/src/modules/filters/osisxhtml.cpp 2012-01-30 18:56:15 UTC (rev 2676)
+++ trunk/src/modules/filters/osisxhtml.cpp 2012-02-13 01:48:36 UTC (rev 2677)
@@ -168,6 +168,7 @@
// addTokenSubstitute("/lg", "<br />");
morphFirst = false;
+ renderNoteNumbers = false;
}
bool OSISXHTML::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) {
@@ -252,6 +253,7 @@
if (!strongsMarkup) { // leave strong's markup notes out, in the future we'll probably have different option filters to turn different note types on or off
SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
+ SWBuf noteName = tag.getAttribute("n");
VerseKey *vkey = NULL;
char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
@@ -265,22 +267,24 @@
SWCATCH ( ... ) { }
if (vkey) {
//printf("URL = %s\n",URL::encode(vkey->getText()).c_str());
- buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup class=\"%c\">*%c</sup></small></a>",
+ buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup class=\"%c\">*%c%s</sup></small></a>",
ch,
URL::encode(footnoteNumber.c_str()).c_str(),
URL::encode(u->version.c_str()).c_str(),
URL::encode(vkey->getText()).c_str(),
ch,
- ch);
+ ch,
+ (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str() : ""));
}
else {
- buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup class=\"%c\">*%c</sup></small></a>",
+ buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup class=\"%c\">*%c%s</sup></small></a>",
ch,
URL::encode(footnoteNumber.c_str()).c_str(),
URL::encode(u->version.c_str()).c_str(),
URL::encode(u->key->getText()).c_str(),
ch,
- ch);
+ ch,
+ (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str() : ""));
}
}
}
Modified: trunk/src/modules/filters/teihtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/teihtmlhref.cpp 2012-01-30 18:56:15 UTC (rev 2676)
+++ trunk/src/modules/filters/teihtmlhref.cpp 2012-02-13 01:48:36 UTC (rev 2677)
@@ -57,6 +57,8 @@
addAllowedEscapeString("gt");
setTokenCaseSensitive(true);
+
+ renderNoteNumbers = false;
}
bool TEIHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) {
@@ -259,11 +261,13 @@
}
if (tag.isEndTag()) {
SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
+ SWBuf noteName = tag.getAttribute("n");
- buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=n&value=%s&module=%s&passage=%s\"><small><sup class=\"n\">*n</sup></small></a>",
+ buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=n&value=%s&module=%s&passage=%s\"><small><sup class=\"n\">*n%s</sup></small></a>",
URL::encode(footnoteNumber.c_str()).c_str(),
URL::encode(u->version.c_str()).c_str(),
- URL::encode(u->key->getText()).c_str());
+ URL::encode(u->key->getText()).c_str(),
+ (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str() : ""));
u->suspendTextPassThru = false;
}
Modified: trunk/src/modules/filters/thmlhtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/thmlhtmlhref.cpp 2012-01-30 18:56:15 UTC (rev 2676)
+++ trunk/src/modules/filters/thmlhtmlhref.cpp 2012-02-13 01:48:36 UTC (rev 2677)
@@ -160,6 +160,8 @@
setTokenCaseSensitive(true);
// addTokenSubstitute("scripture", "<i> ");
addTokenSubstitute("/scripture", "</i> ");
+
+ renderNoteNumbers = false;
}
@@ -206,6 +208,7 @@
if (!tag.isEmpty()) {
SWBuf type = tag.getAttribute("type");
SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
+ SWBuf noteName = tag.getAttribute("n");
VerseKey *vkey = NULL;
// see if we have a VerseKey * or descendant
SWTRY {
@@ -215,23 +218,25 @@
if (vkey) {
// leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt.
char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
- buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup class=\"%c\">*%c</sup></small></a>",
+ buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup class=\"%c\">*%c%s</sup></small></a>",
ch,
URL::encode(footnoteNumber.c_str()).c_str(),
URL::encode(u->version.c_str()).c_str(),
URL::encode(vkey->getText()).c_str(),
ch,
- ch);
+ ch,
+ (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str() : ""));
}
else {
char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
- buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup class=\"%c\">*%c</sup></small></a>",
+ buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup class=\"%c\">*%c%s</sup></small></a>",
ch,
URL::encode(footnoteNumber.c_str()).c_str(),
URL::encode(u->version.c_str()).c_str(),
URL::encode(u->key->getText()).c_str(),
ch,
- ch);
+ ch,
+ (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str() : ""));
}
u->suspendTextPassThru = true;
}
@@ -265,6 +270,7 @@
}
else {
SWBuf footnoteNumber = u->startTag.getAttribute("swordFootnote");
+ SWBuf noteName = tag.getAttribute("n");
VerseKey *vkey = NULL;
// see if we have a VerseKey * or descendant
SWTRY {
@@ -274,11 +280,11 @@
if (vkey) {
// leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt.
//buf.appendFormatted("<a href=\"noteID=%s.x.%s\"><small><sup>*x</sup></small></a> ", vkey->getText(), footnoteNumber.c_str());
- buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=x&value=%s&module=%s&passage=%s\"><small><sup class=\"x\">*x</sup></small></a>",
+ buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=x&value=%s&module=%s&passage=%s\"><small><sup class=\"x\">*x%s</sup></small></a>",
URL::encode(footnoteNumber.c_str()).c_str(),
URL::encode(u->version.c_str()).c_str(),
- URL::encode(vkey->getText()).c_str());
-
+ URL::encode(vkey->getText()).c_str(),
+ (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str() : ""));
}
}
Modified: trunk/src/modules/filters/thmlxhtml.cpp
===================================================================
--- trunk/src/modules/filters/thmlxhtml.cpp 2012-01-30 18:56:15 UTC (rev 2676)
+++ trunk/src/modules/filters/thmlxhtml.cpp 2012-02-13 01:48:36 UTC (rev 2677)
@@ -162,6 +162,8 @@
setTokenCaseSensitive(true);
// addTokenSubstitute("scripture", "<i> ");
addTokenSubstitute("/scripture", "</i> ");
+
+ renderNoteNumbers = false;
}
@@ -208,6 +210,7 @@
if (!tag.isEmpty()) {
SWBuf type = tag.getAttribute("type");
SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
+ SWBuf noteName = tag.getAttribute("n");
VerseKey *vkey = NULL;
// see if we have a VerseKey * or descendant
SWTRY {
@@ -217,23 +220,25 @@
if (vkey) {
// leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt.
char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
- buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup class=\"%c\">*%c</sup></small></a>",
+ buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup class=\"%c\">*%c%s</sup></small></a>",
ch,
URL::encode(footnoteNumber.c_str()).c_str(),
URL::encode(u->version.c_str()).c_str(),
URL::encode(vkey->getText()).c_str(),
ch,
- ch);
+ ch,
+ (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str() : ""));
}
else {
char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
- buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup class=\"%c\">*%c</sup></small></a>",
+ buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup class=\"%c\">*%c%s</sup></small></a>",
ch,
URL::encode(footnoteNumber.c_str()).c_str(),
URL::encode(u->version.c_str()).c_str(),
URL::encode(u->key->getText()).c_str(),
ch,
- ch);
+ ch,
+ (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str() : ""));
}
u->suspendTextPassThru = true;
}
@@ -267,6 +272,7 @@
}
else {
SWBuf footnoteNumber = u->startTag.getAttribute("swordFootnote");
+ SWBuf noteName = tag.getAttribute("n");
VerseKey *vkey = NULL;
// see if we have a VerseKey * or descendant
SWTRY {
@@ -276,11 +282,11 @@
if (vkey) {
// leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt.
//buf.appendFormatted("<a href=\"noteID=%s.x.%s\"><small><sup>*x</sup></small></a> ", vkey->getText(), footnoteNumber.c_str());
- buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=x&value=%s&module=%s&passage=%s\"><small><sup class=\"x\">*x</sup></small></a>",
+ buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=x&value=%s&module=%s&passage=%s\"><small><sup class=\"x\">*x%s</sup></small></a>",
URL::encode(footnoteNumber.c_str()).c_str(),
URL::encode(u->version.c_str()).c_str(),
- URL::encode(vkey->getText()).c_str());
-
+ URL::encode(vkey->getText()).c_str(),
+ (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str() : ""));
}
}
More information about the sword-cvs
mailing list