48 int i = (count > 1) ? 0 : -1;
52 val = strchr(attrib,
':');
53 val = (val) ? (val + 1) : attrib;
59 const char *val2 = val;
60 if ((strchr(
"GH", *val)) && (isdigit(val[1])))
65 if (!suspendTextPassThru) {
66 buf.
appendFormatted(
"<small><em class=\"strongs\"><<a href=\"passagestudy.jsp?action=showStrongs&type=%s&value=%s\" class=\"strongs\">%s</a>></em></small>",
73 }
while (++i < count);
86 int i = (count > 1) ? 0 : -1;
90 val = strchr(attrib,
':');
91 val = (val) ? (val + 1) : attrib;
92 const char *val2 = val;
93 if ((*val ==
'T') && (strchr(
"GH", val[1])) && (isdigit(val[2])))
95 if (!suspendTextPassThru) {
96 buf.
appendFormatted(
"<small><em class=\"morph\">(<a href=\"passagestudy.jsp?action=showMorph&type=%s&value=%s\" class=\"morph\">%s</a>)</em></small>",
101 }
while (++i < count);
168 if (!strcmp(tag.
getName(),
"w")) {
185 else lastText =
"stuff";
190 val = strchr(attrib,
':');
191 val = (val) ? (val + 1) : attrib;
202 outText(
"</rb><rp>(</rp><rt>", buf, u);
203 val = strchr(attrib,
':');
204 val = (val) ? (val + 1) : attrib;
206 outText(
"</rt><rp>)</rp></ruby>", buf, u);
217 val = strchr(attrib,
':');
218 val = (val) ? (val + 1) : attrib;
229 else if (!strcmp(tag.
getName(),
"note")) {
232 bool strongsMarkup = (type ==
"x-strongsMarkup" || type ==
"strongsMarkup");
239 if (!strongsMarkup) {
246 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>",
266 else if (!strcmp(tag.
getName(),
"p") || !strcmp(tag.
getName(),
"lg")) {
271 outText(
"<!/P><br />", buf, u);
290 outText(
"<!/P><br />", buf, u);
296 else if (!strcmp(tag.
getName(),
"reference")) {
302 bool is_scripRef =
false;
305 const char* the_ref = strchr(target,
':');
321 if(!strncmp(work,
"Bible", 5))
327 buf.
appendFormatted(
"<a href=\"passagestudy.jsp?action=showRef&type=scripRef&value=%s&module=\">",
348 else if (!strcmp(tag.
getName(),
"l")) {
390 int level = (tmp) ? atoi(tmp) : 1;
397 outText((level % 2) ?
'\"' :
'\'', buf, u);
402 else if (!strcmp(tag.
getName(),
"title")) {
412 else if (!strcmp(tag.
getName(),
"list")) {
422 else if (!strcmp(tag.
getName(),
"item")) {
431 else if (!strcmp(tag.
getName(),
"rdg") || !strcmp(tag.
getName(),
"catchWord")) {
441 else if (!strcmp(tag.
getName(),
"divineName")) {
448 if (lastText.
size()) {
450 scratch.
setFormatted(
"%c<font size=\"-1\">%s</font>", lastText[0], lastText.
c_str()+1);
452 const unsigned char *tmpBuf = (
const unsigned char *)lastText.
c_str();
454 int char_length = (int)(tmpBuf - (
const unsigned char *)lastText.
c_str());
458 lastText.
c_str() + char_length
467 else if (!strcmp(tag.
getName(),
"hi")) {
472 if (type ==
"bold" || type ==
"b" || type ==
"x-b") {
475 else if (type ==
"ol" || type ==
"overline" || type ==
"x-overline") {
476 outText(
"<span style=\"text-decoration:overline\">", buf, u);
478 else if (type ==
"super") {
481 else if (type ==
"sub") {
497 if (type ==
"bold" || type ==
"b" || type ==
"x-b") {
500 else if (type ==
"ol") {
503 else if (type ==
"super") {
506 else if (type ==
"sub") {
523 else if (!strcmp(tag.
getName(),
"q")) {
527 int level = (tmp) ? atoi(tmp) : 1;
548 outText((level % 2) ?
'\"' :
'\'', buf, u);
557 type = qTag.getAttribute(
"type");
558 who = qTag.getAttribute(
"who");
559 tmp = qTag.getAttribute(
"level");
560 level = (tmp) ? atoi(tmp) : 1;
561 tmp = qTag.getAttribute(
"marker");
571 outText((level % 2) ?
'\"' :
'\'', buf, u);
580 else if (!strcmp(tag.
getName(),
"transChange")) {
586 if ((type ==
"added") || (type ==
"supplied"))
588 else if (type ==
"tenseChange")
593 if ((type ==
"added") || (type ==
"supplied"))
601 else if (!strcmp(tag.
getName(),
"figure")) {
609 if ((filepath.
size()) && (filepath[filepath.
size()-1] !=
'/') && (src[0] !=
'/'))
615 outText(
"<a href=\"passagestudy.jsp?action=showImage&value=", buf, u);
621 outText(
"<img src=\"file:", buf, u);
623 outText(
"\" border=\"0\" />", buf, u);
const char * getName() const
#define SWORD_NAMESPACE_START
SWBuf & appendFormatted(const char *format,...)
void setTokenEnd(const char *tokenEnd)
void addAllowedEscapeString(const char *findString)
unsigned long length() const
const char * getType() const
void setEmpty(bool value)
virtual const char * getConfigEntry(const char *key) const
const char * getName() const
const char * toString() const
void setTokenCaseSensitive(bool val)
void setEscapeStart(const char *escStart)
bool substituteToken(SWBuf &buf, const char *token)
virtual const char * getText() const
virtual const char * getText() const
std::stack< SWBuf > TagStack
MyUserData(const SWModule *module, const SWKey *key)
void processLemma(bool suspendTextPassThru, XMLTag &tag, SWBuf &buf)
void setTokenStart(const char *tokenStart)
const char * c_str() const
void setPassThruNumericEscapeString(bool val)
static void outText(const char *t, SWBuf &o, BasicFilterUserData *u)
void processMorph(bool suspendTextPassThru, XMLTag &tag, SWBuf &buf)
unsigned long size() const
const char * getAttribute(const char *attribName, int partNum=-1, char partSplit= '|') const
bool supressAdjacentWhitespace
void setEscapeStringCaseSensitive(bool val)
bool isEndTag(const char *eID=0) const
virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData)
void setEscapeEnd(const char *escEnd)
#define SWORD_NAMESPACE_END
SWBuf & setFormatted(const char *format,...)
static const SWBuf encode(const char *urlText)
SW_u32 getUniCharFromUTF8(const unsigned char **buf, bool skipValidation=false)
void setSize(unsigned long len)
int getAttributePartCount(const char *attribName, char partSplit= '|') const