[sword-svn] r2660 - trunk/src/modules/filters
scribe at crosswire.org
scribe at crosswire.org
Tue Oct 25 11:09:21 MST 2011
Author: scribe
Date: 2011-10-25 11:09:21 -0700 (Tue, 25 Oct 2011)
New Revision: 2660
Modified:
trunk/src/modules/filters/osishtmlhref.cpp
trunk/src/modules/filters/osisxhtml.cpp
Log:
handle tei hi rend attribute for overline of nom sac
Modified: trunk/src/modules/filters/osishtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/osishtmlhref.cpp 2011-10-25 17:35:20 UTC (rev 2659)
+++ trunk/src/modules/filters/osishtmlhref.cpp 2011-10-25 18:09:21 UTC (rev 2660)
@@ -485,10 +485,15 @@
// <hi> text highlighting
else if (!strcmp(tag.getName(), "hi")) {
SWBuf type = tag.getAttribute("type");
+ // handle tei rend attribute
+ if (!type.length()) type = tag.getAttribute("rend");
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
if (type == "bold" || type == "b" || type == "x-b") {
outText("<b>", buf, u);
}
+ else if (type == "ol") {
+ outText("<span style=\"text-decoration:overline\">", buf, u);
+ }
else { // all other types
outText("<i>", buf, u);
}
@@ -500,10 +505,14 @@
XMLTag tag(u->tagStacks->hiStack.top());
u->tagStacks->hiStack.pop();
type = tag.getAttribute("type");
+ if (!type.length()) type = tag.getAttribute("rend");
}
if (type == "bold" || type == "b" || type == "x-b") {
outText("</b>", buf, u);
}
+ else if (type == "ol") {
+ outText("</span>", buf, u);
+ }
else outText("</i>", buf, u);
}
}
Modified: trunk/src/modules/filters/osisxhtml.cpp
===================================================================
--- trunk/src/modules/filters/osisxhtml.cpp 2011-10-25 17:35:20 UTC (rev 2659)
+++ trunk/src/modules/filters/osisxhtml.cpp 2011-10-25 18:09:21 UTC (rev 2660)
@@ -486,10 +486,15 @@
// <hi> text highlighting
else if (!strcmp(tag.getName(), "hi")) {
SWBuf type = tag.getAttribute("type");
+ // handle tei rend attribute
+ if (!type.length()) type = tag.getAttribute("rend");
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
if (type == "bold" || type == "b" || type == "x-b") {
outText("<b>", buf, u);
}
+ else if (type == "ol") {
+ outText("<span style=\"text-decoration:overline\">", buf, u);
+ }
else { // all other types
outText("<i>", buf, u);
}
@@ -501,10 +506,14 @@
XMLTag tag(u->tagStacks->hiStack.top());
u->tagStacks->hiStack.pop();
type = tag.getAttribute("type");
+ if (!type.length()) type = tag.getAttribute("rend");
}
if (type == "bold" || type == "b" || type == "x-b") {
outText("</b>", buf, u);
}
+ else if (type == "ol") {
+ outText("</span>", buf, u);
+ }
else outText("</i>", buf, u);
}
}
More information about the sword-cvs
mailing list