[sword-cvs] sword/src/modules/filters osishtmlhref.cpp,1.3,1.4
sword@www.crosswire.org
sword@www.crosswire.org
Wed, 25 Jun 2003 08:47:55 -0700
Update of /usr/local/cvsroot/sword/src/modules/filters
In directory www:/tmp/cvs-serv17946
Modified Files:
osishtmlhref.cpp
Log Message:
added hrefs for strongs and morphs
Index: osishtmlhref.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osishtmlhref.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** osishtmlhref.cpp 25 Jun 2003 03:45:46 -0000 1.3
--- osishtmlhref.cpp 25 Jun 2003 15:47:53 -0000 1.4
***************
*** 35,39 ****
if (!substituteToken(buf, token)) {
XMLTag tag(token);
! printf("token = %s\ntag->name = %s\n",token,tag.getName());
//w
if (!strncmp(token, "w", 1)) {
--- 35,39 ----
if (!substituteToken(buf, token)) {
XMLTag tag(token);
! //printf("token = %s\n",token);
//w
if (!strncmp(token, "w", 1)) {
***************
*** 47,51 ****
pos2 = userData["w"].find("\"", pos1) - 1;
tagData = userData["w"].substr(pos1, pos2-pos1);
! buf.appendFormatted(" <%s>", tagData.c_str() );
}
pos1 = userData["w"].find("gloss=\"", 0);
--- 47,51 ----
pos2 = userData["w"].find("\"", pos1) - 1;
tagData = userData["w"].substr(pos1, pos2-pos1);
! buf.appendFormatted(" %s", tagData.c_str() );
}
pos1 = userData["w"].find("gloss=\"", 0);
***************
*** 54,72 ****
pos2 = userData["w"].find("\"", pos1) - 1;
tagData = userData["w"].substr(pos1, pos2-pos1);
! buf.appendFormatted(" <%s>", tagData.c_str() );
}
pos1 = userData["w"].find("lemma=\"", 0);
if (pos1 != string::npos) {
pos1 = userData["w"].find(":", pos1) + 1;
! pos2 = userData["w"].find("\"", pos1) - 1;
tagData = userData["w"].substr(pos1, pos2-pos1);
! buf.appendFormatted(" <%s>", tagData.c_str() );
}
pos1 = userData["w"].find("morph=\"", 0);
if (pos1 != string::npos) {
pos1 = userData["w"].find(":", pos1) + 1;
! pos2 = userData["w"].find("\"", pos1) - 1;
tagData = userData["w"].substr(pos1, pos2-pos1);
! buf.appendFormatted(" <%s>", tagData.c_str() );
}
pos1 = userData["w"].find("POS=\"", 0);
--- 54,79 ----
pos2 = userData["w"].find("\"", pos1) - 1;
tagData = userData["w"].substr(pos1, pos2-pos1);
! buf.appendFormatted(" %s", tagData.c_str() );
}
pos1 = userData["w"].find("lemma=\"", 0);
if (pos1 != string::npos) {
pos1 = userData["w"].find(":", pos1) + 1;
! pos2 = userData["w"].find("\"", pos1) ;
tagData = userData["w"].substr(pos1, pos2-pos1);
! buf.appendFormatted(" <small><em><<a href=\"type=Strongs value=%s\">", tagData.c_str());
! const char *tmpbuf = tagData.c_str();
! ++tmpbuf;
! buf.appendFormatted("%s</a>></em></small> ", tmpbuf);
}
pos1 = userData["w"].find("morph=\"", 0);
if (pos1 != string::npos) {
pos1 = userData["w"].find(":", pos1) + 1;
! pos2 = userData["w"].find("\"", pos1) ;
tagData = userData["w"].substr(pos1, pos2-pos1);
! if(strstr(userData["w"].c_str(),"x-Robinson"))
! buf.appendFormatted(" <small><em>(<a href=\"type=morph class=Robinson value=%s\">%s</a>)</em></small> ", tagData.c_str(), tagData.c_str());
!
! if(strstr(userData["w"].c_str(),"x-StrongsMorph"))
! buf.appendFormatted(" <small><em>(<a href=\"type=morph class=StrongsMorph value=%s\">%s</a>)</em></small> ", tagData.c_str(), tagData.c_str());
}
pos1 = userData["w"].find("POS=\"", 0);
***************
*** 75,79 ****
pos2 = userData["w"].find("\"", pos1) - 1;
tagData = userData["w"].substr(pos1, pos2-pos1);
! buf.appendFormatted(" <%s>", tagData.c_str() );
}
}
--- 82,86 ----
pos2 = userData["w"].find("\"", pos1) - 1;
tagData = userData["w"].substr(pos1, pos2-pos1);
! buf.appendFormatted(" %s", tagData.c_str() );
}
}