[sword-svn] r424 - trunk/webapp
scribe at crosswire.org
scribe at crosswire.org
Thu May 28 17:07:58 MST 2015
Author: scribe
Date: 2015-05-28 17:07:58 -0700 (Thu, 28 May 2015)
New Revision: 424
Modified:
trunk/webapp/fetchdata.jsp
trunk/webapp/simplegadget.jsp
Log:
fixed proper XML when TEI output and range is non-contiguous
added coptic webfont
Modified: trunk/webapp/fetchdata.jsp
===================================================================
--- trunk/webapp/fetchdata.jsp 2015-05-18 14:43:59 UTC (rev 423)
+++ trunk/webapp/fetchdata.jsp 2015-05-29 00:07:58 UTC (rev 424)
@@ -28,6 +28,11 @@
mgr.setGlobalOption("Footnotes", "Off");
mgr.setGlobalOption("Cross-references", "Off");
+ String inTestament = null;
+ String inBook = null;
+ String inChapter = null;
+ String inVerse = null;
+
if ("plain".equals(format)) {
mgr.setGlobalOption("Strong's Numbers", "Off");
mgr.setGlobalOption("Morphological Tags", "Off");
@@ -198,8 +203,6 @@
response.setContentType("text/xml");
%>
<TEI>
-<div type="book" n="B<%= String.format("%02d", Integer.parseInt(book.getKeyChildren()[VERSEKEY_BOOK])) %>" part="<%= ("1".equals(book.getKeyChildren()[VERSEKEY_CHAPTER]))&&("1".equals(book.getKeyChildren()[VERSEKEY_VERSE]))?"I":"Y"%>">
-<div type="chapter" n="B<%= String.format("%02d", Integer.parseInt(book.getKeyChildren()[VERSEKEY_BOOK])) %>K<%= book.getKeyChildren()[VERSEKEY_CHAPTER] %>" part="<%= ("1".equals(book.getKeyChildren()[VERSEKEY_VERSE]))?"I":"Y"%>" >
<%
}
for (int k = 0; k < keyList.length; ++k) {
@@ -249,43 +252,48 @@
// ----- header for trier tinymce editor ------
if ("tei".equals(format)) {
- if (k > 0 && "1".equals(book.getKeyChildren()[VERSEKEY_VERSE])) {
- if ("1".equals(book.getKeyChildren()[VERSEKEY_CHAPTER])) {
+ if (inChapter != null && (!book.getKeyChildren()[VERSEKEY_CHAPTER].equals(inChapter) || !book.getKeyChildren()[VERSEKEY_BOOK].equals(inBook))) {
%>
+</div>
+<%
+ }
+ if (inBook != null && !book.getKeyChildren()[VERSEKEY_BOOK].equals(inBook)) {
+%>
+</div>
+<%
+ }
+ if (!book.getKeyChildren()[VERSEKEY_BOOK].equals(inBook)) {
+%>
<div type="book" n="B<%= String.format("%02d", Integer.parseInt(book.getKeyChildren()[VERSEKEY_BOOK])) %>">
<%
- }
+ }
+ if (!book.getKeyChildren()[VERSEKEY_CHAPTER].equals(inChapter) || !book.getKeyChildren()[VERSEKEY_BOOK].equals(inBook)) {
%>
<div type="chapter" n="B<%= String.format("%02d", Integer.parseInt(book.getKeyChildren()[VERSEKEY_BOOK])) %>K<%= book.getKeyChildren()[VERSEKEY_CHAPTER] %>">
<%
}
+ inChapter = book.getKeyChildren()[VERSEKEY_CHAPTER];
+ inBook = book.getKeyChildren()[VERSEKEY_BOOK];
%>
<ab n="B<%= String.format("%02d", Integer.parseInt(book.getKeyChildren()[VERSEKEY_BOOK])) %>K<%= book.getKeyChildren()[VERSEKEY_CHAPTER] %>V<%= book.getKeyChildren()[VERSEKEY_VERSE] %>">
<%
}
// --------------------------------------------
+ if ("WLC".equals(modName) || "LXX".equals(modName)) {
%>
+<%= book.getStripText() %>
+<%
+ }
+ else {
+%>
<%= book.getRawEntry() %>
<%
+ }
// ----- header for trier tinymce editor ------
if ("tei".equals(format)) {
%>
</ab>
<%
- // if last verse of chapter
- if (k < keyList.length-1 && book.getKeyChildren()[VERSEKEY_VERSEMAX].equals(book.getKeyChildren()[VERSEKEY_VERSE])) {
-System.out.println("ending chapter");
-%>
-</div>
-<%
- // if last chapter of book
- if (k < keyList.length-1 && book.getKeyChildren()[VERSEKEY_CHAPTERMAX].equals(book.getKeyChildren()[VERSEKEY_CHAPTER])) {
-System.out.println("ending book");
-%>
-</div>
-<%
- }
- }
}
// --------------------------------------------
}
Modified: trunk/webapp/simplegadget.jsp
===================================================================
--- trunk/webapp/simplegadget.jsp 2015-05-18 14:43:59 UTC (rev 423)
+++ trunk/webapp/simplegadget.jsp 2015-05-29 00:07:58 UTC (rev 424)
@@ -83,6 +83,17 @@
</script>
<style>
+ at font-face {
+ font-family: 'AntinoouWeb';
+ src: url('fonts/antinoou-webfont.eot');
+ src: url('fonts/antinoou-webfont.eot?#iefix') format('embedded-opentype'),
+ url('fonts/antinoou-webfont.woff') format('woff'),
+ url('fonts/antinoou-webfont.ttf') format('truetype');
+ font-weight: normal;
+ font-style: normal;
+}
+
+
.currentWord {
color : red;
cursor : pointer;
More information about the sword-cvs
mailing list