37 const static char *header =
"\n\
38 .entryFree, .form, .etym, .def, .usg, .quote {display:block;}\n\
39 .pron, .pos, .oVar, .ref, {display:inline}\n\
40 [type=headword] {font-weight:bold; font-variant:small-caps; text-decoration:underline;}\n\
41 [type=derivative] {font-weight:bold; font-variant:small-caps;}\n\
42 [rend=italic] {font-style:italic;}\n\
43 [rend=bold] {font-weight:bold;}\n\
44 [rend=small-caps] {font-variant:small-caps}\n\
45 .pos:before {content: \"Pos.: \"; font-weight:bold;}\n\
46 .pron:before {content:\" \\\\ \";}\n\
47 .pron:after {content:\" \\\\ \";}\n\
48 .etym:before {content:\"Etym.:\"; display:block; font-weight:bold;}\n\
49 .usg:before {content:\"Usg.:\"; display:block; font-weight:bold;}\n\
50 .def:before {content:\"Def.:\" display:block; font-weight:bold;}\n\
51 .quote {background-color:#cfcfdf; padding:0.3em; margin:0.5em; border-width:1px; border-style:solid;}\n\
52 .cit:before {content:\"quote:\" ; display:block; margin-top:0.5em; font-size:small;}\n\
53 .cit {align:center;}\n\
54 .persName:before {content:\" (\"; font-size:small;}\n\
55 .persName:after {content:\") \"; font-size:small;}\n\
56 .persName {font-size:small;}\n\
57 .number {font-style:bold;}\n\
58 .def {font-style:bold;}\n\
100 if (!strcmp(tag.
getName(),
"p")) {
105 buf +=
"<!/P><br />";
115 else if (!strcmp(tag.
getName(),
"hi")) {
120 if (rend ==
"italic" || rend ==
"ital")
122 else if (rend ==
"bold")
124 else if (rend ==
"super" || rend ==
"sup")
126 else if (rend ==
"sub")
128 else if (rend ==
"overline")
129 buf +=
"<span style=\"text-decoration:overline\">";
134 if (rend ==
"italic" || rend ==
"ital")
136 else if (rend ==
"bold")
138 else if (rend ==
"super" || rend ==
"sup")
140 else if (rend ==
"sub")
142 else if (rend ==
"overline")
148 else if (!strcmp(tag.
getName(),
"entryFree")) {
152 buf +=
"<span class=\"entryFree\">";
160 else if (!strcmp(tag.
getName(),
"sense")) {
163 buf +=
"<br/><span class=\"sense";
178 else if (!strcmp(tag.
getName(),
"div")) {
188 else if (!strcmp(tag.
getName(),
"lb")) {
193 else if (!strcmp(tag.
getName(),
"pos") ||
194 !strcmp(tag.
getName(),
"gen") ||
195 !strcmp(tag.
getName(),
"case") ||
196 !strcmp(tag.
getName(),
"gram") ||
197 !strcmp(tag.
getName(),
"number") ||
198 !strcmp(tag.
getName(),
"pron") ||
199 !strcmp(tag.
getName(),
"def") ||
200 !strcmp(tag.
getName(),
"tr") ||
201 !strcmp(tag.
getName(),
"orth") ||
202 !strcmp(tag.
getName(),
"etym") ||
203 !strcmp(tag.
getName(),
"usg") ||
204 !strcmp(tag.
getName(),
"quote")||
205 !strcmp(tag.
getName(),
"cit")||
206 !strcmp(tag.
getName(),
"persName")||
207 !strcmp(tag.
getName(),
"oVar"))
210 buf +=
"<span class=\"";
213 buf +=
"\" type =\"";
217 buf +=
"\" rend =\"";
227 else if (!strcmp(tag.
getName(),
"ref")) {
234 int was_osisref =
false;
245 const char* the_ref = strchr(target,
':');
262 buf.
appendFormatted(
"<a href=\"passagestudy.jsp?action=showRef&type=scripRef&value=%s&module=%s\">",
290 else if (!strcmp(tag.
getName(),
"note")) {
301 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>",
311 else if (!strcmp(tag.
getName(),
"graphic")) {
317 if ((filepath.
size()) && (filepath[filepath.
size()-1] !=
'/') && (url[0] !=
'/'))
321 buf.
appendFormatted(
"<a href=\"passagestudy.jsp?action=showImage&value=%s&module=%s\"><img src=\"file:%s\" border=\"0\" /></a>",
329 else if (!strcmp(tag.
getName(),
"table")) {
331 buf +=
"<table><tbody>\n";
334 buf +=
"</tbody></table>\n";
338 else if (!strcmp(tag.
getName(),
"row")) {
346 else if (!strcmp(tag.
getName(),
"cell")) {
355 else if (!strcmp(tag.
getName(),
"list")) {
361 if (rend ==
"numbered") {
364 else if (rend ==
"lettered") {
365 buf +=
"<ol type=\"A\">\n";
367 else if (rend ==
"bulleted") {
371 buf +=
"<ul class=\"list ";
378 if (rend ==
"numbered") {
381 else if (rend ==
"lettered") {
384 else if (rend ==
"bulleted") {
393 else if (!strcmp(tag.
getName(),
"item")) {
const char * getName() const
#define SWORD_NAMESPACE_START
SWBuf & appendFormatted(const char *format,...)
void setTokenEnd(const char *tokenEnd)
void addAllowedEscapeString(const char *findString)
const char * getType() const
virtual const char * getConfigEntry(const char *key) const
MyUserData(const SWModule *module, const SWKey *key)
const char * getName() const
void setTokenCaseSensitive(bool val)
void setEscapeStart(const char *escStart)
bool substituteToken(SWBuf &buf, const char *token)
virtual const char * getText() const
void setTokenStart(const char *tokenStart)
const char * c_str() const
virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData)
virtual const char * getHeader() const
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
void setEscapeEnd(const char *escEnd)
#define SWORD_NAMESPACE_END
static const SWBuf encode(const char *urlText)
void setSize(unsigned long len)