[sword-cvs] sword/src/modules/filters osisfootnotes.cpp,1.11,1.12 osisrtf.cpp,1.12,1.13
sword@www.crosswire.org
sword@www.crosswire.org
Tue, 15 Jul 2003 19:22:34 -0700
Update of /usr/local/cvsroot/sword/src/modules/filters
In directory www:/tmp/cvs-serv24839/src/modules/filters
Modified Files:
osisfootnotes.cpp osisrtf.cpp
Log Message:
no message
Index: osisfootnotes.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osisfootnotes.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- osisfootnotes.cpp 7 Jul 2003 01:16:15 -0000 1.11
+++ osisfootnotes.cpp 16 Jul 2003 02:22:31 -0000 1.12
@@ -67,12 +67,14 @@
XMLTag tag(token);
if (!strcmp(tag.getName(), "note")) {
- if (!tag.isEndTag() && (!tag.isEmpty())) {
- refs = "";
- startTag = tag;
- hide = true;
- tagText = "";
- continue;
+ if (!tag.isEndTag()) {
+ if ((!tag.isEmpty()) || (SWBuf("strongsMarkup") == tag.getAttribute("type"))) {
+ refs = "";
+ startTag = tag;
+ hide = true;
+ tagText = "";
+ continue;
+ }
}
if (hide && tag.isEndTag()) {
if (module->isProcessEntryAttributes()) {
Index: osisrtf.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osisrtf.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- osisrtf.cpp 5 Jul 2003 01:16:46 -0000 1.12
+++ osisrtf.cpp 16 Jul 2003 02:22:31 -0000 1.13
@@ -127,22 +127,24 @@
// <note> tag
else if (!strcmp(tag.getName(), "note")) {
- if (!tag.isEmpty() && !tag.isEndTag()) {
- SWBuf type = tag.getAttribute("type");
+ if (!tag.isEndTag()) {
+ if ((!tag.isEmpty()) || (SWBuf("strongsMarkup") == tag.getAttribute("type"))) { // handle bug in KJV2003 module where some note open tags were <note ... />
+ SWBuf type = tag.getAttribute("type");
- if (type != "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");
- VerseKey *vkey;
- // see if we have a VerseKey * or descendant
- try {
- vkey = SWDYNAMIC_CAST(VerseKey, this->key);
- }
- catch ( ... ) { }
- if (vkey) {
- buf.appendFormatted("{\\super <a href=\"\">*%c%i.%s</a>} ", ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n'), vkey->Verse(), footnoteNumber.c_str());
+ if (type != "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");
+ VerseKey *vkey;
+ // see if we have a VerseKey * or descendant
+ try {
+ vkey = SWDYNAMIC_CAST(VerseKey, this->key);
+ }
+ catch ( ... ) { }
+ if (vkey) {
+ buf.appendFormatted("{\\super <a href=\"\">*%c%i.%s</a>} ", ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n'), vkey->Verse(), footnoteNumber.c_str());
+ }
}
+ userData["suspendTextPassThru"] = "true";
}
- userData["suspendTextPassThru"] = "true";
}
if (tag.isEndTag()) {
userData["suspendTextPassThru"] = "false";
@@ -275,3 +277,4 @@
SWORD_NAMESPACE_END
+