[sword-cvs] sword/utilities mod2osis.cpp,1.9,1.10 osis2mod.cpp,1.5,1.6
sword@www.crosswire.org
sword@www.crosswire.org
Thu, 20 Nov 2003 06:53:49 -0700
- Previous message: [sword-cvs] swordweb index.jsp,1.26,1.27
- Next message: [sword-cvs] swordweb fulllibrary.jsp,1.14,1.15 parallelstudy.jsp,1.26,1.27 parchment.css,1.14,1.15 passagestudy.jsp,1.30,1.31 sandy.css,1.8,1.9 wash.css,1.37,1.38
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/local/cvsroot/sword/utilities
In directory www:/tmp/cvs-serv24370
Modified Files:
mod2osis.cpp osis2mod.cpp
Log Message:
Index: mod2osis.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/utilities/mod2osis.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- mod2osis.cpp 5 Jul 2003 04:58:42 -0000 1.9
+++ mod2osis.cpp 20 Nov 2003 13:53:47 -0000 1.10
@@ -1,5 +1,5 @@
-// Compression on variable granularity
-
#include <fcntl.h>
+// Compression on variable granularity
+#include <fcntl.h>
#include <iostream>
#include <fstream>
#include <string>
@@ -140,7 +140,7 @@
if ((vkey->Testament() != lastTest)) {
if (openchap)
- cout << "\t</div>\n";
+ cout << "\t</chapter>\n";
if (openbook)
cout << "\t</div>\n";
if (opentest)
@@ -152,7 +152,7 @@
if ((vkey->Book() != lastBook) || newTest) {
if (!newTest) {
if (openchap)
- cout << "\t</div>\n";
+ cout << "\t</chapter>\n";
if (openbook)
cout << "\t</div>\n";
}
@@ -171,13 +171,13 @@
if ((vkey->Chapter() != lastChap) || newBook) {
if (!newBook) {
if (openchap)
- cout << "\t</div>\n";
+ cout << "\t</chapter>\n";
}
buf = new char [205];
*buf = 0;
tmpKey = *vkey;
tmpKey.Verse(0);
- sprintf(buf, "\t<div type=\"chapter\" osisID=\"%s\">\n", tmpKey.getOSISRef());
+ sprintf(buf, "\t<chapter osisID=\"%s\">\n", tmpKey.getOSISRef());
// filter.ProcessText(buf, 200 - 3, &lastHeading, inModule);
cout << "" << buf;
delete [] buf;
@@ -198,7 +198,7 @@
lastTest = vkey->Testament();
}
if (openchap)
- cout << "\t</div>\n";
+ cout << "\t</chapter>\n";
if (openbook)
cout << "\t</div>\n";
if (opentest)
Index: osis2mod.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/utilities/osis2mod.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- osis2mod.cpp 23 Jul 2003 00:57:07 -0000 1.5
+++ osis2mod.cpp 20 Nov 2003 13:53:47 -0000 1.6
@@ -116,35 +116,33 @@
lastTitle += token;
return false;
}
- if ((!strcmp(token.getName(), "div")) && (!token.isEndTag()) && (token.getAttribute("osisID"))) {
- if (!strcmp(token.getAttribute("type"), "book")) {
- if (inHeader) { // this one should never happen, but just in case
-// cout << "HEADING ";
- writeEntry(currentVerse, text);
- inHeader = false;
- }
- currentVerse = token.getAttribute("osisID");
- currentVerse.Chapter(0);
- currentVerse.Verse(0);
- inHeader = true;
- headerType = "book";
- lastTitle = "";
- text = "";
+ if (((!strcmp(token.getName(), "div")) && (!token.isEndTag()) && (token.getAttribute("osisID"))) && (!strcmp(token.getAttribute("type"), "book"))) {
+ if (inHeader) { // this one should never happen, but just in case
+// cout << "HEADING ";
+ writeEntry(currentVerse, text);
+ inHeader = false;
}
- if (!strcmp(token.getAttribute("type"), "chapter")) {
- if (inHeader) {
-// cout << "HEADING ";
- writeEntry(currentVerse, text);
- inHeader = false;
- }
-
- currentVerse = token.getAttribute("osisID");
- currentVerse.Verse(0);
- inHeader = true;
- headerType = "chap";
- lastTitle = "";
- text = "";
+ currentVerse = token.getAttribute("osisID");
+ currentVerse.Chapter(0);
+ currentVerse.Verse(0);
+ inHeader = true;
+ headerType = "book";
+ lastTitle = "";
+ text = "";
+ }
+ else if ((((!strcmp(token.getName(), "div")) && (!token.isEndTag()) && (token.getAttribute("osisID"))) && (!strcmp(token.getAttribute("type"), "chapter"))) || ((!strcmp(token.getName(), "chapter")) && (!token.isEndTag()) && (token.getAttribute("osisID")))) {
+ if (inHeader) {
+// cout << "HEADING ";
+ writeEntry(currentVerse, text);
+ inHeader = false;
}
+
+ currentVerse = token.getAttribute("osisID");
+ currentVerse.Verse(0);
+ inHeader = true;
+ headerType = "chap";
+ lastTitle = "";
+ text = "";
}
if ((!strcmp(token.getName(), "verse")) && (!token.isEndTag())) {
if (inHeader) {
- Previous message: [sword-cvs] swordweb index.jsp,1.26,1.27
- Next message: [sword-cvs] swordweb fulllibrary.jsp,1.14,1.15 parallelstudy.jsp,1.26,1.27 parchment.css,1.14,1.15 passagestudy.jsp,1.30,1.31 sandy.css,1.8,1.9 wash.css,1.37,1.38
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]