[sword-svn] r3548 - in branches/sword-1-8-x: . bindings/corba/omniorbcpp bindings/corba/orbitcpp include src/modules/filters tests tests/testsuite

scribe at crosswire.org scribe at crosswire.org
Sat Dec 9 22:11:38 MST 2017


Author: scribe
Date: 2017-12-09 22:11:38 -0700 (Sat, 09 Dec 2017)
New Revision: 3548

Modified:
   branches/sword-1-8-x/
   branches/sword-1-8-x/bindings/corba/omniorbcpp/Makefile
   branches/sword-1-8-x/bindings/corba/orbitcpp/webmgr.hpp
   branches/sword-1-8-x/configure.ac
   branches/sword-1-8-x/include/osishtmlhref.h
   branches/sword-1-8-x/include/osislatex.h
   branches/sword-1-8-x/include/osisxhtml.h
   branches/sword-1-8-x/include/swbasicfilter.h
   branches/sword-1-8-x/include/teihtmlhref.h
   branches/sword-1-8-x/include/teilatex.h
   branches/sword-1-8-x/include/teirtf.h
   branches/sword-1-8-x/include/teixhtml.h
   branches/sword-1-8-x/include/thmlhtml.h
   branches/sword-1-8-x/include/thmlhtmlhref.h
   branches/sword-1-8-x/include/thmllatex.h
   branches/sword-1-8-x/include/thmlrtf.h
   branches/sword-1-8-x/include/thmlxhtml.h
   branches/sword-1-8-x/src/modules/filters/gbfhtmlhref.cpp
   branches/sword-1-8-x/src/modules/filters/gbflatex.cpp
   branches/sword-1-8-x/src/modules/filters/gbfxhtml.cpp
   branches/sword-1-8-x/src/modules/filters/osishtmlhref.cpp
   branches/sword-1-8-x/src/modules/filters/osislatex.cpp
   branches/sword-1-8-x/src/modules/filters/osisplain.cpp
   branches/sword-1-8-x/src/modules/filters/osisrtf.cpp
   branches/sword-1-8-x/src/modules/filters/osiswebif.cpp
   branches/sword-1-8-x/src/modules/filters/osisxhtml.cpp
   branches/sword-1-8-x/src/modules/filters/swbasicfilter.cpp
   branches/sword-1-8-x/src/modules/filters/teihtmlhref.cpp
   branches/sword-1-8-x/src/modules/filters/teilatex.cpp
   branches/sword-1-8-x/src/modules/filters/teirtf.cpp
   branches/sword-1-8-x/src/modules/filters/teixhtml.cpp
   branches/sword-1-8-x/src/modules/filters/thmlhtml.cpp
   branches/sword-1-8-x/src/modules/filters/thmlhtmlhref.cpp
   branches/sword-1-8-x/src/modules/filters/thmllatex.cpp
   branches/sword-1-8-x/src/modules/filters/thmlrtf.cpp
   branches/sword-1-8-x/src/modules/filters/thmlxhtml.cpp
   branches/sword-1-8-x/tests/osistest.cpp
   branches/sword-1-8-x/tests/testsuite/osisReference.xml
   branches/sword-1-8-x/tests/testsuite/osis_basic.good
   branches/sword-1-8-x/tests/testsuite/osis_mod2zmod.good
   branches/sword-1-8-x/tests/testsuite/osis_mod2zmod.sh
   branches/sword-1-8-x/tests/testsuite/osis_osis2modcipher.good
Log:
Merged in final changes before 1.8.0



Property changes on: branches/sword-1-8-x
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:3459-3471,3473,3475,3477-3482,3485-3514,3516,3518-3523,3525-3536,3538,3540
   + /trunk:3459-3471,3473,3475,3477-3482,3485-3514,3516,3518-3523,3525-3536,3538,3540,3545-3547

Modified: branches/sword-1-8-x/bindings/corba/omniorbcpp/Makefile
===================================================================
--- branches/sword-1-8-x/bindings/corba/omniorbcpp/Makefile	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/bindings/corba/omniorbcpp/Makefile	2017-12-10 05:11:38 UTC (rev 3548)
@@ -19,6 +19,8 @@
 #CXXFLAGS += -g -O0
 #CFLAGS += -g -O0
 #LDFLAGS += -g -O0
+CXXFLAGS += -O3
+CFLAGS += -O3
 #-----------------------------------------------------------------------------
 
 

Modified: branches/sword-1-8-x/bindings/corba/orbitcpp/webmgr.hpp
===================================================================
--- branches/sword-1-8-x/bindings/corba/orbitcpp/webmgr.hpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/bindings/corba/orbitcpp/webmgr.hpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -25,6 +25,7 @@
 
 #include <swmgr.h>
 #include <swmodule.h>
+#include <filemgr.h>
 #include <swfilter.h>
 #include <markupfiltmgr.h>
 #include <osiswordjs.h>

Modified: branches/sword-1-8-x/configure.ac
===================================================================
--- branches/sword-1-8-x/configure.ac	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/configure.ac	2017-12-10 05:11:38 UTC (rev 3548)
@@ -107,18 +107,30 @@
 if test x$enable_debug = xyes; then
   GCJFLAGS="-g -O0"
   if test x$ac_cv_prog_cc_g = xyes; then
-    AM_CFLAGS="-g3 -O0 -Wall -Werror"
+    AM_CFLAGS="-g3 -O0 -Wall"
   else
-    AM_CFLAGS="-O0 -Wall -Werror"
+    AM_CFLAGS="-O0 -Wall"
   fi
   if test x$ac_cv_prog_cxx_g = xyes; then
-    AM_CXXFLAGS="-g3 -O0 -Wall -Werror -Woverloaded-virtual"
+    AM_CXXFLAGS="-g3 -O0 -Wall -Woverloaded-virtual"
   else
-    AM_CXXFLAGS="-O0 -Wall -Werror -Woverloaded-virtual"
+    AM_CXXFLAGS="-O0 -Wall -Woverloaded-virtual"
   fi
 else
-  AM_CFLAGS="-Ofast"
-  AM_CXXFLAGS="-Ofast"
+  my_save_cxxflags="$CXXFLAGS"
+  CXXFLAGS=-Ofast
+  AC_MSG_CHECKING([whether CXX supports -Ofast])
+  AC_LANG_PUSH([C++])
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+      [AC_MSG_RESULT([yes])]
+      [AM_CFLAGS=-Ofast]
+      [AM_CXXFLAGS=-Ofast],
+      [AC_MSG_RESULT([no])]
+      [AM_CFLAGS=-O3]
+      [AM_CXXFLAGS=-O3],
+  )
+  CXXFLAGS="$my_save_cxxflags"
+  AC_LANG_POP([C++])
 fi
 
 AM_CFLAGS="$AM_CFLAGS -fPIC"

Modified: branches/sword-1-8-x/include/osishtmlhref.h
===================================================================
--- branches/sword-1-8-x/include/osishtmlhref.h	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/include/osishtmlhref.h	2017-12-10 05:11:38 UTC (rev 3548)
@@ -41,7 +41,7 @@
 		bool osisQToTick;
 		bool inBold;	// TODO: obsolete. left for binary compat for 1.6.x
 		bool inXRefNote;
-		bool BiblicalText;
+		bool isBiblicalText;
 		int suspendLevel;
 		SWBuf wordsOfChristStart;
 		SWBuf wordsOfChristEnd;

Modified: branches/sword-1-8-x/include/osislatex.h
===================================================================
--- branches/sword-1-8-x/include/osislatex.h	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/include/osislatex.h	2017-12-10 05:11:38 UTC (rev 3548)
@@ -45,7 +45,7 @@
 	public:
 		bool osisQToTick;
 		bool inXRefNote;
-		bool BiblicalText;
+		bool isBiblicalText;
 		int suspendLevel;
 		bool firstCell; // for tables, indicates whether a cell is the first one in a row
 		SWBuf wordsOfChristStart;

Modified: branches/sword-1-8-x/include/osisxhtml.h
===================================================================
--- branches/sword-1-8-x/include/osisxhtml.h	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/include/osisxhtml.h	2017-12-10 05:11:38 UTC (rev 3548)
@@ -45,7 +45,7 @@
 	public:
 		bool osisQToTick;
 		bool inXRefNote;
-		bool BiblicalText;
+		bool isBiblicalText;
 		int suspendLevel;
 		SWBuf wordsOfChristStart;
 		SWBuf wordsOfChristEnd;

Modified: branches/sword-1-8-x/include/swbasicfilter.h
===================================================================
--- branches/sword-1-8-x/include/swbasicfilter.h	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/include/swbasicfilter.h	2017-12-10 05:11:38 UTC (rev 3548)
@@ -31,14 +31,16 @@
 
 SWORD_NAMESPACE_START
 
+class VerseKey;
 
 // not a protected inner class because MSVC++ sucks and can't handle it
 class SWDLLEXPORT BasicFilterUserData {
 public:
-	BasicFilterUserData(const SWModule *module, const SWKey *key) { this->module = module; this->key = key; suspendTextPassThru = false; supressAdjacentWhitespace = false; }
+	BasicFilterUserData(const SWModule *module, const SWKey *key);
 	virtual ~BasicFilterUserData() {}
 	const SWModule *module;
 	const SWKey *key;
+	const VerseKey *vkey;
 	SWBuf lastTextNode;
 	SWBuf lastSuspendSegment;
 	bool suspendTextPassThru;

Modified: branches/sword-1-8-x/include/teihtmlhref.h
===================================================================
--- branches/sword-1-8-x/include/teihtmlhref.h	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/include/teihtmlhref.h	2017-12-10 05:11:38 UTC (rev 3548)
@@ -36,7 +36,7 @@
 protected:
 	class MyUserData : public BasicFilterUserData {
 	public:
-		bool BiblicalText;
+		bool isBiblicalText;
 		SWBuf lastHi;
 		
 		SWBuf version;

Modified: branches/sword-1-8-x/include/teilatex.h
===================================================================
--- branches/sword-1-8-x/include/teilatex.h	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/include/teilatex.h	2017-12-10 05:11:38 UTC (rev 3548)
@@ -36,7 +36,7 @@
 protected:
 	class MyUserData : public BasicFilterUserData {
 	public:
-		bool BiblicalText;
+		bool isBiblicalText;
 		SWBuf lastHi;
 		bool firstCell; // for tables, indicates whether a cell is the first one in a row
 		int consecutiveNewlines;

Modified: branches/sword-1-8-x/include/teirtf.h
===================================================================
--- branches/sword-1-8-x/include/teirtf.h	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/include/teirtf.h	2017-12-10 05:11:38 UTC (rev 3548)
@@ -35,7 +35,7 @@
 protected:
 	class MyUserData : public BasicFilterUserData {
 	public:
-		bool BiblicalText;
+		bool isBiblicalText;
 		bool inOsisRef;
 		SWBuf w;
 		SWBuf version;

Modified: branches/sword-1-8-x/include/teixhtml.h
===================================================================
--- branches/sword-1-8-x/include/teixhtml.h	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/include/teixhtml.h	2017-12-10 05:11:38 UTC (rev 3548)
@@ -36,7 +36,7 @@
 protected:
 	class MyUserData : public BasicFilterUserData {
 	public:
-		bool BiblicalText;
+		bool isBiblicalText;
 		SWBuf lastHi;
 		
 		SWBuf version;

Modified: branches/sword-1-8-x/include/thmlhtml.h
===================================================================
--- branches/sword-1-8-x/include/thmlhtml.h	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/include/thmlhtml.h	2017-12-10 05:11:38 UTC (rev 3548)
@@ -33,8 +33,8 @@
 protected:
 	class MyUserData : public BasicFilterUserData {
 	public:
-		MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {}
-		bool SecHead;
+		MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key), inSecHead(false) {}
+		bool inSecHead;
 	};
 	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) {
 		return new MyUserData(module, key);

Modified: branches/sword-1-8-x/include/thmlhtmlhref.h
===================================================================
--- branches/sword-1-8-x/include/thmlhtmlhref.h	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/include/thmlhtmlhref.h	2017-12-10 05:11:38 UTC (rev 3548)
@@ -38,8 +38,8 @@
 	public:
 		MyUserData(const SWModule *module, const SWKey *key);//: BasicFilterUserData(module, key) {}
 		bool inscriptRef;
-		bool SecHead;
-		bool BiblicalText;
+		bool inSecHead;
+		bool isBiblicalText;
 		SWBuf version;
 		XMLTag startTag;
 	};

Modified: branches/sword-1-8-x/include/thmllatex.h
===================================================================
--- branches/sword-1-8-x/include/thmllatex.h	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/include/thmllatex.h	2017-12-10 05:11:38 UTC (rev 3548)
@@ -38,8 +38,8 @@
 	public:
 		MyUserData(const SWModule *module, const SWKey *key);//: BasicFilterUserData(module, key) {}
 		bool inscriptRef;
-		bool SecHead;
-		bool BiblicalText;
+		bool inSecHead;
+		bool isBiblicalText;
 		SWBuf version;
 		XMLTag startTag;
 	};

Modified: branches/sword-1-8-x/include/thmlrtf.h
===================================================================
--- branches/sword-1-8-x/include/thmlrtf.h	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/include/thmlrtf.h	2017-12-10 05:11:38 UTC (rev 3548)
@@ -35,9 +35,9 @@
 	class MyUserData : public BasicFilterUserData {
 	public:
 		MyUserData(const SWModule *module, const SWKey *key);
-		bool SecHead;
+		bool inSecHead;
 		SWBuf version;
-		bool BiblicalText;
+		bool isBiblicalText;
 		XMLTag startTag;
 	};
 	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) {

Modified: branches/sword-1-8-x/include/thmlxhtml.h
===================================================================
--- branches/sword-1-8-x/include/thmlxhtml.h	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/include/thmlxhtml.h	2017-12-10 05:11:38 UTC (rev 3548)
@@ -38,8 +38,8 @@
 	public:
 		MyUserData(const SWModule *module, const SWKey *key);//: BasicFilterUserData(module, key) {}
 		bool inscriptRef;
-		char SecHead;
-		bool BiblicalText;
+		char secHeadLevel;
+		bool isBiblicalText;
 		SWBuf version;
 		XMLTag startTag;
 	};

Modified: branches/sword-1-8-x/src/modules/filters/gbfhtmlhref.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/gbfhtmlhref.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/gbfhtmlhref.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -232,19 +232,13 @@
 			SWBuf type = tag.getAttribute("type");
 			SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
 			SWBuf noteName = tag.getAttribute("n");
-			VerseKey *vkey = NULL;
-			// see if we have a VerseKey * or descendant
-			SWTRY {
-				vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-			}
-			SWCATCH ( ... ) {	}
-			if (vkey) {
+			if (u->vkey) {
 				// leave this special osis type in for crossReference notes types?  Might thml use this some day? Doesn't hurt.
 				//char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
 				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> ", 
 					URL::encode(footnoteNumber.c_str()).c_str(),
 					URL::encode(u->version.c_str()).c_str(), 
-					URL::encode(vkey->getText()).c_str(), 
+					URL::encode(u->vkey->getText()).c_str(), 
 					(renderNoteNumbers ? URL::encode(noteName.c_str()).c_str(): ""));
 			}
 			u->suspendTextPassThru = true;

Modified: branches/sword-1-8-x/src/modules/filters/gbflatex.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/gbflatex.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/gbflatex.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -163,18 +163,12 @@
 			SWBuf type = tag.getAttribute("type");
 			SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
 			SWBuf noteName = tag.getAttribute("n");
-			VerseKey *vkey = NULL;
-			// see if we have a VerseKey * or descendant
-			SWTRY {
-				vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-			}
-			SWCATCH ( ... ) {	}
-			if (vkey) {
+			if (u->vkey) {
 				
 				buf.appendFormatted("\\swordfootnote{%s}{%s}{%s}{", 
 					footnoteNumber.c_str(),
 					u->version.c_str(), 
-					vkey->getText()).c_str(); 
+					u->vkey->getText()).c_str(); 
 			}
 			u->suspendTextPassThru = false;
 		}

Modified: branches/sword-1-8-x/src/modules/filters/gbfxhtml.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/gbfxhtml.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/gbfxhtml.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -171,19 +171,13 @@
 			SWBuf type = tag.getAttribute("type");
 			SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
 			SWBuf noteName = tag.getAttribute("n");
-			VerseKey *vkey = NULL;
-			// see if we have a VerseKey * or descendant
-			SWTRY {
-				vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-			}
-			SWCATCH ( ... ) {	}
-			if (vkey) {
+			if (u->vkey) {
 				// leave this special osis type in for crossReference notes types?  Might thml use this some day? Doesn't hurt.
 				//char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
 				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> ", 
 					URL::encode(footnoteNumber.c_str()).c_str(),
 					URL::encode(u->version.c_str()).c_str(), 
-					URL::encode(vkey->getText()).c_str(), 
+					URL::encode(u->vkey->getText()).c_str(), 
 					(renderNoteNumbers ? URL::encode(noteName.c_str()).c_str(): ""));
 			}
 			u->suspendTextPassThru = true;

Modified: branches/sword-1-8-x/src/modules/filters/osishtmlhref.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/osishtmlhref.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/osishtmlhref.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -117,15 +117,13 @@
 	tagStacks = new TagStacks();
 	wordsOfChristStart = "<font color=\"red\"> ";
 	wordsOfChristEnd   = "</font> ";
+	osisQToTick = true;	// default
+	isBiblicalText = false;
 	if (module) {
 		osisQToTick = ((!module->getConfigEntry("OSISqToTick")) || (strcmp(module->getConfigEntry("OSISqToTick"), "false")));
 		version = module->getName();
-		BiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
+		isBiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
 	}
-	else {
-		osisQToTick = true;	// default
-		version = "";
-	}
 }
 
 OSISHTMLHREF::MyUserData::~MyUserData() {
@@ -241,22 +239,15 @@
 					if (!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");
 						SWBuf noteName = tag.getAttribute("n");
-						VerseKey *vkey = NULL;
 						char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
 
 						u->inXRefNote = true; // Why this change? Ben Morgan: Any note can have references in, so we need to set this to true for all notes
 //						u->inXRefNote = (ch == 'x');
-
-						// see if we have a VerseKey * or descendant
-						SWTRY {
-							vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-						}
-						SWCATCH ( ... ) {	}
 						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>",
 						        ch, 
 							URL::encode(footnoteNumber.c_str()).c_str(), 
 							URL::encode(u->version.c_str()).c_str(), 
-							URL::encode(vkey ? vkey->getText() : u->key->getText()).c_str(), 
+							URL::encode(u->vkey ? u->vkey->getText() : u->key->getText()).c_str(), 
 							ch,
 							ch, 
 							(renderNoteNumbers ? noteName.c_str() : ""));

Modified: branches/sword-1-8-x/src/modules/filters/osislatex.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/osislatex.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/osislatex.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -293,24 +293,17 @@
 							footnoteBody += u->module->getEntryAttributes()["Footnote"][footnoteNumber]["body"];
 						}
 						SWBuf noteName = tag.getAttribute("n");
-						VerseKey *vkey = NULL;
 
-
 						u->inXRefNote = true; // Why this change? Ben Morgan: Any note can have references in, so we need to set this to true for all notes
 //						u->inXRefNote = (ch == 'x');
 
-						// see if we have a VerseKey * or descendant
-						SWTRY {
-							vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-						}
-						SWCATCH ( ... ) {	}
-						if (vkey) {
-							//printf("URL = %s\n",URL::encode(vkey->getText()).c_str());
+						if (u->vkey) {
+							//printf("URL = %s\n",URL::encode(u->vkey->getText()).c_str());
 							buf.appendFormatted("\\swordfootnote{%s}{%s}{%s}{%s}{%s}{",
 								 
 								footnoteNumber.c_str(), 
 								u->version.c_str(), 
-								vkey->getText(), 
+								u->vkey->getText(), 
 								tag.getAttribute("type"),
 								(renderNoteNumbers ? noteName.c_str() : ""));
 							if (u->module) {

Modified: branches/sword-1-8-x/src/modules/filters/osisplain.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/osisplain.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/osisplain.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -37,7 +37,6 @@
 	public:
 		SWBuf w;
 		XMLTag tag;
-		VerseKey *vk;
 		char testament;
 		SWBuf hiType;
 		MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {}
@@ -73,8 +72,7 @@
 
 BasicFilterUserData *OSISPlain::createUserData(const SWModule *module, const SWKey *key) {
 	MyUserData *u = new MyUserData(module, key);
-	u->vk = SWDYNAMIC_CAST(VerseKey, u->key);
-	u->testament = (u->vk) ? u->vk->getTestament() : 2;	// default to NT
+	u->testament = (u->vkey) ? u->vkey->getTestament() : 2;	// default to NT
 	return u;
 }
 

Modified: branches/sword-1-8-x/src/modules/filters/osisrtf.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/osisrtf.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/osisrtf.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -36,7 +36,7 @@
 	class MyUserData : public BasicFilterUserData {
 	public:
 		bool osisQToTick;
-		bool BiblicalText;
+		bool isBiblicalText;
 		bool inXRefNote;
 		int suspendLevel;
 		std::stack<char *> quoteStack;
@@ -49,13 +49,14 @@
 
 	MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {
 		inXRefNote    = false;
-		BiblicalText  = false;
+		isBiblicalText  = false;
 		suspendLevel  = 0;
+		osisQToTick = true;  // default
 		if (module) {
 			version = module->getName();
-			BiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
+			isBiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
+			osisQToTick = ((!module->getConfigEntry("OSISqToTick")) || (strcmp(module->getConfigEntry("OSISqToTick"), "false")));
 		}	
-		osisQToTick = ((!module->getConfigEntry("OSISqToTick")) || (strcmp(module->getConfigEntry("OSISqToTick"), "false")));
 	}
 
 
@@ -244,15 +245,9 @@
 							&& (type != "strongsMarkup")	// deprecated
 							) {
 						SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
-						VerseKey *vkey = NULL;
-						// see if we have a VerseKey * or descendant
-						SWTRY {
-							vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-						}
-						SWCATCH ( ... ) {	}
-						if (vkey) {
+						if (u->vkey) {
 							char ch = ((!strcmp(type.c_str(), "crossReference")) || (!strcmp(type.c_str(), "x-cross-ref"))) ? 'x':'n';
-							scratch.setFormatted("{\\super <a href=\"\">*%c%i.%s</a>} ", ch, vkey->getVerse(), footnoteNumber.c_str());
+							scratch.setFormatted("{\\super <a href=\"\">*%c%i.%s</a>} ", ch, u->vkey->getVerse(), footnoteNumber.c_str());
 							outText(scratch.c_str(), buf, u);
 							u->inXRefNote = (ch == 'x');
 						}

Modified: branches/sword-1-8-x/src/modules/filters/osiswebif.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/osiswebif.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/osiswebif.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -144,15 +144,9 @@
 					if (!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");
 						SWBuf modName = (u->module) ? u->module->getName() : "";
-						VerseKey *vkey = NULL;
-						// see if we have a VerseKey * or descendant
-						SWTRY {
-							vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-						}
-						SWCATCH ( ... ) {	}
-						if (vkey) {
+						if (u->vkey) {
 							char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
-//							buf.appendFormatted("<a href=\"noteID=%s.%c.%s\"><small><sup>*%c</sup></small></a> ", vkey->getText(), ch, footnoteNumber.c_str(), ch);
+//							buf.appendFormatted("<a href=\"noteID=%s.%c.%s\"><small><sup>*%c</sup></small></a> ", u->vkey->getText(), ch, footnoteNumber.c_str(), ch);
 							buf.appendFormatted("<span class=\"fn\" onclick=\"f(\'%s\',\'%s\',\'%s\');\" >%c</span>", modName.c_str(), u->key->getText(), footnoteNumber.c_str(), ch);
 						}
 					}

Modified: branches/sword-1-8-x/src/modules/filters/osisxhtml.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/osisxhtml.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/osisxhtml.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -37,24 +37,25 @@
 	const static char *header = "\
 		.divineName { font-variant: small-caps; }\n\
 		.wordsOfJesus { color: red; }\n\
-		.transChange { font-style: italic;}\n\
-		.transChange.transChange-supplied { font-style: italic;}\n\
-		.transChange.transChange-added { font-style: italic;}\n\
-		.transChange.transChange-tenseChange::before { content: '*';}\n\
-		.transChange:lang(zh) { font-style: normal; text-decoration : dotted underline;}\n\
-		.overline        { text-decoration: overline; }\n\
-		.indent1         { margin-left: 10px }\n\
-		.indent2         { margin-left: 20px }\n\
-		.indent3         { margin-left: 30px }\n\
-		.indent4         { margin-left: 40px }\n\
-		abbr { &:hover{ &:before{ content: attr(title) } } }\n\
+		.transChange { font-style: italic; }\n\
+		.transChange.transChange-supplied { font-style: italic; }\n\
+		.transChange.transChange-added { font-style: italic; }\n\
+		.transChange.transChange-tenseChange::before { content: '*'; }\n\
+		.transChange.transChange-tenseChange { font-style: normal; }\n\
+		.transChange:lang(zh) { font-style: normal; text-decoration: dotted underline; }\n\
+		.overline { text-decoration: overline; }\n\
+		.indent1 { margin-left: 1em; }\n\
+		.indent2 { margin-left: 2em; }\n\
+		.indent3 { margin-left: 3em; }\n\
+		.indent4 { margin-left: 4em; }\n\
+		abbr { &:hover{ &:before{ content: attr(title); } } }\n\
 		.small-caps { font-variant: small-caps; }\n\
 		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }\n\
 		.acrostic { text-align: center; }\n\
-		.colophon {font-style: italic; font-size=small; display:block;}\n\
-		.rdg { font-style: italic;}\n\
-		.catchWord {font-style: bold;}\n\
-		.x-p-indent {text-indent: 10px;}\n\
+		.colophon {font-style: italic; font-size: small; display: block; }\n\
+		.rdg { font-style: italic; }\n\
+		.catchWord {font-style: bold; }\n\
+		.x-p-indent {text-indent: 1em; }\n\
 	";
 	// Acrostic for things like the titles in Psalm 119
 	return header;
@@ -181,16 +182,14 @@
 	wordsOfChristEnd   = "</span> ";
 	interModuleLinkStart = "<a class=\"%s\" href=\"sword://%s/%s\">";
 	interModuleLinkEnd = "</a>";
+	isBiblicalText = false;
+	osisQToTick = true;	// default
+	consecutiveNewlines = 0;
 	if (module) {
 		osisQToTick = ((!module->getConfigEntry("OSISqToTick")) || (strcmp(module->getConfigEntry("OSISqToTick"), "false")));
 		version = module->getName();
-		BiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
+		isBiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
 	}
-	else {
-		osisQToTick = true;	// default
-		version = "";
-	}
-	consecutiveNewlines = 0;
 }
 
 OSISXHTML::MyUserData::~MyUserData() {
@@ -200,9 +199,17 @@
 	delete lineStack;
 }
 
+
 void OSISXHTML::MyUserData::outputNewline(SWBuf &buf) {
 	if (++consecutiveNewlines <= 2) {
-		outText("<br />\n", buf, this);
+		// any newlines at the start of a verse should get appended to a preverse heading
+		// since preverse cause a newline, simply be sure we have a preverse
+		if (!buf.size() && vkey && vkey->getVerse() && module && module->isProcessEntryAttributes()) {
+			module->getEntryAttributes()["Heading"]["Preverse"]["0"] += "<div></div>";
+		}
+		else {
+			outText("<br />\n", buf, this);
+		}
 		supressAdjacentWhitespace = true;
 	}
 }
@@ -299,25 +306,19 @@
 					if (!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");
 						SWBuf noteName = tag.getAttribute("n");
-						VerseKey *vkey = NULL;
 						char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
 
 						u->inXRefNote = true; // Why this change? Ben Morgan: Any note can have references in, so we need to set this to true for all notes
 //						u->inXRefNote = (ch == 'x');
 
-						// see if we have a VerseKey * or descendant
-						SWTRY {
-							vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-						}
-						SWCATCH ( ... ) {	}
-						if (vkey) {
-							//printf("URL = %s\n",URL::encode(vkey->getText()).c_str());
+						if (u->vkey) {
+							//printf("URL = %s\n",URL::encode(u->vkey->getText()).c_str());
 							buf.appendFormatted("<a class=\"%s\" href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup class=\"%c\">*%c%s</sup></small></a>",
 								classExtras.c_str(),
 								ch, 
 								URL::encode(footnoteNumber.c_str()).c_str(), 
 								URL::encode(u->version.c_str()).c_str(), 
-								URL::encode(vkey->getText()).c_str(), 
+								URL::encode(u->vkey->getText()).c_str(), 
 								ch,
 								ch, 
 								(renderNoteNumbers ? noteName.c_str() : ""));
@@ -344,7 +345,7 @@
 			}
 		}
 
-		// <p> paragraph and <lg> linegroup tags
+		// <p> paragraph and <lg> linegroup tags except newline at start of verse (immediately after verse number)
 		else if (!strcmp(tag.getName(), "p") || !strcmp(tag.getName(), "lg")) {
 			if ((!tag.isEndTag()) && (!tag.isEmpty())) {	// non-empty start tag
 				u->outputNewline(buf);
@@ -538,11 +539,10 @@
 				if (canonical.size() && !strcmp(canonical,"true")) {
 					classExtras.append(" canonical");
 				} 
-				VerseKey *vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-				if (vkey && !vkey->getVerse()) {
-					if (!vkey->getChapter()) {
-						if (!vkey->getBook()) {
-							if (!vkey->getTestament()) {
+				if (u->vkey && !u->vkey->getVerse()) {
+					if (!u->vkey->getChapter()) {
+						if (!u->vkey->getBook()) {
+							if (!u->vkey->getTestament()) {
 								outText(SWBuf("<h1 class=\"moduleHeader") + classExtras + "\">",  buf, u);
 								tag.setAttribute("pushed", "h1");
 							}

Modified: branches/sword-1-8-x/src/modules/filters/swbasicfilter.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/swbasicfilter.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/swbasicfilter.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -29,6 +29,7 @@
 #include <stdarg.h>
 #include <utilstr.h>
 #include <stringmgr.h>
+#include <versekey.h>
 #include <map>
 #include <set>
 
@@ -54,6 +55,19 @@
 const char SWBasicFilter::FINALIZE   = 8;
 
 
+BasicFilterUserData::BasicFilterUserData(const SWModule *module, const SWKey *key) {
+	this->module = module;
+	this->key = key;
+	suspendTextPassThru = false;
+	supressAdjacentWhitespace = false;
+	vkey = 0;
+	SWTRY {
+		vkey = SWDYNAMIC_CAST(VerseKey, key);
+	}
+	SWCATCH ( ... ) { }
+}
+
+
 SWBasicFilter::SWBasicFilter() {
 
 	p = new Private;

Modified: branches/sword-1-8-x/src/modules/filters/teihtmlhref.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/teihtmlhref.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/teihtmlhref.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -33,10 +33,10 @@
 
 
 TEIHTMLHREF::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {
-	BiblicalText = false;
+	isBiblicalText = false;
 	if (module) {
 		version = module->getName();
-		BiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
+		isBiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
 	}
 }
 

Modified: branches/sword-1-8-x/src/modules/filters/teilatex.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/teilatex.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/teilatex.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -33,10 +33,10 @@
 
 
 TEILaTeX::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {
-	BiblicalText = false;
+	isBiblicalText = false;
 	if (module) {
 		version = module->getName();
-		BiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
+		isBiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
 	}
 }
 

Modified: branches/sword-1-8-x/src/modules/filters/teirtf.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/teirtf.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/teirtf.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -31,11 +31,11 @@
 
 
 TEIRTF::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {
-	BiblicalText = false;
+	isBiblicalText = false;
 	inOsisRef = false;
 	if (module) {
 		version = module->getName();
-		BiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
+		isBiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
 	}
 }
 
@@ -170,13 +170,7 @@
 					SWBuf type = tag.getAttribute("type");
 
 					SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
-					VerseKey *vkey = 0;
-					// see if we have a VerseKey * or descendant
-					SWTRY {
-						vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-					}
-					SWCATCH ( ... ) {	}
-					if (vkey) {
+					if (u->vkey) {
 						buf.appendFormatted("{\\super <a href=\"\">*%s</a>} ", footnoteNumber.c_str());
 					}
 					u->suspendTextPassThru = true;

Modified: branches/sword-1-8-x/src/modules/filters/teixhtml.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/teixhtml.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/teixhtml.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -63,10 +63,10 @@
 
 
 TEIXHTML::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {
-	BiblicalText = false;
+	isBiblicalText = false;
 	if (module) {
 		version = module->getName();
-		BiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
+		isBiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
 	}
 }
 

Modified: branches/sword-1-8-x/src/modules/filters/thmlhtml.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/thmlhtml.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/thmlhtml.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -185,17 +185,17 @@
 			}
 		}
 		else if (!strcmp(tag.getName(), "div")) {
-			if (tag.isEndTag() && (u->SecHead)) {
+			if (tag.isEndTag() && (u->inSecHead)) {
 				buf += "</i></b><br />";
-				u->SecHead = false;
+				u->inSecHead = false;
 			}
 			else if (tag.getAttribute("class")) {
 				if (!strcmp(tag.getAttribute("class"), "sechead")) {
-					u->SecHead = true;
+					u->inSecHead = true;
 					buf += "<br /><b><i>";
 				}
 				else if (!strcmp(tag.getAttribute("class"), "title")) {
-					u->SecHead = true;
+					u->inSecHead = true;
 					buf += "<br /><b><i>";
 				}
 			}

Modified: branches/sword-1-8-x/src/modules/filters/thmlhtmlhref.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/thmlhtmlhref.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/thmlhtmlhref.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -33,10 +33,11 @@
  
 
 ThMLHTMLHREF::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {
+	isBiblicalText = false;
+	inSecHead = false;
 	if (module) {
 		version = module->getName();
-		BiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
-		SecHead = false;
+		isBiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
 	}	
 }
 
@@ -209,20 +210,14 @@
 					SWBuf type = tag.getAttribute("type");
 					SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
 					SWBuf noteName = tag.getAttribute("n");
-					VerseKey *vkey = NULL;
-					// see if we have a VerseKey * or descendant
-					SWTRY {
-						vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-					}
-					SWCATCH ( ... ) {	}
-					if (vkey) {
+					if (u->vkey) {
 						// leave this special osis type in for crossReference notes types?  Might thml use this some day? Doesn't hurt.
 						char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
 						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>", 
 							ch, 
 							URL::encode(footnoteNumber.c_str()).c_str(), 
 							URL::encode(u->version.c_str()).c_str(), 
-							URL::encode(vkey->getText()).c_str(), 
+							URL::encode(u->vkey->getText()).c_str(), 
 							ch,
 							ch, 
 							(renderNoteNumbers ? URL::encode(noteName.c_str()).c_str() : ""));
@@ -256,7 +251,7 @@
 				}
 			}
 			if (tag.isEndTag()) {	//	</scripRef>
-				if (!u->BiblicalText) {
+				if (!u->isBiblicalText) {
 					SWBuf refList = u->startTag.getAttribute("passage");
 					if (!refList.length())
 						refList = u->lastTextNode;
@@ -271,19 +266,13 @@
 				else {
 					SWBuf footnoteNumber = u->startTag.getAttribute("swordFootnote");
 					SWBuf noteName = tag.getAttribute("n");
-					VerseKey *vkey = NULL;
-					// see if we have a VerseKey * or descendant
-					SWTRY {
-						vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-					}
-					SWCATCH ( ... ) {}
-					if (vkey) {
+					if (u->vkey) {
 						// leave this special osis type in for crossReference notes types?  Might thml use this some day? Doesn't hurt.
-						//buf.appendFormatted("<a href=\"noteID=%s.x.%s\"><small><sup>*x</sup></small></a> ", vkey->getText(), footnoteNumber.c_str());
+						//buf.appendFormatted("<a href=\"noteID=%s.x.%s\"><small><sup>*x</sup></small></a> ", u->vkey->getText(), footnoteNumber.c_str());
 						buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=x&value=%s&module=%s&passage=%s\"><small><sup class=\"x\">*x%s</sup></small></a>",
 							URL::encode(footnoteNumber.c_str()).c_str(), 
 							URL::encode(u->version.c_str()).c_str(),
-							URL::encode(vkey->getText()).c_str(), 
+							URL::encode(u->vkey->getText()).c_str(), 
 							(renderNoteNumbers ? URL::encode(noteName.c_str()).c_str() : ""));
 					}
 				}
@@ -293,17 +282,17 @@
 			}
 		}
 		else if (tag.getName() && !strcmp(tag.getName(), "div")) {
-			if (tag.isEndTag() && u->SecHead) {
+			if (tag.isEndTag() && u->inSecHead) {
 				buf += "</i></b><br />";
-				u->SecHead = false;
+				u->inSecHead = false;
 			}
 			else if (tag.getAttribute("class")) {
 				if (!stricmp(tag.getAttribute("class"), "sechead")) {
-					u->SecHead = true;
+					u->inSecHead = true;
 					buf += "<br /><b><i>";
 				}
 				else if (!stricmp(tag.getAttribute("class"), "title")) {
-					u->SecHead = true;
+					u->inSecHead = true;
 					buf += "<br /><b><i>";
 				}
 				else {

Modified: branches/sword-1-8-x/src/modules/filters/thmllatex.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/thmllatex.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/thmllatex.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -38,10 +38,11 @@
 
 
 ThMLLaTeX::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {
+	isBiblicalText = false;
+	inSecHead = false;
 	if (module) {
 		version = module->getName();
-		BiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
-		SecHead = false;
+		isBiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
 	}	
 }
 
@@ -222,20 +223,14 @@
 					if (u->module){
 					        footnoteBody += u->module->getEntryAttributes()["Footnote"][footnoteNumber]["body"];
                                         }
-					VerseKey *vkey = NULL;
-					// see if we have a VerseKey * or descendant
-					SWTRY {
-						vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-					}
-					SWCATCH ( ... ) {	}
-					if (vkey) {
+					if (u->vkey) {
 						// leave this special osis type in for crossReference notes types?  Might thml use this some day? Doesn't hurt.
 						char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
 						buf.appendFormatted("\\swordfootnote[%c]{%s}{%s}{%s}{%s}{", 
 							ch, 
 							footnoteNumber.c_str(), 
 							u->version.c_str(), 
-							vkey->getText(),  
+							u->vkey->getText(),  
 							noteName.c_str());  
 					}
 					else {
@@ -269,7 +264,7 @@
 				}
 			}
 			if (!tag.isEndTag()) {	//	</scripRef>
-				if (!u->BiblicalText) {
+				if (!u->isBiblicalText) {
 					SWBuf refList = u->startTag.getAttribute("passage");
 					if (!refList.length())
 						refList = u->lastTextNode;
@@ -288,22 +283,16 @@
 					if (u->module){
 					        footnoteBody += u->module->getEntryAttributes()["Footnote"][footnoteNumber]["body"];
                                         }
-					VerseKey *vkey = NULL;
-					// see if we have a VerseKey * or descendant
-					SWTRY {
-						vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-					}
-					SWCATCH ( ... ) {}
-					if (vkey) {
+					if (u->vkey) {
 						// leave this special osis type in for crossReference notes types?  Might thml use this some day? Doesn't hurt.
-						//buf.appendFormatted("<a href=\"noteID=%s.x.%s\"><small><sup>*x</sup></small></a> ", vkey->getText(), footnoteNumber.c_str());
+						//buf.appendFormatted("<a href=\"noteID=%s.x.%s\"><small><sup>*x</sup></small></a> ", u->vkey->getText(), footnoteNumber.c_str());
 						// char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
 						char ch = 'x';
 						buf.appendFormatted("\\swordfootnote[%c]{%s}{%s}{%s}{%s}{",
 							ch,
 							footnoteNumber.c_str(), 
 							u->version.c_str(),
-							vkey->getText(), 
+							u->vkey->getText(), 
 							(renderNoteNumbers ? noteName.c_str() : ""));
 						if (u->module) {
                                                         buf += u->module->renderText(footnoteBody).c_str();
@@ -321,16 +310,14 @@
 		}
 		else if (tag.getName() && !strcmp(tag.getName(), "div")) {
 		                                        
-                        //VerseKey *vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-		                                                                                                         		
-		        //if (!tag.isEndTag() && vkey && !vkey->getChapter())
+		        //if (!tag.isEndTag() && u->vkey && !u->vkey->getChapter())
 		        //        buf += "\\swordsection{book}{";
 		        //}        
 		        
 		        
-			if (!tag.isEndTag() && u->SecHead) {
+			if (!tag.isEndTag() && u->inSecHead) {
 				buf += "\\swordsection{sechead}{";
-				u->SecHead = false;
+				u->inSecHead = false;
 			}
 			
 			else if (!tag.isEndTag() && tag.getAttribute("class")) {

Modified: branches/sword-1-8-x/src/modules/filters/thmlrtf.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/thmlrtf.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/thmlrtf.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -211,11 +211,12 @@
 
 
 ThMLRTF::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {
-	this->SecHead = false;
+	isBiblicalText = false;
+	inSecHead = false;
 	XMLTag startTag = "";
 	if (module) {
 		version = module->getName();
-		BiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
+		isBiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
 	}	
 }
 
@@ -253,16 +254,10 @@
 				if (!tag.isEmpty()) {
 					SWBuf type = tag.getAttribute("type");
 					SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
-					VerseKey *vkey = NULL;
-					// see if we have a VerseKey * or descendant
-					SWTRY {
-						vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-					}
-					SWCATCH ( ... ) {	}
-					if (vkey) {
+					if (u->vkey) {
 						// leave this special osis type in for crossReference notes types?  Might thml use this some day? Doesn't hurt.
 						char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
-						buf.appendFormatted("{\\super <a href=\"\">*%c%i.%s</a>} ", ch, vkey->getVerse(), footnoteNumber.c_str());
+						buf.appendFormatted("{\\super <a href=\"\">*%c%i.%s</a>} ", ch, u->vkey->getVerse(), footnoteNumber.c_str());
 					}
 					u->suspendTextPassThru = true;
 				}
@@ -280,7 +275,7 @@
 				}
 			}
 			if (tag.isEndTag()) {	//	</scripRef>
-				if (!u->BiblicalText) {
+				if (!u->isBiblicalText) {
 					SWBuf refList = u->startTag.getAttribute("passage");
 					if (!refList.length())
 						refList = u->lastTextNode;
@@ -292,15 +287,9 @@
 				}
 				else {
 					SWBuf footnoteNumber = u->startTag.getAttribute("swordFootnote");
-					VerseKey *vkey = NULL;
-					// see if we have a VerseKey * or descendant
-					SWTRY {
-						vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-					}
-					SWCATCH ( ... ) {}
-					if (vkey) {
+					if (u->vkey) {
 						// leave this special osis type in for crossReference notes types?  Might thml use this some day? Doesn't hurt.
-						buf.appendFormatted("{\\super <a href=\"\">*x%i.%s</a>} ", vkey->getVerse(), footnoteNumber.c_str());
+						buf.appendFormatted("{\\super <a href=\"\">*x%i.%s</a>} ", u->vkey->getVerse(), footnoteNumber.c_str());
 					}
 				}
 
@@ -310,17 +299,17 @@
 		}
 
 		else if (tag.getName() && !strcmp(tag.getName(), "div")) {
-			if (tag.isEndTag() && u->SecHead) {
+			if (tag.isEndTag() && u->inSecHead) {
 				buf += "\\par}";
-				u->SecHead = false;
+				u->inSecHead = false;
 			}
 			else if (tag.getAttribute("class")) {
 				if (!stricmp(tag.getAttribute("class"), "sechead")) {
-					u->SecHead = true;
+					u->inSecHead = true;
 					buf += "{\\par\\i1\\b1 ";
 				}
 				else if (!stricmp(tag.getAttribute("class"), "title")) {
-					u->SecHead = true;
+					u->inSecHead = true;
 					buf += "{\\par\\i1\\b1 ";
 				}
 			}

Modified: branches/sword-1-8-x/src/modules/filters/thmlxhtml.cpp
===================================================================
--- branches/sword-1-8-x/src/modules/filters/thmlxhtml.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/src/modules/filters/thmlxhtml.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -38,10 +38,11 @@
 
 
 ThMLXHTML::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {
+	isBiblicalText = false;
+	secHeadLevel = 0;
 	if (module) {
 		version = module->getName();
-		BiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
-		SecHead = false;
+		isBiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
 	}	
 }
 
@@ -214,20 +215,14 @@
 					SWBuf type = tag.getAttribute("type");
 					SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
 					SWBuf noteName = tag.getAttribute("n");
-					VerseKey *vkey = NULL;
-					// see if we have a VerseKey * or descendant
-					SWTRY {
-						vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-					}
-					SWCATCH ( ... ) {	}
-					if (vkey) {
+					if (u->vkey) {
 						// leave this special osis type in for crossReference notes types?  Might thml use this some day? Doesn't hurt.
 						char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
 						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>", 
 							ch, 
 							URL::encode(footnoteNumber.c_str()).c_str(), 
 							URL::encode(u->version.c_str()).c_str(), 
-							URL::encode(vkey->getText()).c_str(), 
+							URL::encode(u->vkey->getText()).c_str(), 
 							ch,
 							ch, 
 							(renderNoteNumbers ? noteName.c_str() : ""));
@@ -261,7 +256,7 @@
 				}
 			}
 			if (tag.isEndTag()) {	//	</scripRef>
-				if (!u->BiblicalText) {
+				if (!u->isBiblicalText) {
 					SWBuf refList = u->startTag.getAttribute("passage");
 					if (!refList.length())
 						refList = u->lastTextNode;
@@ -276,19 +271,13 @@
 				else {
 					SWBuf footnoteNumber = u->startTag.getAttribute("swordFootnote");
 					SWBuf noteName = tag.getAttribute("n");
-					VerseKey *vkey = NULL;
-					// see if we have a VerseKey * or descendant
-					SWTRY {
-						vkey = SWDYNAMIC_CAST(VerseKey, u->key);
-					}
-					SWCATCH ( ... ) {}
-					if (vkey) {
+					if (u->vkey) {
 						// leave this special osis type in for crossReference notes types?  Might thml use this some day? Doesn't hurt.
-						//buf.appendFormatted("<a href=\"noteID=%s.x.%s\"><small><sup>*x</sup></small></a> ", vkey->getText(), footnoteNumber.c_str());
+						//buf.appendFormatted("<a href=\"noteID=%s.x.%s\"><small><sup>*x</sup></small></a> ", u->vkey->getText(), footnoteNumber.c_str());
 						buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=x&value=%s&module=%s&passage=%s\"><small><sup class=\"x\">*x%s</sup></small></a>",
 							URL::encode(footnoteNumber.c_str()).c_str(), 
 							URL::encode(u->version.c_str()).c_str(),
-							URL::encode(vkey->getText()).c_str(), 
+							URL::encode(u->vkey->getText()).c_str(), 
 							(renderNoteNumbers ? noteName.c_str() : ""));
 					}
 				}
@@ -298,19 +287,19 @@
 			}
 		}
 		else if (tag.getName() && !strcmp(tag.getName(), "div")) {
-			if (tag.isEndTag() && u->SecHead) {
+			if (tag.isEndTag() && u->secHeadLevel) {
 				buf += "</h";
-				buf += u->SecHead;
+				buf += u->secHeadLevel;
 				buf += ">";
-				u->SecHead = false;
+				u->secHeadLevel = 0;
 			}
 			else if (tag.getAttribute("class")) {
 				if (!stricmp(tag.getAttribute("class"), "sechead")) {
-					u->SecHead = '3';
+					u->secHeadLevel = '3';
 					buf += "<h3>";
 				}
 				else if (!stricmp(tag.getAttribute("class"), "title")) {
-					u->SecHead = '2';
+					u->secHeadLevel = '2';
 					buf += "<h2>";
 				}
 				else {

Modified: branches/sword-1-8-x/tests/osistest.cpp
===================================================================
--- branches/sword-1-8-x/tests/osistest.cpp	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/tests/osistest.cpp	2017-12-10 05:11:38 UTC (rev 3548)
@@ -76,6 +76,9 @@
 	module->setKey("Ps.3.1");
 	outputCurrentVerse(module);
 
+	module->setKey("Matt.2.6");
+	outputCurrentVerse(module);
+
 	module->setKey("Mark.1.14");
 	outputCurrentVerse(module);
 

Modified: branches/sword-1-8-x/tests/testsuite/osisReference.xml
===================================================================
--- branches/sword-1-8-x/tests/testsuite/osisReference.xml	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/tests/testsuite/osisReference.xml	2017-12-10 05:11:38 UTC (rev 3548)
@@ -141,6 +141,16 @@
 </div>
 <div type="bookGroup">
  <title>New Testament</title>
+ <div type="book" osisID="Matt">
+  <chapter osisID="Matt.2"/>
+   <verse osisID="Matt.2.5">
+    <w lemma="strong:G3004">They said</w> to him, <q level="1" marker="“" sID="q.5787"/><note n="A" osisID="Matt.2.5.xref.A" type="crossReference"><reference osisRef="John.7.42">John 7:42</reference></note><w lemma="strong:G965">In Bethlehem</w> <w lemma="strong:G2453">of Judea</w>; <w lemma="strong:G3779">for this</w> <w lemma="strong:G3704">is what</w> <w lemma="strong:G1125">has been written</w> <note n="1" osisID="Matt.2.5.note.1" type="explanation">Or <hi type="italic">through</hi></note><w lemma="strong:G4396">by the prophet</w>:
+   </verse>
+   <verse osisID="Matt.2.6">
+    <lg sID="lg.300"/><l sID="l.20649"/><q level="2" marker="‘" sID="q.5788"/><note n="A" osisID="Matt.2.6.xref.A" type="crossReference"><reference osisRef="Mic.5.2">Mic 5:2</reference>; <reference osisRef="John.7.42">John 7:42</reference></note><hi type="small-caps"><w lemma="strong:G965">And you, Bethlehem</w>, <w lemma="strong:G1093">land</w> <w lemma="strong:G2455">of Judah</w></hi>, <l eID="l.20649"/><l sID="l.20650"/><hi type="small-caps"><w lemma="strong:G3760">Are by no</w> <w lemma="strong:G3760">means</w> <w lemma="strong:G1646">least</w> <w lemma="strong:G1722">among</w> <w lemma="strong:G2233">the leaders</w> <w lemma="strong:G2455">of Judah</w></hi>; <l eID="l.20650"/><l sID="l.20651"/><hi type="small-caps"><w lemma="strong:G1831">For out of you shall come</w> <w lemma="strong:G1831">forth</w> <w lemma="strong:G2233">a Ruler</w></hi> <l eID="l.20651"/><l sID="l.20652"/><hi type="small-caps"><w lemma="strong:G3748">Who</w> will</hi> <note n="B" osisID="Matt.2.6.xref.B" type="crossReference"><reference osisRef="John.21.16">John 21:16</reference></note><hi type="small-caps"><w lemma="strong:G4165">shepherd</w> <w lemma="strong:G2992">My people</w> <w lemma="strong:G2474">Israel</w></hi>.<q eID="q.5788" level="2" marker="’"/><q eID="q.5787" level="1" marker="”"/>  <lb type="x-end-paragraph"/>
+   </verse>
+  </chapter>
+ </div>
  <div type="book" osisID="Mark">
   <title type="main">THE GOSPEL ACCORDING TO <abbr expansion="Saint">ST.</abbr> MARK</title>
   <chapter sID="Mark.1" osisID="Mark.1"/>

Modified: branches/sword-1-8-x/tests/testsuite/osis_basic.good
===================================================================
--- branches/sword-1-8-x/tests/testsuite/osis_basic.good	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/tests/testsuite/osis_basic.good	2017-12-10 05:11:38 UTC (rev 3548)
@@ -15,24 +15,25 @@
 CSS:
 		.divineName { font-variant: small-caps; }
 		.wordsOfJesus { color: red; }
-		.transChange { font-style: italic;}
-		.transChange.transChange-supplied { font-style: italic;}
-		.transChange.transChange-added { font-style: italic;}
-		.transChange.transChange-tenseChange::before { content: '*';}
-		.transChange:lang(zh) { font-style: normal; text-decoration : dotted underline;}
-		.overline        { text-decoration: overline; }
-		.indent1         { margin-left: 10px }
-		.indent2         { margin-left: 20px }
-		.indent3         { margin-left: 30px }
-		.indent4         { margin-left: 40px }
-		abbr { &:hover{ &:before{ content: attr(title) } } }
+		.transChange { font-style: italic; }
+		.transChange.transChange-supplied { font-style: italic; }
+		.transChange.transChange-added { font-style: italic; }
+		.transChange.transChange-tenseChange::before { content: '*'; }
+		.transChange.transChange-tenseChange { font-style: normal; }
+		.transChange:lang(zh) { font-style: normal; text-decoration: dotted underline; }
+		.overline { text-decoration: overline; }
+		.indent1 { margin-left: 1em; }
+		.indent2 { margin-left: 2em; }
+		.indent3 { margin-left: 3em; }
+		.indent4 { margin-left: 4em; }
+		abbr { &:hover{ &:before{ content: attr(title); } } }
 		.small-caps { font-variant: small-caps; }
 		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
 		.acrostic { text-align: center; }
-		.colophon {font-style: italic; font-size=small; display:block;}
-		.rdg { font-style: italic;}
-		.catchWord {font-style: bold;}
-		.x-p-indent {text-indent: 10px;}
+		.colophon {font-style: italic; font-size: small; display: block; }
+		.rdg { font-style: italic; }
+		.catchWord {font-style: bold; }
+		.x-p-indent {text-indent: 1em; }
 	
 -------
 RenderText:
@@ -43,11 +44,55 @@
 -------
 
 Key:
+Matthew 2:6
+-------
+Preverse Header 0:
+Raw:
+
+
+-------
+Rendered Header:
+
+-------
+CSS:
+		.divineName { font-variant: small-caps; }
+		.wordsOfJesus { color: red; }
+		.transChange { font-style: italic; }
+		.transChange.transChange-supplied { font-style: italic; }
+		.transChange.transChange-added { font-style: italic; }
+		.transChange.transChange-tenseChange::before { content: '*'; }
+		.transChange.transChange-tenseChange { font-style: normal; }
+		.transChange:lang(zh) { font-style: normal; text-decoration: dotted underline; }
+		.overline { text-decoration: overline; }
+		.indent1 { margin-left: 1em; }
+		.indent2 { margin-left: 2em; }
+		.indent3 { margin-left: 3em; }
+		.indent4 { margin-left: 4em; }
+		abbr { &:hover{ &:before{ content: attr(title); } } }
+		.small-caps { font-variant: small-caps; }
+		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
+		.acrostic { text-align: center; }
+		.colophon {font-style: italic; font-size: small; display: block; }
+		.rdg { font-style: italic; }
+		.catchWord {font-style: bold; }
+		.x-p-indent {text-indent: 1em; }
+	
+-------
+RenderText:
+<span class="line indent0">‘<a class=" crossReference" href="passagestudy.jsp?action=showNote&type=x&value=1&module=OSISReference&passage=Matthew+2%3A6"><small><sup class="x">*x</sup></small></a><span class="small-caps">And you, Bethlehem, land of Judah</span>, </span><br />
+<span class="line indent0"><span class="small-caps">Are by no means least among the leaders of Judah</span>; </span><br />
+<span class="line indent0"><span class="small-caps">For out of you shall come forth a Ruler</span> </span><br />
+<span class="line indent0"><span class="small-caps">Who will</span> <a class=" crossReference" href="passagestudy.jsp?action=showNote&type=x&value=2&module=OSISReference&passage=Matthew+2%3A6"><small><sup class="x">*x</sup></small></a><span class="small-caps">shepherd My people Israel</span>.’” <br />
+  
+-------
+-------
+
+Key:
 Mark 1:14
 -------
 Preverse Header 0:
 Raw:
-<div sID="gen22" type="section"/> <title>The Beginning of the Ministry of Jesus</title> <title type="parallel">(<reference osisRef="Matt.4.12-Matt.4.22">Matt 4:12–22</reference>; <reference osisRef="Luke.4.14">Luke 4:14</reference>, <reference osisRef="Luke.4.15">15</reference>; <reference osisRef="Luke.5.1-Luke.5.11">5:1-11</reference>) </title> <div sID="gen23" type="x-p"/> 
+<div sID="gen25" type="section"/> <title>The Beginning of the Ministry of Jesus</title> <title type="parallel">(<reference osisRef="Matt.4.12-Matt.4.22">Matt 4:12–22</reference>; <reference osisRef="Luke.4.14">Luke 4:14</reference>, <reference osisRef="Luke.4.15">15</reference>; <reference osisRef="Luke.5.1-Luke.5.11">5:1-11</reference>) </title> <div sID="gen26" type="x-p"/> 
 -------
 Rendered Header:
  <h3 class="title">The Beginning of the Ministry of Jesus</h3>
@@ -60,24 +105,25 @@
 CSS:
 		.divineName { font-variant: small-caps; }
 		.wordsOfJesus { color: red; }
-		.transChange { font-style: italic;}
-		.transChange.transChange-supplied { font-style: italic;}
-		.transChange.transChange-added { font-style: italic;}
-		.transChange.transChange-tenseChange::before { content: '*';}
-		.transChange:lang(zh) { font-style: normal; text-decoration : dotted underline;}
-		.overline        { text-decoration: overline; }
-		.indent1         { margin-left: 10px }
-		.indent2         { margin-left: 20px }
-		.indent3         { margin-left: 30px }
-		.indent4         { margin-left: 40px }
-		abbr { &:hover{ &:before{ content: attr(title) } } }
+		.transChange { font-style: italic; }
+		.transChange.transChange-supplied { font-style: italic; }
+		.transChange.transChange-added { font-style: italic; }
+		.transChange.transChange-tenseChange::before { content: '*'; }
+		.transChange.transChange-tenseChange { font-style: normal; }
+		.transChange:lang(zh) { font-style: normal; text-decoration: dotted underline; }
+		.overline { text-decoration: overline; }
+		.indent1 { margin-left: 1em; }
+		.indent2 { margin-left: 2em; }
+		.indent3 { margin-left: 3em; }
+		.indent4 { margin-left: 4em; }
+		abbr { &:hover{ &:before{ content: attr(title); } } }
 		.small-caps { font-variant: small-caps; }
 		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
 		.acrostic { text-align: center; }
-		.colophon {font-style: italic; font-size=small; display:block;}
-		.rdg { font-style: italic;}
-		.catchWord {font-style: bold;}
-		.x-p-indent {text-indent: 10px;}
+		.colophon {font-style: italic; font-size: small; display: block; }
+		.rdg { font-style: italic; }
+		.catchWord {font-style: bold; }
+		.x-p-indent {text-indent: 1em; }
 	
 -------
 RenderText:

Modified: branches/sword-1-8-x/tests/testsuite/osis_mod2zmod.good
===================================================================
--- branches/sword-1-8-x/tests/testsuite/osis_mod2zmod.good	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/tests/testsuite/osis_mod2zmod.good	2017-12-10 05:11:38 UTC (rev 3548)
@@ -15,24 +15,25 @@
 CSS:
 		.divineName { font-variant: small-caps; }
 		.wordsOfJesus { color: red; }
-		.transChange { font-style: italic;}
-		.transChange.transChange-supplied { font-style: italic;}
-		.transChange.transChange-added { font-style: italic;}
-		.transChange.transChange-tenseChange::before { content: '*';}
-		.transChange:lang(zh) { font-style: normal; text-decoration : dotted underline;}
-		.overline        { text-decoration: overline; }
-		.indent1         { margin-left: 10px }
-		.indent2         { margin-left: 20px }
-		.indent3         { margin-left: 30px }
-		.indent4         { margin-left: 40px }
-		abbr { &:hover{ &:before{ content: attr(title) } } }
+		.transChange { font-style: italic; }
+		.transChange.transChange-supplied { font-style: italic; }
+		.transChange.transChange-added { font-style: italic; }
+		.transChange.transChange-tenseChange::before { content: '*'; }
+		.transChange.transChange-tenseChange { font-style: normal; }
+		.transChange:lang(zh) { font-style: normal; text-decoration: dotted underline; }
+		.overline { text-decoration: overline; }
+		.indent1 { margin-left: 1em; }
+		.indent2 { margin-left: 2em; }
+		.indent3 { margin-left: 3em; }
+		.indent4 { margin-left: 4em; }
+		abbr { &:hover{ &:before{ content: attr(title); } } }
 		.small-caps { font-variant: small-caps; }
 		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
 		.acrostic { text-align: center; }
-		.colophon {font-style: italic; font-size=small; display:block;}
-		.rdg { font-style: italic;}
-		.catchWord {font-style: bold;}
-		.x-p-indent {text-indent: 10px;}
+		.colophon {font-style: italic; font-size: small; display: block; }
+		.rdg { font-style: italic; }
+		.catchWord {font-style: bold; }
+		.x-p-indent {text-indent: 1em; }
 	
 -------
 RenderText:
@@ -43,11 +44,55 @@
 -------
 
 Key:
+Matthew 2:6
+-------
+Preverse Header 0:
+Raw:
+<br />
+
+-------
+Rendered Header:
+<br/> 
+-------
+CSS:
+		.divineName { font-variant: small-caps; }
+		.wordsOfJesus { color: red; }
+		.transChange { font-style: italic; }
+		.transChange.transChange-supplied { font-style: italic; }
+		.transChange.transChange-added { font-style: italic; }
+		.transChange.transChange-tenseChange::before { content: '*'; }
+		.transChange.transChange-tenseChange { font-style: normal; }
+		.transChange:lang(zh) { font-style: normal; text-decoration: dotted underline; }
+		.overline { text-decoration: overline; }
+		.indent1 { margin-left: 1em; }
+		.indent2 { margin-left: 2em; }
+		.indent3 { margin-left: 3em; }
+		.indent4 { margin-left: 4em; }
+		abbr { &:hover{ &:before{ content: attr(title); } } }
+		.small-caps { font-variant: small-caps; }
+		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
+		.acrostic { text-align: center; }
+		.colophon {font-style: italic; font-size: small; display: block; }
+		.rdg { font-style: italic; }
+		.catchWord {font-style: bold; }
+		.x-p-indent {text-indent: 1em; }
+	
+-------
+RenderText:
+<span class="line indent0">‘<a class=" crossReference" href="passagestudy.jsp?action=showNote&type=x&value=1&module=zOSISReference&passage=Matthew+2%3A6"><small><sup class="x">*x</sup></small></a><span class="small-caps">And you, Bethlehem, land of Judah</span>, </span><br />
+<span class="line indent0"><span class="small-caps">Are by no means least among the leaders of Judah</span>; </span><br />
+<span class="line indent0"><span class="small-caps">For out of you shall come forth a Ruler</span> </span><br />
+<span class="line indent0"><span class="small-caps">Who will</span> <a class=" crossReference" href="passagestudy.jsp?action=showNote&type=x&value=2&module=zOSISReference&passage=Matthew+2%3A6"><small><sup class="x">*x</sup></small></a><span class="small-caps">shepherd My people Israel</span>.’” <br />
+  
+-------
+-------
+
+Key:
 Mark 1:14
 -------
 Preverse Header 0:
 Raw:
-<div sID="gen22" type="section"/> <title>The Beginning of the Ministry of Jesus</title> <title type="parallel">(<reference osisRef="Matt.4.12-Matt.4.22">Matt 4:12–22</reference>; <reference osisRef="Luke.4.14">Luke 4:14</reference>, <reference osisRef="Luke.4.15">15</reference>; <reference osisRef="Luke.5.1-Luke.5.11">5:1-11</reference>) </title> <div sID="gen23" type="x-p"/> 
+<div sID="gen25" type="section"/> <title>The Beginning of the Ministry of Jesus</title> <title type="parallel">(<reference osisRef="Matt.4.12-Matt.4.22">Matt 4:12–22</reference>; <reference osisRef="Luke.4.14">Luke 4:14</reference>, <reference osisRef="Luke.4.15">15</reference>; <reference osisRef="Luke.5.1-Luke.5.11">5:1-11</reference>) </title> <div sID="gen26" type="x-p"/> 
 -------
 Rendered Header:
  <h3 class="title">The Beginning of the Ministry of Jesus</h3>
@@ -60,24 +105,25 @@
 CSS:
 		.divineName { font-variant: small-caps; }
 		.wordsOfJesus { color: red; }
-		.transChange { font-style: italic;}
-		.transChange.transChange-supplied { font-style: italic;}
-		.transChange.transChange-added { font-style: italic;}
-		.transChange.transChange-tenseChange::before { content: '*';}
-		.transChange:lang(zh) { font-style: normal; text-decoration : dotted underline;}
-		.overline        { text-decoration: overline; }
-		.indent1         { margin-left: 10px }
-		.indent2         { margin-left: 20px }
-		.indent3         { margin-left: 30px }
-		.indent4         { margin-left: 40px }
-		abbr { &:hover{ &:before{ content: attr(title) } } }
+		.transChange { font-style: italic; }
+		.transChange.transChange-supplied { font-style: italic; }
+		.transChange.transChange-added { font-style: italic; }
+		.transChange.transChange-tenseChange::before { content: '*'; }
+		.transChange.transChange-tenseChange { font-style: normal; }
+		.transChange:lang(zh) { font-style: normal; text-decoration: dotted underline; }
+		.overline { text-decoration: overline; }
+		.indent1 { margin-left: 1em; }
+		.indent2 { margin-left: 2em; }
+		.indent3 { margin-left: 3em; }
+		.indent4 { margin-left: 4em; }
+		abbr { &:hover{ &:before{ content: attr(title); } } }
 		.small-caps { font-variant: small-caps; }
 		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
 		.acrostic { text-align: center; }
-		.colophon {font-style: italic; font-size=small; display:block;}
-		.rdg { font-style: italic;}
-		.catchWord {font-style: bold;}
-		.x-p-indent {text-indent: 10px;}
+		.colophon {font-style: italic; font-size: small; display: block; }
+		.rdg { font-style: italic; }
+		.catchWord {font-style: bold; }
+		.x-p-indent {text-indent: 1em; }
 	
 -------
 RenderText:

Modified: branches/sword-1-8-x/tests/testsuite/osis_mod2zmod.sh
===================================================================
--- branches/sword-1-8-x/tests/testsuite/osis_mod2zmod.sh	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/tests/testsuite/osis_mod2zmod.sh	2017-12-10 05:11:38 UTC (rev 3548)
@@ -47,7 +47,7 @@
 
 ../../utilities/osis2mod tmp/osis_mod2zmod/modules/ osisReference.xml 2>&1 | grep -v \$Rev
 
-cp osis_basic.good osis_mod2zmod.good
+sed 's/OSISReference/zOSISReference/' osis_basic.good > osis_mod2zmod.good
 cd tmp/osis_mod2zmod
 ../../../../utilities/mod2zmod OSISReference zmodules/ 4 2 0 abc123 > /dev/null 2>&1
 ../../../osistest zOSISReference

Modified: branches/sword-1-8-x/tests/testsuite/osis_osis2modcipher.good
===================================================================
--- branches/sword-1-8-x/tests/testsuite/osis_osis2modcipher.good	2017-12-10 05:06:48 UTC (rev 3547)
+++ branches/sword-1-8-x/tests/testsuite/osis_osis2modcipher.good	2017-12-10 05:11:38 UTC (rev 3548)
@@ -15,24 +15,25 @@
 CSS:
 		.divineName { font-variant: small-caps; }
 		.wordsOfJesus { color: red; }
-		.transChange { font-style: italic;}
-		.transChange.transChange-supplied { font-style: italic;}
-		.transChange.transChange-added { font-style: italic;}
-		.transChange.transChange-tenseChange::before { content: '*';}
-		.transChange:lang(zh) { font-style: normal; text-decoration : dotted underline;}
-		.overline        { text-decoration: overline; }
-		.indent1         { margin-left: 10px }
-		.indent2         { margin-left: 20px }
-		.indent3         { margin-left: 30px }
-		.indent4         { margin-left: 40px }
-		abbr { &:hover{ &:before{ content: attr(title) } } }
+		.transChange { font-style: italic; }
+		.transChange.transChange-supplied { font-style: italic; }
+		.transChange.transChange-added { font-style: italic; }
+		.transChange.transChange-tenseChange::before { content: '*'; }
+		.transChange.transChange-tenseChange { font-style: normal; }
+		.transChange:lang(zh) { font-style: normal; text-decoration: dotted underline; }
+		.overline { text-decoration: overline; }
+		.indent1 { margin-left: 1em; }
+		.indent2 { margin-left: 2em; }
+		.indent3 { margin-left: 3em; }
+		.indent4 { margin-left: 4em; }
+		abbr { &:hover{ &:before{ content: attr(title); } } }
 		.small-caps { font-variant: small-caps; }
 		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
 		.acrostic { text-align: center; }
-		.colophon {font-style: italic; font-size=small; display:block;}
-		.rdg { font-style: italic;}
-		.catchWord {font-style: bold;}
-		.x-p-indent {text-indent: 10px;}
+		.colophon {font-style: italic; font-size: small; display: block; }
+		.rdg { font-style: italic; }
+		.catchWord {font-style: bold; }
+		.x-p-indent {text-indent: 1em; }
 	
 -------
 RenderText:
@@ -43,11 +44,55 @@
 -------
 
 Key:
+Matthew 2:6
+-------
+Preverse Header 0:
+Raw:
+<br />
+
+-------
+Rendered Header:
+<br/> 
+-------
+CSS:
+		.divineName { font-variant: small-caps; }
+		.wordsOfJesus { color: red; }
+		.transChange { font-style: italic; }
+		.transChange.transChange-supplied { font-style: italic; }
+		.transChange.transChange-added { font-style: italic; }
+		.transChange.transChange-tenseChange::before { content: '*'; }
+		.transChange.transChange-tenseChange { font-style: normal; }
+		.transChange:lang(zh) { font-style: normal; text-decoration: dotted underline; }
+		.overline { text-decoration: overline; }
+		.indent1 { margin-left: 1em; }
+		.indent2 { margin-left: 2em; }
+		.indent3 { margin-left: 3em; }
+		.indent4 { margin-left: 4em; }
+		abbr { &:hover{ &:before{ content: attr(title); } } }
+		.small-caps { font-variant: small-caps; }
+		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
+		.acrostic { text-align: center; }
+		.colophon {font-style: italic; font-size: small; display: block; }
+		.rdg { font-style: italic; }
+		.catchWord {font-style: bold; }
+		.x-p-indent {text-indent: 1em; }
+	
+-------
+RenderText:
+<span class="line indent0">‘<a class=" crossReference" href="passagestudy.jsp?action=showNote&type=x&value=1&module=OSISReference&passage=Matthew+2%3A6"><small><sup class="x">*x</sup></small></a><span class="small-caps">And you, Bethlehem, land of Judah</span>, </span><br />
+<span class="line indent0"><span class="small-caps">Are by no means least among the leaders of Judah</span>; </span><br />
+<span class="line indent0"><span class="small-caps">For out of you shall come forth a Ruler</span> </span><br />
+<span class="line indent0"><span class="small-caps">Who will</span> <a class=" crossReference" href="passagestudy.jsp?action=showNote&type=x&value=2&module=OSISReference&passage=Matthew+2%3A6"><small><sup class="x">*x</sup></small></a><span class="small-caps">shepherd My people Israel</span>.’” <br />
+  
+-------
+-------
+
+Key:
 Mark 1:14
 -------
 Preverse Header 0:
 Raw:
-<div sID="gen22" type="section"/> <title>The Beginning of the Ministry of Jesus</title> <title type="parallel">(<reference osisRef="Matt.4.12-Matt.4.22">Matt 4:12–22</reference>; <reference osisRef="Luke.4.14">Luke 4:14</reference>, <reference osisRef="Luke.4.15">15</reference>; <reference osisRef="Luke.5.1-Luke.5.11">5:1-11</reference>) </title> <div sID="gen23" type="x-p"/> 
+<div sID="gen25" type="section"/> <title>The Beginning of the Ministry of Jesus</title> <title type="parallel">(<reference osisRef="Matt.4.12-Matt.4.22">Matt 4:12–22</reference>; <reference osisRef="Luke.4.14">Luke 4:14</reference>, <reference osisRef="Luke.4.15">15</reference>; <reference osisRef="Luke.5.1-Luke.5.11">5:1-11</reference>) </title> <div sID="gen26" type="x-p"/> 
 -------
 Rendered Header:
  <h3 class="title">The Beginning of the Ministry of Jesus</h3>
@@ -60,24 +105,25 @@
 CSS:
 		.divineName { font-variant: small-caps; }
 		.wordsOfJesus { color: red; }
-		.transChange { font-style: italic;}
-		.transChange.transChange-supplied { font-style: italic;}
-		.transChange.transChange-added { font-style: italic;}
-		.transChange.transChange-tenseChange::before { content: '*';}
-		.transChange:lang(zh) { font-style: normal; text-decoration : dotted underline;}
-		.overline        { text-decoration: overline; }
-		.indent1         { margin-left: 10px }
-		.indent2         { margin-left: 20px }
-		.indent3         { margin-left: 30px }
-		.indent4         { margin-left: 40px }
-		abbr { &:hover{ &:before{ content: attr(title) } } }
+		.transChange { font-style: italic; }
+		.transChange.transChange-supplied { font-style: italic; }
+		.transChange.transChange-added { font-style: italic; }
+		.transChange.transChange-tenseChange::before { content: '*'; }
+		.transChange.transChange-tenseChange { font-style: normal; }
+		.transChange:lang(zh) { font-style: normal; text-decoration: dotted underline; }
+		.overline { text-decoration: overline; }
+		.indent1 { margin-left: 1em; }
+		.indent2 { margin-left: 2em; }
+		.indent3 { margin-left: 3em; }
+		.indent4 { margin-left: 4em; }
+		abbr { &:hover{ &:before{ content: attr(title); } } }
 		.small-caps { font-variant: small-caps; }
 		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
 		.acrostic { text-align: center; }
-		.colophon {font-style: italic; font-size=small; display:block;}
-		.rdg { font-style: italic;}
-		.catchWord {font-style: bold;}
-		.x-p-indent {text-indent: 10px;}
+		.colophon {font-style: italic; font-size: small; display: block; }
+		.rdg { font-style: italic; }
+		.catchWord {font-style: bold; }
+		.x-p-indent {text-indent: 1em; }
 	
 -------
 RenderText:




More information about the sword-cvs mailing list