|
48
|
1 <?xml version='1.0'?>
|
|
|
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:lang="http://www.ccel.org/info/languageCodes.xml" xmlns:letter="http://www.ccel.org/alphabetLetters" xmlns:str="http://exslt.org/strings">
|
|
32
|
3 <xsl:output method="html" indent="yes" encoding="UTF-8"/>
|
|
|
4
|
|
|
5 <!--
|
|
|
6 thml.html.xsl: convert a ThML document to HTML
|
|
|
7 Special processing for Text.Dictionary, Text.Daily
|
|
|
8 First version by Jimmy Osborn 2002-summer; additional work by
|
|
|
9 Wes Morgan, Jon VanHofwegen, Brian Johnson, Harry Plantinga, Matt Johnson
|
|
|
10
|
|
|
11 Parameters it understands:
|
|
|
12 sect: In server mode,
|
|
|
13 ID of divn to return.
|
|
|
14 Actually, return the divn less contained divn elements.
|
|
|
15 If id is not of a divn, returns smallest containing divn
|
|
|
16 Special values are all, toc, about, titlepage,
|
|
|
17 today (for Text.Daily docs)
|
|
|
18 Also, if _id, it returns the element whose id is given, which
|
|
|
19 could be more or less than a section.
|
|
|
20 In desktop mode, it's blank, ain't it?
|
|
|
21 debug: 1 to turn on debugging mode
|
|
|
22 notes: foot, margin, or hidden
|
|
|
23 words: if 1, add <a id="xxx"> around words for scripting
|
|
|
24 osisRef: handle osisRef request
|
|
|
25 term: for dictionary term lookup
|
|
|
26 start: for dictionary, show terms starting with this
|
|
|
27 desktop 1 for running from CCEL-Desktop
|
|
48
|
28 bibpath relative path to bible html
|
|
32
|
29 bver single bible preference for the server
|
|
|
30 ot_bib, nt_bib, ap_bib: bible preferences
|
|
48
|
31 bcb 1 to enable bcb
|
|
32
|
32 -->
|
|
|
33
|
|
|
34 <!-- set up parameter defaults -->
|
|
|
35 <xsl:param name="sect">all</xsl:param>
|
|
|
36 <xsl:param name="debug"></xsl:param>
|
|
|
37 <xsl:param name="notes">foot</xsl:param>
|
|
|
38 <xsl:param name="words"></xsl:param>
|
|
|
39 <xsl:param name="bver">asv</xsl:param>
|
|
48
|
40 <xsl:param name="bibpath">.</xsl:param>
|
|
32
|
41 <xsl:param name="osisRef"></xsl:param>
|
|
|
42 <xsl:param name="term"></xsl:param>
|
|
|
43 <xsl:param name="start"></xsl:param>
|
|
|
44 <xsl:param name="desktop">1</xsl:param>
|
|
|
45 <xsl:param name="theText"></xsl:param>
|
|
|
46 <xsl:param name="id"></xsl:param>
|
|
|
47 <xsl:param name="word">0</xsl:param>
|
|
|
48 <xsl:param name="ot_bib"><xsl:choose>
|
|
|
49 <xsl:when test="$bver"><xsl:value-of select="$bver"/></xsl:when>
|
|
|
50 <xsl:otherwise>web</xsl:otherwise>
|
|
|
51 </xsl:choose></xsl:param>
|
|
|
52 <xsl:param name="nt_bib"><xsl:choose>
|
|
|
53 <xsl:when test="$bver"><xsl:value-of select="$bver"/></xsl:when>
|
|
|
54 <xsl:otherwise>web</xsl:otherwise>
|
|
|
55 </xsl:choose></xsl:param>
|
|
|
56 <xsl:param name="ap_bib"><xsl:choose>
|
|
|
57 <xsl:when test="$bver"><xsl:value-of select="$bver"/></xsl:when>
|
|
|
58 <xsl:otherwise>kjv</xsl:otherwise>
|
|
|
59 </xsl:choose></xsl:param>
|
|
48
|
60 <xsl:param name="bcb">0</xsl:param>
|
|
32
|
61
|
|
|
62 <!-- myNotes is what we should do with notes, whether passed in by the
|
|
|
63 notes param or default (footnotes) -->
|
|
|
64 <xsl:variable name="myNotes"><xsl:choose><xsl:when test="$notes='hidden'">hidden</xsl:when><xsl:when test="$notes='margin'">margin</xsl:when><xsl:otherwise>foot</xsl:otherwise></xsl:choose></xsl:variable>
|
|
|
65
|
|
|
66 <xsl:variable name="termTrans">ABCDEFGHIJKLMNOPQRSTUVWXYZ+,;.()[]{}=</xsl:variable>
|
|
|
67
|
|
|
68 <xsl:variable name="authorID">
|
|
|
69 <xsl:choose>
|
|
|
70 <xsl:when test="/processing-instruction()[name()='thml-authorID']">
|
|
|
71 <xsl:value-of select="/processing-instruction()[name()='thml-authorID']"/>
|
|
|
72 </xsl:when>
|
|
|
73 <xsl:otherwise>
|
|
|
74 <xsl:value-of select="/ThML/ThML.head/electronicEdInfo/authorID"/>
|
|
|
75 </xsl:otherwise>
|
|
|
76 </xsl:choose>
|
|
|
77 </xsl:variable>
|
|
|
78
|
|
|
79 <xsl:variable name="bookID">
|
|
|
80 <xsl:choose>
|
|
|
81 <xsl:when test="/processing-instruction()[name()='thml-bookID']">
|
|
|
82 <xsl:value-of select="/processing-instruction()[name()='thml-bookID']"/>
|
|
|
83 </xsl:when>
|
|
|
84 <xsl:otherwise>
|
|
|
85 <xsl:value-of select="/ThML/ThML.head/electronicEdInfo/bookID"/>
|
|
|
86 </xsl:otherwise>
|
|
|
87 </xsl:choose>
|
|
|
88 </xsl:variable>
|
|
|
89
|
|
|
90 <xsl:variable name="author">
|
|
|
91 <xsl:choose>
|
|
|
92 <xsl:when test="/processing-instruction()[name()='thml-author']">
|
|
|
93 <xsl:value-of select="/processing-instruction()[name()='thml-author']"/>
|
|
|
94 </xsl:when>
|
|
|
95 <xsl:when test="/ThML/ThML.head/electronicEdInfo/DC/DC.Creator[@sub='Author' and @scheme='short-form']">
|
|
|
96 <xsl:value-of select="/ThML/ThML.head/electronicEdInfo/DC/DC.Creator[@sub='Author' and @scheme='short-form']"/>
|
|
|
97 </xsl:when>
|
|
|
98 <xsl:otherwise>
|
|
|
99 <xsl:value-of select="/ThML/ThML.head/electronicEdInfo/DC/DC.Creator[@sub='Author'
|
|
|
100 and not(@scheme)]"/>
|
|
|
101 </xsl:otherwise>
|
|
|
102 </xsl:choose>
|
|
|
103 </xsl:variable>
|
|
|
104
|
|
|
105 <xsl:variable name="title">
|
|
|
106 <xsl:choose>
|
|
|
107 <xsl:when test="/processing-instruction()[name()='thml-title']">
|
|
|
108 <xsl:value-of select="/processing-instruction()[name()='thml-title']"/>
|
|
|
109 </xsl:when>
|
|
|
110 <xsl:otherwise>
|
|
|
111 <xsl:value-of select="/ThML/ThML.head/electronicEdInfo/DC/DC.Title[not(@sub='short')]"/>
|
|
|
112 </xsl:otherwise>
|
|
|
113 </xsl:choose>
|
|
|
114 </xsl:variable>
|
|
|
115
|
|
48
|
116 <xsl:variable name="authLet" select="substring($authorID,1,1)"/>
|
|
|
117 <xsl:variable name="baseURI">/ccel/<xsl:value-of select="$authorID"/>/<xsl:value-of select="$bookID"/></xsl:variable>
|
|
|
118 <xsl:variable name="homeURI">http://www.ccel.org<xsl:value-of select="$baseURI"/></xsl:variable>
|
|
|
119 <xsl:variable name="xmlfile">http://www.ccel.org/<xsl:value-of select="$authLet"/>/<xsl:value-of select="$authorID"/>/<xsl:value-of select="$bookID"/>.xml</xsl:variable>
|
|
|
120 <xsl:variable name="homedir">http://www.ccel.org/<xsl:value-of select="$authLet"/>/<xsl:value-of select="$authorID"/>/<xsl:value-of select="$bookID"/></xsl:variable>
|
|
32
|
121
|
|
48
|
122 <xsl:param name="rootPath">/ccel/<xsl:value-of select="$authLet"/>/<xsl:value-of select="$authorID"/>/<xsl:value-of select="$bookID"/>/cache/xml/</xsl:param>
|
|
32
|
123
|
|
48
|
124 <xsl:variable name="bookInfo">bookInfo.xml</xsl:variable><!--concat('/ccel/',$authLet,'/',
|
|
|
125 $authorID, '/', $bookID, '/bookInfo.xml')-->
|
|
32
|
126
|
|
48
|
127 <xsl:variable name="ccsubj" select="/ThML/ThML.head/electronicEdInfo/DC/DC.Subject[@scheme='ccel']"/>
|
|
32
|
128
|
|
|
129 <!-- headtitle is used on left side of navbar -->
|
|
48
|
130 <xsl:variable name="shorttitle" select="/ThML/ThML.head/electronicEdInfo/DC/DC.Title[@sub='short']"/>
|
|
32
|
131 <xsl:variable name="headtitle"><xsl:choose><xsl:when test="$shorttitle"><xsl:value-of select="$shorttitle"/></xsl:when><xsl:otherwise><xsl:value-of select="$title"/></xsl:otherwise></xsl:choose></xsl:variable>
|
|
|
132 <xsl:variable name="titlepage" select="/ThML/ThML.body/div1[1]"/>
|
|
|
133 <xsl:variable name="titlepageID" select="$titlepage/@id"/>
|
|
|
134 <xsl:param name="progress">0%</xsl:param>
|
|
|
135
|
|
|
136 <!-- this is the ID of the requested element. -->
|
|
|
137 <xsl:variable name="mySectID">
|
|
|
138 <xsl:choose>
|
|
|
139 <xsl:when test="$osisRef != ''">
|
|
|
140 <xsl:value-of select="$osisRef"/>
|
|
|
141 </xsl:when>
|
|
|
142 <xsl:when test="$sect='titlepage'">
|
|
|
143 <xsl:value-of select="/ThML/ThML.body/div1[1]/@id"/>
|
|
|
144 </xsl:when>
|
|
|
145 <xsl:when test="substring($sect,1,1)='_'">
|
|
|
146 <xsl:value-of select="substring($sect,2)"/>
|
|
|
147 </xsl:when>
|
|
|
148 <xsl:when test="/processing-instruction()[name()='thml-sect']">
|
|
|
149 <xsl:value-of select="/processing-instruction()[name()='thml-sect']"/>
|
|
|
150 </xsl:when>
|
|
|
151 <xsl:otherwise>
|
|
|
152 <xsl:value-of select="$sect"/>
|
|
|
153 </xsl:otherwise>
|
|
|
154 </xsl:choose>
|
|
|
155 </xsl:variable>
|
|
|
156
|
|
|
157
|
|
|
158 <xsl:variable name="theElt" select="/ThML/ThML.body//*[@id = $mySectID]"/>
|
|
|
159
|
|
|
160 <!-- this is the ID of the sect (divn) containing the requested element -->
|
|
|
161 <xsl:variable name="theDivID">
|
|
|
162 <xsl:choose>
|
|
|
163 <xsl:when test="$sect='all'"></xsl:when>
|
|
|
164 <xsl:when test="$theElt[name()='div1'] or $theElt[name()='div2'] or
|
|
|
165 $theElt[name()='div3'] or $theElt[name()='div4'] or
|
|
|
166 $theElt[name()='div5']">
|
|
|
167 <xsl:value-of select="$mySectID"/>
|
|
|
168 </xsl:when>
|
|
|
169 <xsl:otherwise>
|
|
|
170 <xsl:value-of select="$theElt/ancestor::div5/@id|$theElt/ancestor::div4/@id|$theElt/ancestor::div3/@id|$theElt/ancestor::div2/@id|$theElt/ancestor::div1/@id[last()]"/>
|
|
|
171 </xsl:otherwise>
|
|
|
172 </xsl:choose>
|
|
|
173 </xsl:variable>
|
|
|
174
|
|
|
175
|
|
|
176 <!-- for osisRefs
|
|
|
177 - delete any + and rest of osisRef string
|
|
|
178 - delete any - and rest of osisRef string
|
|
|
179 - get the ID of <scripture osisDI="..." or <scripCom osisRef="..."
|
|
|
180 -->
|
|
|
181
|
|
|
182 <xsl:variable name="osisRefOne">
|
|
|
183 <xsl:choose>
|
|
48
|
184 <xsl:when test="contains($osisRef,'+')"><xsl:value-of select="substring-before($osisRef,'+')"/></xsl:when>
|
|
32
|
185 <xsl:otherwise><xsl:value-of select="$osisRef"/></xsl:otherwise>
|
|
|
186 </xsl:choose>
|
|
|
187 </xsl:variable>
|
|
|
188 <xsl:variable name="osisRefStart">
|
|
|
189 <xsl:choose>
|
|
48
|
190 <xsl:when test="contains($osisRef,'-')"><xsl:value-of select="substring-before($osisRef,'-')"/></xsl:when>
|
|
32
|
191 <xsl:otherwise><xsl:value-of select="$osisRef"/></xsl:otherwise>
|
|
|
192 </xsl:choose>
|
|
|
193 </xsl:variable>
|
|
|
194
|
|
|
195 <xsl:variable name="osisRefID">
|
|
|
196 <xsl:choose>
|
|
|
197 <xsl:when test="$osisRefStart=''"></xsl:when>
|
|
|
198 <xsl:otherwise>
|
|
48
|
199 <xsl:value-of select="//scripture[@osisID=$osisRefStart]/@id|//scripCom[contains(@osisRef,$osisRefStart)]/@id"/>
|
|
32
|
200 </xsl:otherwise>
|
|
|
201 </xsl:choose>
|
|
|
202 </xsl:variable>
|
|
|
203 <xsl:variable name="osisSect">
|
|
|
204 <xsl:value-of select="substring-before($osisRefID,'-')"/>
|
|
|
205 </xsl:variable>
|
|
|
206
|
|
|
207 <!-- 'in' means #id urls, 'ex' means bookID.id.html urls -->
|
|
|
208 <xsl:variable name="urls">
|
|
|
209 <xsl:choose>
|
|
|
210 <xsl:when test="$mySectID='all' and $desktop!=1 and $osisRef=''">in</xsl:when>
|
|
|
211 <xsl:otherwise>ex</xsl:otherwise>
|
|
|
212 </xsl:choose>
|
|
|
213 </xsl:variable>
|
|
|
214
|
|
|
215 <xsl:variable name="urlPrefix">
|
|
|
216 <xsl:choose>
|
|
|
217 <xsl:when test="$urls='in'">#</xsl:when>
|
|
|
218 <xsl:otherwise><xsl:value-of select="$bookID"/>.</xsl:otherwise>
|
|
|
219 </xsl:choose>
|
|
|
220 </xsl:variable>
|
|
|
221 <xsl:variable name="urlSuffix">
|
|
|
222 <xsl:choose>
|
|
|
223 <xsl:when test="$urls='in'"></xsl:when>
|
|
|
224 <xsl:otherwise>.html<!--<xsl:value-of select="$params"/>--></xsl:otherwise>
|
|
|
225 </xsl:choose>
|
|
|
226 </xsl:variable>
|
|
|
227 <xsl:variable name="tocURL">
|
|
|
228 <xsl:value-of select="concat($urlPrefix,'toc',$urlSuffix)"/>
|
|
|
229 </xsl:variable>
|
|
|
230 <xsl:variable name="aboutURL">
|
|
|
231 <xsl:value-of select="concat($bookID,$urlSuffix)"/>
|
|
|
232 </xsl:variable>
|
|
|
233 <xsl:variable name="titlepageURL">
|
|
|
234 <xsl:choose>
|
|
|
235 <xsl:when test="$mySectID='all'">#<xsl:value-of select="$titlepageID"/></xsl:when>
|
|
|
236 <xsl:otherwise><xsl:value-of select="concat($urlPrefix,'titlepage',$urlSuffix)"/></xsl:otherwise>
|
|
|
237 </xsl:choose>
|
|
|
238 </xsl:variable>
|
|
|
239 <xsl:variable name="cssURL">
|
|
|
240 <xsl:choose>
|
|
|
241 <xsl:when test="$sect='all'"><xsl:value-of select="$homeURI"/>.css</xsl:when>
|
|
|
242 <xsl:otherwise><xsl:value-of select="$bookID"/>.css</xsl:otherwise>
|
|
|
243 </xsl:choose>
|
|
|
244 </xsl:variable>
|
|
|
245
|
|
|
246 <!--Is this book a Text.Dictionary?-->
|
|
|
247 <xsl:variable name="isDict">
|
|
|
248 <xsl:choose>
|
|
|
249 <xsl:when test="/ThML/ThML.head/electronicEdInfo/DC/DC.Type='Text.Dictionary'">1</xsl:when>
|
|
|
250 <xsl:when test="processing-instruction('thml-dctype')='Text.Dictionary'">1</xsl:when>
|
|
|
251 <xsl:otherwise></xsl:otherwise>
|
|
|
252 </xsl:choose>
|
|
|
253 </xsl:variable>
|
|
|
254
|
|
|
255 <xsl:variable name="myTerm">
|
|
|
256 <xsl:variable name="temp">
|
|
|
257 <xsl:call-template name="url-decode">
|
|
|
258 <xsl:with-param name="encoded" select="$term"/>
|
|
|
259 </xsl:call-template>
|
|
|
260 </xsl:variable>
|
|
48
|
261 <xsl:value-of select="translate($temp,$termTrans,'abcdefghijklmnopqrstuvwxyz ')"/>
|
|
32
|
262 </xsl:variable>
|
|
|
263
|
|
|
264
|
|
|
265 <!--Is this book a Text.Daily?-->
|
|
|
266 <xsl:variable name="isDaily">
|
|
|
267 <xsl:choose>
|
|
|
268 <xsl:when test="/ThML/ThML.head/electronicEdInfo/DC/DC.Type='Text.Daily'">1</xsl:when>
|
|
|
269 <xsl:when test="processing-instruction('thml-dctype')='Text.Daily'">1</xsl:when>
|
|
|
270 <xsl:otherwise>0</xsl:otherwise>
|
|
|
271 </xsl:choose>
|
|
|
272 </xsl:variable>
|
|
|
273
|
|
|
274
|
|
|
275 <!-- ============================================================== -->
|
|
|
276 <!-- ThML template: do outer stuff, then call appropriate templates -->
|
|
|
277 <!-- ============================================================== -->
|
|
|
278 <xsl:template match="/">
|
|
|
279 <xsl:if test="$debug">
|
|
|
280 <xsl:message>rootPath: <xsl:value-of select="$rootPath"/></xsl:message>
|
|
|
281 <xsl:message>desktop: <xsl:value-of select="$desktop"/></xsl:message>
|
|
|
282 <xsl:message>authorID: <xsl:value-of select="$authorID"/></xsl:message>
|
|
|
283 <xsl:message>bookID: <xsl:value-of select="$bookID"/></xsl:message>
|
|
|
284 <xsl:message>title: <xsl:value-of select="$title"/></xsl:message>
|
|
|
285 <xsl:message>bookInfo: <xsl:value-of select="$bookInfo"/></xsl:message>
|
|
|
286 <xsl:message>ccsubj: <xsl:value-of select="$ccsubj"/></xsl:message>
|
|
|
287 <xsl:message>head: <xsl:value-of select="$headtitle"/></xsl:message>
|
|
|
288 <xsl:message>author: <xsl:value-of select="$author"/></xsl:message>
|
|
|
289 <xsl:message>notes: <xsl:value-of select="$myNotes"/></xsl:message>
|
|
|
290 <xsl:message>sect: <xsl:value-of select="$sect"/></xsl:message>
|
|
|
291 <xsl:message>mySectID: <xsl:value-of select="$mySectID"/></xsl:message>
|
|
|
292 <xsl:message>osisRef: <xsl:value-of select="$osisRef"/></xsl:message>
|
|
|
293 <xsl:message>urls: <xsl:value-of select="$urls"/></xsl:message>
|
|
|
294 <xsl:message>urlPrefix: <xsl:value-of select="$urlPrefix"/></xsl:message>
|
|
|
295 <xsl:message>tocURL: <xsl:value-of select="$tocURL"/></xsl:message>
|
|
|
296 <xsl:message>aboutURL: <xsl:value-of select="$aboutURL"/></xsl:message>
|
|
|
297 <xsl:message>theElt: <xsl:value-of select="$theElt/@id"/></xsl:message>
|
|
|
298 <xsl:message>theDivID: <xsl:value-of select="$theDivID"/></xsl:message>
|
|
|
299 <xsl:message>isDict: <xsl:value-of select="$isDict"/></xsl:message>
|
|
|
300 <xsl:message>term: <xsl:value-of select="$term"/></xsl:message>
|
|
|
301 <xsl:message>myTerm: <xsl:value-of select="$myTerm"/></xsl:message>
|
|
|
302 </xsl:if>
|
|
|
303
|
|
|
304 <html>
|
|
|
305 <head>
|
|
|
306 <title><xsl:value-of select="$title"/> (<xsl:value-of select="translate($mySectID,'+',' ')"/>)</title>
|
|
|
307 <link rel="stylesheet" type="text/css" href="/ss/ThML10.css"/>
|
|
|
308
|
|
|
309 <!-- stylesheet -->
|
|
|
310 <xsl:choose>
|
|
|
311 <xsl:when test="$sect='all' and not(/processing-instruction()[name()='thml-authorID'])">
|
|
|
312 <style type="text/css">
|
|
|
313 <xsl:value-of select="/ThML/ThML.head/style[@type='text/css']"/>
|
|
|
314 </style>
|
|
|
315 </xsl:when>
|
|
|
316 <xsl:otherwise>
|
|
|
317 <link rel="stylesheet" type="text/css" href="{$bookID}.css"/>
|
|
|
318 </xsl:otherwise>
|
|
|
319 </xsl:choose>
|
|
|
320
|
|
|
321 <!-- add javascript for isDaily documents -->
|
|
|
322 <xsl:if test="$isDaily=1">
|
|
|
323 <script language="javascript" type="text/javascript">
|
|
|
324 function goToday() {
|
|
|
325 var d = new Date();
|
|
|
326 var theloc = "d";
|
|
|
327 if (d.getMonth() < 9) theloc += "0";
|
|
|
328 theloc += String(d.getMonth() +1);
|
|
|
329 if (d.getDate() < 10) theloc += "0";
|
|
|
330 theloc += String(d.getDate());
|
|
|
331
|
|
|
332 <xsl:if test="$bookID='morneve'">
|
|
|
333 if (d.getHours() < 12) theloc += "am";
|
|
|
334 else theloc += "pm";
|
|
|
335 </xsl:if>
|
|
|
336 <xsl:choose>
|
|
|
337 <xsl:when test="$urls='in'">
|
|
|
338 self.location = "#" + theloc;
|
|
|
339 </xsl:when>
|
|
|
340 <xsl:otherwise>
|
|
|
341 self.location = "<xsl:value-of select="$bookID"/>." +
|
|
|
342 theloc + ".html";
|
|
|
343 </xsl:otherwise>
|
|
|
344 </xsl:choose>
|
|
|
345 return false;
|
|
|
346 }
|
|
|
347
|
|
|
348 function goDay(month,day) {
|
|
|
349 var m=month.value;
|
|
|
350 var da = day.value;
|
|
|
351 var d = new Date();
|
|
|
352 var theloc = "d";
|
|
|
353 if (((m=="04" || m=="06" || m=="09" || m=="11") && da=="31") || (m=="02" && (da=="30" || da=="31"))) {
|
|
|
354 alert("Invalid date! Try again.");
|
|
|
355 return false;
|
|
|
356 }
|
|
|
357 theloc += String(m) + String(da);
|
|
|
358 <xsl:if test="$bookID='morneve'">
|
|
|
359 if (d.getHours() < 12) theloc += "am";
|
|
|
360 else theloc += "pm";
|
|
|
361 </xsl:if>
|
|
|
362 <xsl:choose>
|
|
|
363 <xsl:when test="$urls='in'">
|
|
|
364 self.location = "#" + theloc;
|
|
|
365 </xsl:when>
|
|
|
366 <xsl:otherwise>
|
|
|
367 self.location = "<xsl:value-of select="$bookID"/>." +
|
|
|
368 theloc + ".html";
|
|
|
369 </xsl:otherwise>
|
|
|
370 </xsl:choose>
|
|
|
371 return false;
|
|
|
372 }
|
|
|
373 </script>
|
|
|
374 </xsl:if>
|
|
|
375 </head>
|
|
|
376
|
|
|
377 <body>
|
|
|
378 <xsl:attribute name="onLoad">init.call(); highlightSearch();</xsl:attribute>
|
|
|
379 <xsl:if test="$isDaily=1 and $sect='today'">
|
|
|
380 <script>
|
|
|
381 goToday();
|
|
|
382 </script>
|
|
|
383 </xsl:if>
|
|
|
384 <script language="javascript" type="text/javascript" src="/ss/util-dom.js"></script>
|
|
|
385 <script language="javascript" type="text/javascript" src="/ss/highlight.js"></script>
|
|
|
386 <xsl:choose>
|
|
|
387 <xsl:when test="$osisRef != ''">
|
|
|
388 <xsl:apply-templates select="/ThML/ThML.body/div1[@id=$osisSect] |
|
|
|
389 /ThML/ThML.body/div1/div2[@id=$osisSect] |
|
|
|
390 /ThML/ThML.body/div1/div2/div3[@id=$osisSect] |
|
|
|
391 /ThML/ThML.body/div1/div2/div3/div4[@id=$osisSect] |
|
|
48
|
392 /ThML/ThML.body/div1/div2/div3/div4/div5[@id=$osisSect]" mode="includeParsing"/>
|
|
32
|
393 </xsl:when>
|
|
|
394
|
|
|
395 <!-- for a term request on server, which says section is about -->
|
|
|
396 <!--
|
|
|
397 <xsl:when test="$desktop!='1' and $myTerm != ''">
|
|
|
398 <xsl:apply-templates select="/ThML/ThML.body/div1/div2[@id='a']/glossary" mode="dict"/>
|
|
|
399 </xsl:when>
|
|
|
400 -->
|
|
|
401
|
|
|
402 <xsl:when test="$mySectID='about'">
|
|
|
403 <xsl:apply-templates select="/ThML/ThML.head|ThML.head" mode="includeParsing"/>
|
|
|
404 </xsl:when>
|
|
|
405
|
|
|
406 <!-- here for dictBookID.html?term=myTerm -->
|
|
|
407 <xsl:when test="$mySectID='toc' and $myTerm!=''">
|
|
|
408 <xsl:variable name="filename">
|
|
|
409 <xsl:if test="$desktop='1'"><xsl:text>../books/</xsl:text></xsl:if>
|
|
|
410 <xsl:if test="$desktop='0'"><xsl:text>/ccel/</xsl:text></xsl:if>
|
|
48
|
411 <xsl:value-of select="$authLet"/>/<xsl:value-of select="$authorID"/>/<xsl:value-of select="$bookID"/>/xml/<xsl:value-of select="$bookID"/>.<xsl:value-of select="substring($myTerm,1,1)"/>.xml</xsl:variable>
|
|
|
412 <xsl:apply-templates select="document($filename,$rootPath)//glossary" mode="dict"/>
|
|
32
|
413 </xsl:when>
|
|
|
414
|
|
|
415 <xsl:when test="$mySectID='toc'">
|
|
|
416 <xsl:apply-templates select="/ThML/ThML.body|ThML.body" mode="includeParsing"/>
|
|
|
417 </xsl:when>
|
|
|
418
|
|
|
419 <xsl:when test="substring($sect,1,1)='_'">
|
|
|
420 <xsl:apply-templates select="$theElt" mode="includeParsing"/>
|
|
|
421 </xsl:when>
|
|
|
422
|
|
|
423 <xsl:when test="$theDivID != '' and $start=''">
|
|
|
424 <xsl:apply-templates select="/ThML/ThML.body/div1[@id=$theDivID] |
|
|
|
425 /ThML/ThML.body/div1/div2[@id=$theDivID] |
|
|
|
426 /ThML/ThML.body/div1/div2/div3[@id=$theDivID] |
|
|
|
427 /ThML/ThML.body/div1/div2/div3/div4[@id=$theDivID] |
|
|
48
|
428 /ThML/ThML.body/div1/div2/div3/div4/div5[@id=$theDivID]" mode="includeParsing"/>
|
|
32
|
429 </xsl:when>
|
|
|
430
|
|
|
431 <xsl:when test="$sect='today' and $isDaily=1">
|
|
|
432 <h1>Going to today's reading...</h1>
|
|
|
433 </xsl:when>
|
|
|
434
|
|
|
435 <xsl:when test="$isDict=1 and ($myTerm!='' or $start!='')">
|
|
|
436 <xsl:if test="$myTerm!=''">
|
|
|
437 <xsl:choose>
|
|
|
438 <xsl:when test="//glossary/term[translate(.,
|
|
|
439 $termTrans,
|
|
|
440 'abcdefghijklmnopqrstuvwxyz ')=$myTerm]">
|
|
48
|
441 <xsl:call-template name="dictTerm"/>
|
|
32
|
442 </xsl:when>
|
|
|
443 <xsl:otherwise>
|
|
|
444 <xsl:call-template name="dictTermNotFound"/>
|
|
|
445 </xsl:otherwise>
|
|
|
446 </xsl:choose>
|
|
|
447 </xsl:if>
|
|
|
448 <xsl:if test="$start!=''">
|
|
48
|
449 <xsl:call-template name="dictStart"/>
|
|
32
|
450 </xsl:if>
|
|
|
451 </xsl:when>
|
|
|
452
|
|
|
453 <xsl:otherwise> <!-- $sect should be 'all' -->
|
|
|
454 <xsl:apply-templates select="*" mode="includeParsing"/>
|
|
|
455 <xsl:apply-templates select="/ThML/ThML.body/*" mode="includeParsing"/>
|
|
|
456 </xsl:otherwise>
|
|
|
457
|
|
|
458 </xsl:choose>
|
|
|
459
|
|
|
460 <xsl:if test="substring($sect,1,1) != '_'">
|
|
|
461 <xsl:call-template name="add-footer"/>
|
|
|
462 </xsl:if>
|
|
|
463
|
|
|
464 </body>
|
|
|
465 </html>
|
|
|
466 </xsl:template>
|
|
|
467
|
|
|
468
|
|
|
469 <!-- ================================================================ -->
|
|
|
470 <!-- divn template: if $sect=all, process all divs, else only -->
|
|
|
471 <!-- requested one(s). Handle navbar and notes, then apply-templates. -->
|
|
|
472 <!-- ================================================================ -->
|
|
|
473 <xsl:template match="div1|div2|div3|div4|div5|div[@type='sect']" mode="includeParsing">
|
|
|
474 <xsl:if test="($sect='all' or @id=$theDivID or @id=$osisSect)">
|
|
|
475 <xsl:call-template name="navbar">
|
|
|
476 <xsl:with-param name="progress" select="@progress"/>
|
|
|
477 </xsl:call-template>
|
|
48
|
478 <!--<a name="navtop" id="navtop"/>-->
|
|
|
479 <xsl:apply-templates mode="includeParsing"/>
|
|
32
|
480 <xsl:if test="./p//note and $myNotes='foot'">
|
|
|
481 <hr class="Note" id="noteBottom"/>
|
|
|
482 </xsl:if>
|
|
|
483 <xsl:if test=".//note and $myNotes='foot'">
|
|
|
484 <xsl:apply-templates select="./*" mode="createNotes"/>
|
|
|
485 </xsl:if>
|
|
48
|
486 <!--<a name="navbottom" id="navbottom"/>-->
|
|
32
|
487 <xsl:call-template name="navbar">
|
|
|
488 <xsl:with-param name="progress" select="@progress"/>
|
|
|
489 </xsl:call-template>
|
|
|
490 </xsl:if>
|
|
|
491 </xsl:template>
|
|
|
492
|
|
|
493
|
|
|
494 <!-- ============================================================ -->
|
|
|
495 <!-- Generate a spiffy Table of Contents with expandable outline. -->
|
|
|
496 <!-- ============================================================ -->
|
|
|
497 <xsl:template match="ThML.body" name="toc" mode="includeParsing">
|
|
48
|
498 <xsl:if test="$bcb=1"><table id="bcbHide" bgcolor="#660000" style="margin-top:24pt; width:100%">
|
|
|
499 <tr><td><p class="whitehead" style="text-align:center"><xsl:value-of select="$title"/> - Table of Contents</p></td></tr>
|
|
|
500 </table></xsl:if>
|
|
32
|
501 <h1 class="title"><xsl:value-of select="$title"/></h1>
|
|
|
502 <h3 class="subhead">by</h3>
|
|
|
503 <h2 class="subhead"><xsl:value-of select="$author"/></h2>
|
|
|
504 <hr width="30%"/>
|
|
|
505 <div style="text-align:center; margin-left:0.5in; margin-right:0.5in">
|
|
|
506 <table align="center"><tr><td>
|
|
|
507 <h1 class="title" id="toc">Table of Contents</h1>
|
|
|
508 <xsl:if test="$isDaily=1">
|
|
|
509 <p class="TOC1" style="text-align:center">
|
|
|
510 <form onsubmit="return goToday()">
|
|
|
511 <input type="submit" value="Go to today"/>
|
|
|
512 </form>
|
|
|
513 </p>
|
|
|
514 <p class="TOC1" style="text-align:center">
|
|
|
515 <form onsubmit="return goDay(month,day)">
|
|
|
516 <select name="month">
|
|
|
517 <option value="01">January</option>
|
|
|
518 <option value="02">February</option>
|
|
|
519 <option value="03">March</option>
|
|
|
520 <option value="04">April</option>
|
|
|
521 <option value="05">May</option>
|
|
|
522 <option value="06">June</option>
|
|
|
523 <option value="07">July</option>
|
|
|
524 <option value="08">August</option>
|
|
|
525 <option value="09">September</option>
|
|
|
526 <option value="10">October</option>
|
|
|
527 <option value="11">November</option>
|
|
|
528 <option value="12">December</option>
|
|
|
529 </select>
|
|
|
530 <select name="day">
|
|
|
531 <option value="01">1</option>
|
|
|
532 <option value="02">2</option>
|
|
|
533 <option value="03">3</option>
|
|
|
534 <option value="04">4</option>
|
|
|
535 <option value="05">5</option>
|
|
|
536 <option value="06">6</option>
|
|
|
537 <option value="07">7</option>
|
|
|
538 <option value="08">8</option>
|
|
|
539 <option value="09">9</option>
|
|
|
540 <option value="10">10</option>
|
|
|
541 <option value="11">11</option>
|
|
|
542 <option value="12">12</option>
|
|
|
543 <option value="13">13</option>
|
|
|
544 <option value="14">14</option>
|
|
|
545 <option value="15">15</option>
|
|
|
546 <option value="16">16</option>
|
|
|
547 <option value="17">17</option>
|
|
|
548 <option value="18">18</option>
|
|
|
549 <option value="19">19</option>
|
|
|
550 <option value="20">20</option>
|
|
|
551 <option value="21">21</option>
|
|
|
552 <option value="22">22</option>
|
|
|
553 <option value="23">23</option>
|
|
|
554 <option value="24">24</option>
|
|
|
555 <option value="25">25</option>
|
|
|
556 <option value="26">26</option>
|
|
|
557 <option value="27">27</option>
|
|
|
558 <option value="28">28</option>
|
|
|
559 <option value="29">29</option>
|
|
|
560 <option value="30">30</option>
|
|
|
561 <option value="31">31</option>
|
|
|
562 </select>
|
|
|
563 <input type="submit" value="Go to day..."/>
|
|
|
564 </form>
|
|
|
565 </p>
|
|
|
566 </xsl:if>
|
|
|
567 <p class="TOC1" style="text-align:center">
|
|
48
|
568 <a class="TOC" href="{$aboutURL}">
|
|
|
569 <xsl:if test="$bcb=1"><xsl:attribute name="bcbTarg">true</xsl:attribute></xsl:if>
|
|
32
|
570 <i>About This Book</i>
|
|
|
571 </a>
|
|
|
572 </p>
|
|
|
573 <xsl:apply-templates select="div1[1]" mode="tocRequestDom1"/>
|
|
48
|
574 <xsl:if test="$bcb=1"><p id="bcbHide" style="text-indent:0in;margin-top:12pt">
|
|
32
|
575 <a href="/files/nav.htm">Navigation and searching hints</a>
|
|
48
|
576 </p></xsl:if>
|
|
32
|
577 <xsl:if test="$isDict=1">
|
|
48
|
578 <xsl:if test="$bcb=1"><p id="bcbHide" style="text-indent:0in;margin-top:12pt">
|
|
32
|
579 <form action="/termSearch">
|
|
|
580
|
|
|
581 Look up an entry:
|
|
|
582 <input type="text" name="q"/>
|
|
|
583 <input type="hidden" name="authorID" value="{$authorID}"/>
|
|
|
584 <input type="hidden" name="bookID" value="{$bookID}"/>
|
|
|
585 <input type="submit" value="Search"/>
|
|
|
586 </form>
|
|
48
|
587 </p></xsl:if>
|
|
32
|
588 <p class="nav">
|
|
|
589 <xsl:for-each select="document('')/*/letter:alphabet/letter:letter">
|
|
48
|
590 <a class="TOC" href="/termSearch?authorID={$authorID}&bookID={$bookID}&q={.}"><xsl:value-of select="translate(., 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/></a><xsl:text> </xsl:text>
|
|
32
|
591 </xsl:for-each>
|
|
|
592 </p></xsl:if>
|
|
|
593 </td></tr></table>
|
|
|
594 </div>
|
|
48
|
595 <xsl:if test="$bcb=1"><hr id="bcbHide"/></xsl:if>
|
|
32
|
596 </xsl:template>
|
|
|
597
|
|
|
598 <xsl:template match="div1|div2|div3|div4|div5" mode="tocRequestDom1">
|
|
|
599 <xsl:variable name="unique" select="@id"/>
|
|
|
600 <div>
|
|
|
601 <xsl:choose>
|
|
|
602 <xsl:when test="local-name(.) = 'div1'">
|
|
|
603 <xsl:attribute name="style">display:block</xsl:attribute>
|
|
|
604 </xsl:when>
|
|
|
605 <xsl:otherwise>
|
|
|
606 <xsl:attribute name="style">display:none</xsl:attribute>
|
|
|
607 </xsl:otherwise>
|
|
|
608 </xsl:choose>
|
|
|
609 <xsl:attribute name="id">d<xsl:value-of select="$unique"/></xsl:attribute>
|
|
|
610 <xsl:apply-templates select=".|following-sibling::div1|following-sibling::div2|following-sibling::div3|following-sibling::div4|following-sibling::div5" mode="tocFillDivDom1"/>
|
|
|
611 </div>
|
|
|
612 </xsl:template>
|
|
|
613
|
|
|
614 <xsl:template match="div1|div2|div3|div4|div5" mode="tocFillDivDom1">
|
|
|
615 <xsl:variable name="level">
|
|
|
616 <xsl:value-of select="substring-after(local-name(.), 'div')"/>
|
|
|
617 </xsl:variable>
|
|
|
618 <p class="{concat('TOC', $level)}">
|
|
|
619 <xsl:if test="boolean(div2|div3|div4|div5)">
|
|
|
620 <xsl:variable name="nextUnique" select="div2/@id|div3/@id|div4/@id|div5/@id"/>
|
|
|
621 <a>
|
|
|
622 <xsl:attribute name="href">javascript:t('d<xsl:value-of select="$nextUnique"/>','p<xsl:value-of select="$nextUnique"/>')</xsl:attribute>
|
|
48
|
623 <img alt="Click to expand or collapse this item" title="Click to expand or collapse this item" border="0" src="/pix/shut.gif" onmouseover="javascript:highlight(this)" onmouseout="javascript:unhighlight(this)">
|
|
32
|
624 <xsl:attribute name="id">p<xsl:value-of select="$nextUnique"/></xsl:attribute>
|
|
|
625 </img>
|
|
|
626 </a> 
|
|
|
627 </xsl:if>
|
|
48
|
628 <a class="TOC" href="{$urlPrefix}{@id}{$urlSuffix}">
|
|
|
629 <xsl:if test="$bcb=1"><xsl:attribute name="bcbParam">true</xsl:attribute></xsl:if>
|
|
32
|
630 <xsl:value-of select="@title"/>
|
|
|
631 </a>
|
|
|
632 </p>
|
|
48
|
633 <xsl:apply-templates select="div2[1]|div3[1]|div4[1]|div5[1]" mode="tocRequestDom1"/>
|
|
32
|
634 </xsl:template>
|
|
|
635
|
|
|
636
|
|
|
637 <!-- ====================================================== -->
|
|
|
638 <!-- Create a list of dictionary terms starting with $start -->
|
|
|
639 <!-- ====================================================== -->
|
|
|
640 <xsl:template name="dictStart">
|
|
48
|
641 <xsl:variable name="firstletter" select="substring($start,1,1)"/>
|
|
32
|
642 <xsl:variable name="prev1">
|
|
|
643 <xsl:choose>
|
|
|
644 <xsl:when test="string-length($start) != 1">
|
|
48
|
645 <xsl:value-of select="substring($start,1,1)"/>
|
|
32
|
646 </xsl:when>
|
|
|
647 <xsl:otherwise>
|
|
|
648 <xsl:value-of select="translate($start,
|
|
|
649 'abcdefghijklmnopqrstuvwxyz','zabcdefghijklmnopqrstuvwxy')"/>
|
|
|
650 </xsl:otherwise>
|
|
|
651 </xsl:choose>
|
|
|
652 </xsl:variable>
|
|
|
653 <xsl:variable name="next1">
|
|
|
654 <xsl:choose>
|
|
|
655 <xsl:when test="string-length($start) != 1">
|
|
48
|
656 <xsl:value-of select="substring($start,1,1)"/>
|
|
32
|
657 </xsl:when>
|
|
|
658 <xsl:otherwise>
|
|
|
659 <xsl:value-of select="translate($start,
|
|
|
660 'abcdefghijklmnopqrstuvwxyz','bcdefghijklmnopqrstuvwxyza')"/>
|
|
|
661 </xsl:otherwise>
|
|
|
662 </xsl:choose>
|
|
|
663 </xsl:variable>
|
|
|
664
|
|
|
665 <xsl:call-template name="navbar">
|
|
48
|
666 <xsl:with-param name="prev" select="$prev1"/>
|
|
|
667 <xsl:with-param name="prevParam">?start=<xsl:value-of select="$prev1"/></xsl:with-param>
|
|
|
668 <xsl:with-param name="next" select="$next1"/>
|
|
|
669 <xsl:with-param name="nextParam">?start=<xsl:value-of select="$next1"/></xsl:with-param>
|
|
32
|
670 </xsl:call-template>
|
|
|
671
|
|
|
672 <h3>Terms starting with <xsl:value-of select="translate($start,
|
|
48
|
673 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/></h3>
|
|
32
|
674 <ul>
|
|
|
675 <xsl:for-each select="//glossary/term[translate(substring(.,1,
|
|
|
676 string-length($start)), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
|
|
|
677 'abcdefghijklmnopqrstuvwxyz')=$start]">
|
|
|
678 <xsl:variable name="first1" select="substring($start,1,1)"/>
|
|
|
679
|
|
|
680 <li><a href="{$bookID}.{$first1}.html?term={translate(.,' ,;',
|
|
|
681 '+')}"><xsl:value-of select="."/></a></li>
|
|
|
682 </xsl:for-each>
|
|
|
683 </ul>
|
|
|
684 </xsl:template>
|
|
|
685
|
|
|
686
|
|
|
687 <!-- ========================================== -->
|
|
|
688 <!-- Create a dictionary term page for $myTerm -->
|
|
|
689 <!-- ========================================== -->
|
|
|
690 <xsl:template match="*" mode="dict">
|
|
|
691 <xsl:choose>
|
|
|
692 <xsl:when test="//glossary/term[translate(.,$termTrans,
|
|
|
693 'abcdefghijklmnopqrstuvwxyz ')=$myTerm]">
|
|
48
|
694 <xsl:call-template name="dictTerm"/>
|
|
32
|
695 </xsl:when>
|
|
|
696 <xsl:otherwise>
|
|
|
697 <xsl:call-template name="dictTermNotFound"/>
|
|
|
698 </xsl:otherwise>
|
|
|
699 </xsl:choose>
|
|
|
700 </xsl:template>
|
|
|
701
|
|
|
702 <xsl:template name="dictTerm">
|
|
|
703 <xsl:variable name="termNode" select="//glossary/term[translate(.,$termTrans,
|
|
|
704 'abcdefghijklmnopqrstuvwxyz ')=$myTerm]"/>
|
|
|
705
|
|
|
706 <xsl:call-template name="navbar">
|
|
48
|
707 <xsl:with-param name="prev" select="translate(substring($termNode/preceding::term[1],1,1),
|
|
|
708 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
|
|
32
|
709 <xsl:with-param name="prevParam">
|
|
|
710 <xsl:if test="$termNode/preceding::term[1]">?term=<xsl:call-template name="url-encode">
|
|
48
|
711 <xsl:with-param name="str" select="$termNode/preceding::term[1]"/></xsl:call-template></xsl:if>
|
|
32
|
712 </xsl:with-param>
|
|
48
|
713 <xsl:with-param name="next" select="translate(substring($termNode/following::term[1],1,1),
|
|
|
714 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
|
|
32
|
715 <xsl:with-param name="nextParam">
|
|
|
716 <xsl:if test="$termNode/following::term[1]">?term=<xsl:call-template name="url-encode">
|
|
48
|
717 <xsl:with-param name="str" select="$termNode/following::term[1]"/></xsl:call-template></xsl:if>
|
|
32
|
718 </xsl:with-param>
|
|
|
719 </xsl:call-template>
|
|
|
720 <a name="navtop" id="navtop"/>
|
|
|
721
|
|
|
722 <dl>
|
|
|
723 <b><xsl:apply-templates select="$termNode" mode="includeParsing"/></b>
|
|
48
|
724 <xsl:apply-templates select="$termNode/following-sibling::def[1]" mode="includeParsing"/>
|
|
32
|
725 </dl>
|
|
|
726
|
|
|
727 <xsl:if test="string-length($myTerm) > 2">
|
|
|
728 <xsl:if test="count(//glossary/term[contains(translate(.,
|
|
|
729 $termTrans,'abcdefghijklmnopqrstuvwxyz '),
|
|
|
730 $myTerm)]) > 1">
|
|
|
731 <h5>Or did you want:</h5>
|
|
|
732 <ul>
|
|
|
733 <xsl:for-each select="//glossary/term[contains(translate(.,
|
|
|
734 $termTrans,'abcdefghijklmnopqrstuvwxyz '),
|
|
|
735 $myTerm) and not(translate(., $termTrans,
|
|
|
736 'abcdefghijklmnopqrstuvwxyz ')=$myTerm)]">
|
|
|
737 <xsl:variable name="tempTerm">
|
|
|
738 <xsl:call-template name="url-encode">
|
|
|
739 <xsl:with-param name="str" select="."/>
|
|
|
740 </xsl:call-template>
|
|
|
741 </xsl:variable>
|
|
48
|
742 <li><a href="{$bookID}.{substring($myTerm,1,1)}.html?term={$tempTerm}"><xsl:value-of select="."/></a></li>
|
|
32
|
743 </xsl:for-each>
|
|
|
744 </ul>
|
|
|
745 </xsl:if>
|
|
|
746 </xsl:if>
|
|
|
747
|
|
|
748 <h5><a href="/termSearch?q={substring($myTerm,1,2)}&authorID={$authorID}&bookID={$bookID}">More terms</a></h5>
|
|
|
749 <a name="navbottom" id="navbottom"/>
|
|
|
750 <xsl:call-template name="navbar">
|
|
48
|
751 <xsl:with-param name="prev" select="translate(substring($termNode/preceding::term[1],1,1),
|
|
|
752 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
|
|
32
|
753 <xsl:with-param name="prevParam">
|
|
|
754 <xsl:if test="$termNode/preceding::term[1]">?term=<xsl:call-template name="url-encode">
|
|
48
|
755 <xsl:with-param name="str" select="$termNode/preceding::term[1]"/></xsl:call-template></xsl:if>
|
|
32
|
756 </xsl:with-param>
|
|
48
|
757 <xsl:with-param name="next" select="translate(substring($termNode/following::term[1],1,1),
|
|
|
758 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
|
|
32
|
759 <xsl:with-param name="nextParam">
|
|
|
760 <xsl:if test="$termNode/following::term[1]">?term=<xsl:call-template name="url-encode">
|
|
48
|
761 <xsl:with-param name="str" select="$termNode/following::term[1]"/></xsl:call-template></xsl:if>
|
|
32
|
762 </xsl:with-param>
|
|
|
763 </xsl:call-template>
|
|
|
764 </xsl:template>
|
|
|
765
|
|
|
766
|
|
|
767 <!-- ======================================================= -->
|
|
|
768 <!-- Create a dictionary term page when $myTerm isn't found -->
|
|
|
769 <!-- ======================================================= -->
|
|
|
770 <xsl:template name="dictTermNotFound">
|
|
|
771 <xsl:call-template name="navbar">
|
|
|
772 <xsl:with-param name="prev" select="substring($myTerm,1,1)"/>
|
|
48
|
773 <xsl:with-param name="prevParam">?start=<xsl:value-of select="substring($myTerm,1,1)"/>
|
|
32
|
774 </xsl:with-param>
|
|
48
|
775 <xsl:with-param name="next" select="translate(substring($myTerm,1,1),
|
|
32
|
776 'abcdefghijklmnopqrstuvwxyz','bcdefghijklmnopqrstuvwxyza')"/>
|
|
48
|
777 <xsl:with-param name="nextParam">?start=<xsl:value-of select="translate(substring($myTerm,1,1),
|
|
32
|
778 'abcdefghijklmnopqrstuvwxyz','bcdefghijklmnopqrstuvwxyza')"/>
|
|
|
779 </xsl:with-param>
|
|
|
780 </xsl:call-template>
|
|
|
781
|
|
|
782 <h2 termName="{$myTerm}">Term not found.</h2>
|
|
|
783 <xsl:choose>
|
|
|
784
|
|
|
785 <!-- if myTerm is contained by an existing term... -->
|
|
|
786 <xsl:when test="count(//glossary/term[contains(translate(.,
|
|
|
787 $termTrans,'abcdefghijklmnopqrstuvwxyz '),
|
|
|
788 $myTerm)]) > 0">
|
|
|
789 <h5>What about these terms?</h5>
|
|
|
790 <ul>
|
|
|
791 <xsl:for-each select="//glossary/term[contains(translate(.,
|
|
|
792 $termTrans,'abcdefghijklmnopqrstuvwxyz '),
|
|
|
793 $myTerm)]">
|
|
|
794 <li><a bcbParam="true">
|
|
|
795 <xsl:attribute name="href">
|
|
|
796 <xsl:value-of select="$bookID"/>.<xsl:value-of select="translate(substring(.,1,1),
|
|
|
797 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
|
|
|
798 <xsl:value-of select="$urlSuffix"/>?term=<xsl:call-template name="url-encode">
|
|
|
799 <xsl:with-param name="str" select="."/></xsl:call-template>
|
|
|
800 </xsl:attribute>
|
|
|
801 <xsl:value-of select="."/></a></li>
|
|
|
802 </xsl:for-each>
|
|
|
803 </ul>
|
|
|
804 </xsl:when>
|
|
|
805
|
|
|
806 <!-- if myTerm isn't contained in an existing term, return
|
|
|
807 terms that start with the same two letters -->
|
|
|
808 <xsl:otherwise>
|
|
|
809 <xsl:variable name="beginTerm" select="substring($myTerm,1,2)"/>
|
|
|
810 <xsl:if test="//glossary/term[starts-with(translate(.,
|
|
|
811 $termTrans,'abcdefghijklmnopqrstuvwxyz '),
|
|
|
812 $beginTerm)]">
|
|
|
813 <h5>What about these terms?</h5>
|
|
|
814 <ul>
|
|
|
815 <xsl:for-each select="//glossary/term[starts-with(translate(.,
|
|
|
816 $termTrans,'abcdefghijklmnopqrstuvwxyz '),
|
|
|
817 $beginTerm)]">
|
|
|
818 <xsl:variable name="tempTerm">
|
|
|
819 <xsl:call-template name="url-encode">
|
|
|
820 <xsl:with-param name="str" select="."/>
|
|
|
821 </xsl:call-template>
|
|
|
822 </xsl:variable>
|
|
|
823 <li><a bcbParam="true" href="{$bookID}.{translate(substring(.,1,1),
|
|
|
824 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
|
|
48
|
825 'abcdefghijklmnopqrstuvwxyz')}{$urlSuffix}?term={$tempTerm}"><xsl:value-of select="."/></a></li>
|
|
32
|
826 </xsl:for-each>
|
|
|
827 </ul>
|
|
|
828 </xsl:if>
|
|
|
829 </xsl:otherwise>
|
|
|
830 </xsl:choose>
|
|
|
831 </xsl:template>
|
|
|
832
|
|
|
833
|
|
|
834 <!-- ============================================== -->
|
|
|
835 <!-- Gnarly template to generate the about page -->
|
|
|
836 <!-- ============================================== -->
|
|
|
837 <xsl:template match="ThML.head" name="about" mode="includeParsing">
|
|
|
838
|
|
|
839 <p><a name="about"> </a></p>
|
|
|
840 <center>
|
|
48
|
841 <table border="2" bordercolor="#660000" style="margin-top:12pt; width: 440pt">
|
|
32
|
842 <tr>
|
|
|
843 <td bgcolor="#660000" width="100%" colspan="3"><p class="whitehead" style="text-align:center; font-size:14pt">About
|
|
|
844 <i><xsl:value-of select="$title"/></i> by <xsl:value-of select="$author"/></p>
|
|
|
845 </td>
|
|
|
846 </tr>
|
|
|
847 <tr><td colspan="3">
|
|
|
848 <center>
|
|
|
849 <p style="text-align:center; margin-top:12pt">
|
|
|
850 <form method="get" action="http://www.ccel.org/search">
|
|
48
|
851 <span style="font-weight:bold; font-size:14pt"><a class="TOC" href="{$titlepageURL}"><xsl:if test="$bcb=1"><xsl:attribute name="bcbParam">true</xsl:attribute></xsl:if>Title Page</a></span>
|
|
32
|
852      
|
|
48
|
853 <span style="font-weight:bold; font-size:14pt"><a class="TOC" href="{$tocURL}"><xsl:if test="$bcb=1"><xsl:attribute name="bcbParam">true</xsl:attribute></xsl:if>Table of Contents</a></span>
|
|
32
|
854      
|
|
|
855 <xsl:if test="$isDaily=1">
|
|
48
|
856 <span style="font-weight:bold; font-size:14pt"><a class="TOC" href="javascript:goToday()">Today's Reading</a></span>
|
|
32
|
857 </xsl:if>
|
|
|
858      
|
|
|
859
|
|
48
|
860 <input type="hidden" name="a" value="advanced_search"/>
|
|
|
861 <input type="hidden" name="authorID" value="{$authorID}"/>
|
|
|
862 <input type="hidden" name="bookID" value="{$bookID}"/>
|
|
32
|
863 <span style="font-weight:bold; font-size:16pt">Search:</span> 
|
|
48
|
864 <input type="text" size="12" name="q" value=""/>
|
|
|
865 <input type="Submit" value="Go"/>
|
|
32
|
866 </form>
|
|
|
867 </p>
|
|
|
868 </center>
|
|
|
869 </td></tr>
|
|
48
|
870 <tr><td><table>
|
|
32
|
871 <tr>
|
|
|
872 <td style="width:110pt; text-align:right;">
|
|
|
873 <p style="margin-top:12pt"><b>Title:</b></p></td>
|
|
|
874 <td style="width:5pt"></td>
|
|
48
|
875 <td>
|
|
32
|
876 <p style="margin-top:12pt">
|
|
48
|
877 <a class="TOC" href="{$titlepageURL}"><xsl:if test="$bcb=1"><xsl:attribute name="bcbParam">true</xsl:attribute></xsl:if>
|
|
32
|
878 <xsl:value-of select="$title"/></a></p></td>
|
|
|
879 </tr>
|
|
|
880
|
|
|
881 <tr>
|
|
|
882 <td align="right" valign="top"><b>Creator(s):</b></td>
|
|
|
883 <td></td>
|
|
|
884 <td><a class="TOC">
|
|
|
885 <xsl:attribute name="href">
|
|
|
886 <xsl:choose>
|
|
48
|
887 <xsl:when test="$desktop=1">/ccel/<xsl:value-of select="$authorID"/>.html</xsl:when>
|
|
|
888 <xsl:otherwise>/<xsl:value-of select="$authLet"/>/<xsl:value-of select="$authorID"/></xsl:otherwise>
|
|
32
|
889 </xsl:choose>
|
|
|
890 </xsl:attribute>
|
|
|
891 <xsl:value-of select="electronicEdInfo/DC/DC.Creator[@sub='Author' and @scheme='file-as']"/></a>
|
|
|
892 <xsl:for-each select="electronicEdInfo/DC/DC.Creator[@sub!='Author' and @scheme='file-as']">
|
|
|
893 <br/><xsl:value-of select="."/><xsl:if test="@sub != ''"> (<xsl:value-of select="@sub"/>)</xsl:if>
|
|
|
894 </xsl:for-each>
|
|
|
895 </td>
|
|
|
896 </tr>
|
|
|
897
|
|
|
898 <xsl:if test="electronicEdInfo/DC/DC.Publisher!=''">
|
|
48
|
899 <tr><td align="right" valign="top"><b>Publisher:</b></td><td></td><td><xsl:value-of select="electronicEdInfo/DC/DC.Publisher"/></td></tr>
|
|
32
|
900 </xsl:if>
|
|
|
901
|
|
|
902 <xsl:if test="generalInfo/description != ''">
|
|
48
|
903 <tr><td align="right" valign="top"><b>Description:</b></td><td></td><td><xsl:apply-templates select="generalInfo/description" mode="includeParsing"/></td></tr>
|
|
32
|
904 </xsl:if>
|
|
|
905
|
|
|
906 <xsl:if test="generalInfo/firstPublished != ''">
|
|
48
|
907 <tr><td align="right" valign="top"><b>First Published:</b></td><td></td><td><xsl:apply-templates select="generalInfo/firstPublished" mode="includeParsing"/></td></tr>
|
|
32
|
908 </xsl:if>
|
|
|
909
|
|
|
910 <xsl:if test="generalInfo/pubHistory != ''">
|
|
48
|
911 <tr><td align="right" valign="top"><b>Publication History:</b></td><td></td><td><xsl:apply-templates select="generalInfo/pubHistory" mode="includeParsing"/></td></tr>
|
|
32
|
912 </xsl:if>
|
|
|
913
|
|
|
914 <xsl:if test="printSourceInfo/published != ''">
|
|
48
|
915 <tr><td align="right" valign="top"><b>Print Basis:</b></td><td></td><td><xsl:apply-templates select="printSourceInfo/published" mode="includeParsing"/></td></tr>
|
|
32
|
916 </xsl:if>
|
|
|
917
|
|
|
918 <xsl:if test="electronicEdInfo/DC/DC.Source[not(@scheme)] != ''">
|
|
|
919 <tr><td align="right" valign="top"><b>Source:</b></td><td></td><td>
|
|
|
920 <xsl:choose>
|
|
|
921 <xsl:when test="electronicEdInfo/DC/DC.Source[@scheme = 'URL'] != ''">
|
|
48
|
922 <a class="TOC" href="{electronicEdInfo/DC/DC.Source[@scheme = 'URL']}"><xsl:value-of select="electronicEdInfo/DC/DC.Source[not(@scheme)]"/></a>
|
|
32
|
923 </xsl:when>
|
|
|
924 <xsl:otherwise>
|
|
|
925 <xsl:value-of select="electronicEdInfo/DC/DC.Source[not(@scheme)]"/>
|
|
|
926 </xsl:otherwise>
|
|
|
927 </xsl:choose>
|
|
|
928 </td></tr>
|
|
|
929 </xsl:if>
|
|
|
930
|
|
|
931 <xsl:variable name="lang" select="electronicEdInfo/DC/DC.Language"/>
|
|
|
932 <xsl:if test="$lang != '' and not(starts-with($lang, 'en'))">
|
|
|
933 <tr><td align="right" valign="top"><b>Language:</b></td><td></td><td>
|
|
|
934 <xsl:value-of select="document('')/*/lang:name[@code=$lang]"/></td></tr>
|
|
|
935 </xsl:if>
|
|
|
936
|
|
|
937 <xsl:if test="electronicEdInfo/series != ''">
|
|
|
938 <tr>
|
|
|
939 <td align="right" valign="top"><b>Series:</b></td><td></td>
|
|
|
940 <td><xsl:value-of select="electronicEdInfo/series"/>
|
|
|
941 </td></tr>
|
|
|
942 </xsl:if>
|
|
|
943
|
|
|
944 <xsl:if test="electronicEdInfo/DC/DC.Rights != ''">
|
|
48
|
945 <tr><td align="right" valign="top"><b>Rights:</b></td><td></td><td><xsl:value-of select="electronicEdInfo/DC/DC.Rights"/></td></tr>
|
|
32
|
946 </xsl:if>
|
|
|
947
|
|
|
948 <xsl:if test="electronicEdInfo/DC/DC.Date[@sub = 'Created'] != ''">
|
|
48
|
949 <tr><td align="right" valign="top"><b>Date Created:</b></td><td></td><td><xsl:value-of select="electronicEdInfo/DC/DC.Date[@sub = 'Created']"/></td></tr>
|
|
32
|
950 </xsl:if>
|
|
|
951
|
|
|
952 <xsl:if test="electronicEdInfo/status != ''">
|
|
48
|
953 <tr><td align="right" valign="top"><b>Status:</b></td><td></td><td><xsl:apply-templates select="electronicEdInfo/status" mode="includeParsing"/></td></tr>
|
|
32
|
954 </xsl:if>
|
|
|
955
|
|
|
956 <xsl:if test="generalInfo/comments != ''">
|
|
48
|
957 <tr><td align="right" valign="top"><b>Comments:</b></td><td></td><td><xsl:apply-templates select="generalInfo/comments" mode="includeParsing"/></td></tr>
|
|
32
|
958 </xsl:if>
|
|
|
959
|
|
|
960 <xsl:if test="electronicEdInfo/editorialComments != ''">
|
|
48
|
961 <tr><td align="right" valign="top"><b>Editorial Comments:</b></td><td></td><td><xsl:apply-templates select="electronicEdInfo/editorialComments" mode="includeParsing"/></td></tr>
|
|
32
|
962 </xsl:if>
|
|
|
963
|
|
|
964 <xsl:if test="electronicEdInfo/DC/DC.Contributor != ''">
|
|
|
965 <tr><td align="right" valign="top"><b>Contributor(s):</b></td><td></td><td>
|
|
|
966 <xsl:for-each select="electronicEdInfo/DC/DC.Contributor">
|
|
|
967 <xsl:if test=". != ''">
|
|
|
968 <xsl:value-of select="."/> (<xsl:value-of select="@sub"/>)<br/>
|
|
|
969 </xsl:if>
|
|
|
970 </xsl:for-each></td>
|
|
|
971 </tr>
|
|
|
972 </xsl:if>
|
|
|
973
|
|
|
974 <xsl:if test="electronicEdInfo/DC/DC.Subject[@scheme = 'ccel'] != ''">
|
|
48
|
975 <tr><td align="right" valign="top"><b>CCEL Subjects:</b></td><td></td><td><xsl:value-of select="electronicEdInfo/DC/DC.Subject[@scheme = 'ccel']"/></td>
|
|
32
|
976 </tr>
|
|
|
977 </xsl:if>
|
|
|
978
|
|
|
979 <xsl:if test="electronicEdInfo/DC/DC.Subject[@scheme = 'LCCN'] != ''">
|
|
48
|
980 <tr><td align="right" valign="top"><b>LC Call no:</b></td><td></td><td><xsl:variable name="lccn" select="electronicEdInfo/DC/DC.Subject[@scheme = 'LCCN']"/><xsl:value-of select="electronicEdInfo/DC/DC.Subject[@scheme='LCCN']"/></td>
|
|
32
|
981 </tr>
|
|
|
982 </xsl:if>
|
|
|
983
|
|
|
984 <xsl:if test="electronicEdInfo/DC/DC.Subject[starts-with(@scheme, 'lcsh')] != ''">
|
|
|
985 <tr><td align="right" valign="top"><b>LC Subjects:</b></td><td></td><td>
|
|
|
986 <xsl:for-each select="electronicEdInfo/DC/DC.Subject[starts-with(@scheme, 'lcsh')]">
|
|
|
987 <xsl:variable name="class" select="concat('t', substring-after(@scheme, 'lcsh'))"/>
|
|
|
988 <p class="{$class}"><xsl:value-of select="."/></p>
|
|
|
989 </xsl:for-each></td>
|
|
|
990 </tr>
|
|
|
991 </xsl:if>
|
|
|
992
|
|
|
993 <xsl:if test="contains($ccsubj,'Shell')=false">
|
|
|
994 <tr><td align="right" valign="top">
|
|
48
|
995 <p style="margin-bottom:12pt"><b><a class="TOC" href="http://www.ccel.org/help/formats.html">Other Formats:</a></b></p></td>
|
|
32
|
996 <td></td><td>
|
|
|
997 <p style="margin-bottom:12pt">
|
|
|
998 <a class="TOC" href="/{$authLet}/{$authorID}/{$bookID}.xml">ThML</a>
|
|
|
999 - <a class="TOC" href="/ccel/{$authorID}/{$bookID}.pdf">pdf</a>
|
|
|
1000 - <a class="TOC" href="/ccel/{$authorID}/{$bookID}.pdb">pdb</a>
|
|
|
1001 - <a class="TOC" href="/ccel/{$authorID}/{$bookID}.htm">htm</a>
|
|
|
1002 - <a class="TOC" href="/ccel/{$authorID}/{$bookID}.txt">txt</a>
|
|
|
1003 - <a class="TOC" href="/ccel/{$authorID}/{$bookID}.fo">fo</a>
|
|
|
1004 <xsl:if test="not($desktop=1)">
|
|
|
1005
|
|
|
1006 <xsl:for-each select="document($bookInfo)/bookInfo/format">
|
|
48
|
1007 <xsl:text> - </xsl:text><a class="TOC" href="{.}"><xsl:value-of select="@type"/></a>
|
|
32
|
1008 </xsl:for-each>
|
|
|
1009 </xsl:if>
|
|
|
1010 </p>
|
|
|
1011 </td>
|
|
|
1012 </tr>
|
|
|
1013 </xsl:if>
|
|
|
1014 </table>
|
|
|
1015 <table style="width:100%">
|
|
|
1016 <tr><td bgcolor="#660000" width="100%" colspan="3">
|
|
|
1017 <p class="whitehead" style="text-align:center;font-size:14pt">
|
|
|
1018 Other ways to get <i><xsl:value-of select="$title"/></i></p></td></tr>
|
|
|
1019 <tr><td colspan="3">
|
|
|
1020 <xsl:copy-of select="document($bookInfo)/bookInfo/offer/*"/>
|
|
|
1021
|
|
|
1022 <p style="margin-top:12pt; margin-left:10%">
|
|
|
1023 <a href="http://www.christianbook.com/Christian/Books/easy_find?event=AFF&p=1026055&Ns=product.number_sold&Nso=1&Ntk=typeset.typeset&Ntt={$authorID}%20{$bookID}&Nu=product.endeca_rollup">
|
|
|
1024 Search for this book at ChristianBooks.com</a>
|
|
|
1025 </p>
|
|
|
1026
|
|
|
1027 </td></tr>
|
|
|
1028 </table>
|
|
|
1029 </td></tr>
|
|
|
1030 </table>
|
|
|
1031 </center>
|
|
|
1032 </xsl:template>
|
|
|
1033
|
|
|
1034
|
|
|
1035 <!-- =========================================== -->
|
|
|
1036 <!-- standard navbar, with doc and section title -->
|
|
|
1037 <!-- =========================================== -->
|
|
|
1038 <xsl:template name="navbar">
|
|
|
1039 <xsl:param name="prev"/>
|
|
|
1040 <xsl:param name="next"/>
|
|
|
1041 <xsl:param name="prevParam"></xsl:param>
|
|
|
1042 <xsl:param name="nextParam"></xsl:param>
|
|
|
1043 <!-- prev and next should be attributes with the ID of the previous and next
|
|
|
1044 section. If they aren't there we can compute them, but that takes time. -->
|
|
|
1045 <xsl:variable name="myPrev">
|
|
|
1046 <xsl:value-of select="$urlPrefix"/>
|
|
|
1047 <xsl:choose>
|
|
|
1048 <xsl:when test="@prev"><xsl:value-of select="@prev"/></xsl:when>
|
|
|
1049 <xsl:when test="$prev=''">toc</xsl:when>
|
|
|
1050 <xsl:when test="$prev"><xsl:value-of select="translate($prev,' ;,','+')"/></xsl:when>
|
|
|
1051 <xsl:otherwise><xsl:value-of select="preceding-sibling::div1[1]/div2[last()]/div3[last()]/div4[last()]/@id|preceding-sibling::div1[1]/div2[last()]/div3[last()]/@id|preceding-sibling::div2[1]/div3[last()]/div4[last()]/@id|preceding-sibling::div3[1]/div4[last()]/div5[last()]/@id|preceding-sibling::div1[1]/div2[last()]/@id|preceding-sibling::div2[1]/div3[last()]/@id|preceding-sibling::div3[1]/div4[last()]/@id|preceding-sibling::div4[1]/div5[last()]/@id|preceding-sibling::div1[1]/@id|preceding-sibling::div2[1]/@id|preceding-sibling::div3[1]/@id|preceding-sibling::div4[1]/@id|preceding-sibling::div5[1]/@id|ancestor::*/@id"/></xsl:otherwise>
|
|
|
1052 </xsl:choose>
|
|
|
1053 <xsl:value-of select="$urlSuffix"/>
|
|
|
1054 <!--<xsl:value-of select="translate($prevParam,'?','&')"/>-->
|
|
|
1055 <xsl:value-of select="$prevParam"/>
|
|
|
1056 </xsl:variable>
|
|
|
1057 <xsl:variable name="myNext">
|
|
|
1058 <xsl:value-of select="$urlPrefix"/>
|
|
|
1059 <xsl:choose>
|
|
|
1060 <xsl:when test="@next"><xsl:value-of select="@next"/></xsl:when>
|
|
|
1061 <xsl:when test="$next=''">toc</xsl:when>
|
|
|
1062 <xsl:when test="$next"><xsl:value-of select="translate($next,' ;,','+')"/></xsl:when>
|
|
|
1063 <xsl:otherwise><xsl:value-of select="div1/@id|div2/@id|div3/@id|div4/@id|div5/@id|following-sibling::*/@id|../following-sibling::*/@id|../../following-sibling::*/@id|../../../following-sibling::*/@id|../../../../following-sibling::*/@id"/></xsl:otherwise>
|
|
|
1064 </xsl:choose>
|
|
|
1065 <xsl:value-of select="$urlSuffix"/>
|
|
|
1066 <!--<xsl:value-of select="translate($nextParam,'?','&')"/>-->
|
|
|
1067 <xsl:value-of select="$nextParam"/>
|
|
|
1068 </xsl:variable>
|
|
|
1069
|
|
|
1070 <xsl:if test="$debug">
|
|
|
1071 <xsl:message>myPrev: <xsl:value-of select="$myPrev"/></xsl:message>
|
|
|
1072 <xsl:message>myNext: <xsl:value-of select="$myNext"/></xsl:message>
|
|
|
1073 </xsl:if>
|
|
|
1074
|
|
48
|
1075 <xsl:if test="$bcb=1"><p id="bcbHide"><a><xsl:attribute name="name"><xsl:value-of select="@id"/></xsl:attribute> </a></p>
|
|
32
|
1076 <table id="bcbHide" width="100%" bgcolor="#660000">
|
|
|
1077 <tr>
|
|
|
1078 <td valign="top" class="whitehead" style="text-align:left;
|
|
|
1079 font-size:77%; width:37%"><div style="height:12pt; overflow:hidden">
|
|
|
1080 <a style="color:#FFFFFF; text-decoration:none" href="{$urlPrefix}html">
|
|
|
1081 <xsl:value-of select="$headtitle"/></a></div></td>
|
|
|
1082 <td valign="top" class="whitehead" style="text-align:center">
|
|
|
1083 <a bcbParam="true" href="{$myPrev}">
|
|
|
1084 <!--<img onmouseover="this.style.borderColor='#CC6666'" onmouseout="this.style.borderColor='#660000'" src="/pix/mroonppv.gif" alt="Previous" title="Previous" style="border-color:#660000" border="2"/>-->
|
|
|
1085 <img border="0" src="/pix/mroonppv.gif" alt="Previous"/>
|
|
|
1086 </a>
|
|
|
1087 <a bcbParam="true" href="{$tocURL}">
|
|
|
1088 <!--<img onmouseover="this.style.borderColor='#CC6666'" onmouseout="this.style.borderColor='#660000'" src="/pix/mroontoc.gif" alt="Table of Contents" title="Contents" style="border-color:#660000" border="2"/>-->
|
|
|
1089 <img border="0" src="/pix/mroontoc.gif" alt="Contents"/>
|
|
|
1090 </a>
|
|
|
1091 <a bcbParam="true" href="{$myNext}">
|
|
|
1092 <!--<img onmouseover="this.style.borderColor='#CC6666'" onmouseout="this.style.borderColor='#660000'" src="/pix/mroonpnx.gif" alt="Next" title="Next" style="border-color:#660000" border="2"/>-->
|
|
|
1093 <img border="0" src="/pix/mroonpnx.gif" alt="Next"/>
|
|
|
1094 </a>
|
|
|
1095 </td>
|
|
|
1096 <td valign="top" class="whitehead" style="text-align:right;
|
|
|
1097 font-size:77%; width:37%"><div style="height:12pt; overflow:hidden">
|
|
|
1098 <xsl:value-of select="@title"/>
|
|
|
1099 </div></td>
|
|
|
1100 </tr>
|
|
|
1101 <tr><td colspan="3">
|
|
48
|
1102 <img src="/pix/yellowdot.gif" height="1">
|
|
32
|
1103 <xsl:attribute name="width"><xsl:value-of select="@progress"/></xsl:attribute>
|
|
|
1104 </img>
|
|
|
1105 </td></tr>
|
|
|
1106 </table>
|
|
48
|
1107 <p id="bcbHide"> </p></xsl:if>
|
|
32
|
1108
|
|
48
|
1109 <a href="{$myPrev}"><xsl:if test="$bcb=1"><xsl:attribute name="bcbParam">true</xsl:attribute></xsl:if></a>
|
|
|
1110 <a href="{$myNext}"><xsl:if test="$bcb=1"><xsl:attribute name="bcbParam">true</xsl:attribute></xsl:if></a>
|
|
32
|
1111 </xsl:template>
|
|
|
1112
|
|
|
1113
|
|
|
1114 <!-- =============================================== -->
|
|
|
1115 <!-- add the standard CCEL footer (for dynamic docs) -->
|
|
|
1116 <!-- =============================================== -->
|
|
|
1117 <xsl:template name="add-footer">
|
|
48
|
1118 <xsl:if test="$bcb=1"><table id="bcbHide" align="center" style="clear:right; margin-top:0in">
|
|
32
|
1119 <tr>
|
|
|
1120 <td>
|
|
|
1121 <a href="http://www.ccel.org">
|
|
|
1122 <img src="/pix/gem-icon2.gif" border="0" alt="CCEL home page"/>
|
|
|
1123 </a>
|
|
|
1124 </td>
|
|
|
1125 <td align="center"><span style="font-size:9pt; font-style:italic">
|
|
|
1126 <xsl:choose>
|
|
|
1127
|
|
|
1128 <!-- running on CCEL desktop -->
|
|
|
1129 <xsl:when test="$desktop=1">
|
|
|
1130 This <a class="TOC" href="http://www.ccel.org/ThML">ThML</a>
|
|
|
1131 document is from the
|
|
|
1132 <a class="TOC" href="http://www.ccel.org">Christian
|
|
48
|
1133 Classics Ethereal Library</a> at <a class="TOC" href="http://www.calvin.edu">Calvin College</a>.<br/>
|
|
32
|
1134
|
|
|
1135 <a class="TOC" href="/index.jsp">Home</a> |
|
|
|
1136 <a class="TOC" href="/jsp/prefs.jsp">Preferences</a>
|
|
|
1137 <!--<xsl:if test="$cd!=1">-->
|
|
48
|
1138 | Search this book: <form style="margin-top:0in" action="/search" method="get">
|
|
|
1139 <input type="hidden" name="authorID" value="{$authorID}"/>
|
|
|
1140 <input type="hidden" name="bookID" value="{$bookID}"/>
|
|
|
1141 <input type="hidden" name="a" value="search"/>
|
|
|
1142 <input type="text" name="q" size="12" style="font-size:8pt"/>
|
|
32
|
1143 <input type="submit" value="Go" size="7"/>
|
|
|
1144 </form>
|
|
|
1145 <!--</xsl:if>-->
|
|
|
1146 </xsl:when>
|
|
|
1147
|
|
|
1148 <!-- create HTML files on server -->
|
|
|
1149 <xsl:otherwise>
|
|
48
|
1150 This document is from the <a class="TOC" href="http://www.ccel.org">Christian Classics
|
|
|
1151 Ethereal Library</a> at <a class="TOC" href="http://www.calvin.edu">Calvin College</a>,<br/>
|
|
32
|
1152 generated on demand from
|
|
|
1153 <a class="TOC" href="http://www.ccel.org/ThML">ThML </a>
|
|
48
|
1154 <a class="TOC" href="http://www.ccel.org/ccel/{$authorID}/{$bookID}.xml">source</a>
|
|
32
|
1155 at <script type="text/javascript">document.write(
|
|
|
1156 document.lastModified);</script>. <br/>
|
|
|
1157 <xsl:variable name="hitfile" select="concat('/ccel/',$authLet,'/',
|
|
|
1158 $authorID, '/', $bookID, '/hits.xml')"/>
|
|
|
1159 This book has been accessed more than
|
|
|
1160 <xsl:value-of select="document($hitfile)/stats/hits"/> times
|
|
|
1161 since
|
|
|
1162 <xsl:value-of select="document($hitfile)/stats/date"/>.
|
|
|
1163 </xsl:otherwise>
|
|
|
1164 </xsl:choose>
|
|
|
1165 </span></td>
|
|
|
1166
|
|
|
1167 <td>
|
|
|
1168 <a class="TOC" href="http://www.calvin.edu">
|
|
|
1169 <img src="/pix/seal.gif" border="0" alt="Calvin seal: My heart I offer you O Lord, promptly and sincerely"/>
|
|
|
1170 </a>
|
|
|
1171 </td>
|
|
|
1172 </tr>
|
|
48
|
1173 </table></xsl:if>
|
|
32
|
1174 </xsl:template>
|
|
|
1175
|
|
|
1176
|
|
|
1177 <!-- ========================== -->
|
|
|
1178 <!-- process ThML body elements -->
|
|
|
1179 <!-- ========================== -->
|
|
|
1180
|
|
|
1181 <!-- include included stuff -->
|
|
|
1182 <xsl:template match="xi:include" mode="includeParsing">
|
|
|
1183 <xsl:if test="$debug">
|
|
|
1184 <xsl:message>xi:include: loading <xsl:value-of select="@href"/></xsl:message>
|
|
|
1185 </xsl:if>
|
|
|
1186
|
|
|
1187 <xsl:apply-templates select="document(@href,$rootPath)" mode="includeParsing"/>
|
|
|
1188 </xsl:template>
|
|
|
1189
|
|
|
1190 <xsl:template match="scripCom" mode="includeParsing">
|
|
48
|
1191 <a name="{@id}"/>
|
|
32
|
1192 </xsl:template>
|
|
|
1193
|
|
|
1194 <!-- just drop the tags -->
|
|
|
1195 <xsl:template match="scripContext|insertIndex|added" mode="includeParsing">
|
|
48
|
1196 <a id="{@id}"/>
|
|
32
|
1197 <xsl:apply-templates mode="includeParsing"/>
|
|
|
1198 </xsl:template>
|
|
|
1199
|
|
|
1200 <!-- convert <elt class="xxx"> to <span class="elt"><span class="xxx"> -->
|
|
48
|
1201 <xsl:template match="date|foreign|index|name|unclear" mode="includeParsing">
|
|
32
|
1202 <span class="{local-name()}">
|
|
|
1203 <xsl:copy-of select="@*[name() != 'class']"/>
|
|
|
1204 <xsl:choose>
|
|
|
1205 <xsl:when test="@class != ''">
|
|
|
1206 <span class="{@class}">
|
|
|
1207 <xsl:apply-templates mode="includeParsing"/>
|
|
|
1208 </span>
|
|
|
1209 </xsl:when>
|
|
|
1210 <xsl:otherwise>
|
|
|
1211 <xsl:apply-templates mode="includeParsing"/>
|
|
|
1212 </xsl:otherwise>
|
|
|
1213 </xsl:choose>
|
|
|
1214 </span>
|
|
|
1215 </xsl:template>
|
|
|
1216
|
|
48
|
1217 <xsl:template match="scripture" mode="includeParsing">
|
|
32
|
1218 <span class="{local-name()}">
|
|
|
1219 <xsl:choose>
|
|
|
1220 <xsl:when test="@*[name() = 'id']">
|
|
48
|
1221 <xsl:choose>
|
|
|
1222 <xsl:when test="$bcb=1"><xsl:copy-of select="@*[name() != 'class']"/></xsl:when>
|
|
|
1223 <xsl:otherwise><xsl:copy-of select="@id"/></xsl:otherwise>
|
|
|
1224 </xsl:choose>
|
|
|
1225
|
|
32
|
1226 </xsl:when>
|
|
|
1227 <xsl:when test="@*[name() = 'osisRef']">
|
|
|
1228 <xsl:attribute name="id">
|
|
|
1229 <xsl:variable name="bk1"><xsl:value-of select="substring-after(@*[name() = 'osisRef'],':')"/></xsl:variable>
|
|
|
1230 <xsl:choose>
|
|
|
1231 <xsl:when test="starts-with($bk1,'1')"><xsl:value-of select="concat('i',substring-after($bk1,'1'))"/></xsl:when>
|
|
|
1232 <xsl:when test="starts-with($bk1,'2')"><xsl:value-of select="concat('ii',substring-after($bk1,'2'))"/></xsl:when>
|
|
|
1233 <xsl:when test="starts-with($bk1,'3')"><xsl:value-of select="concat('iii',substring-after($bk1,'3'))"/></xsl:when>
|
|
|
1234 <xsl:otherwise><xsl:value-of select="$bk1"/></xsl:otherwise>
|
|
|
1235 </xsl:choose>
|
|
|
1236 </xsl:attribute>
|
|
48
|
1237 <xsl:if test="$bcb=1"><xsl:copy-of select="@*[name() != 'class']"/></xsl:if>
|
|
32
|
1238 </xsl:when>
|
|
|
1239 <xsl:otherwise>
|
|
|
1240 <xsl:message>Warning: no scripture id found (nor equivalent osisRef) - verse won't be highlighted</xsl:message>
|
|
|
1241 <xsl:copy-of select="@*[name() != 'class']"/>
|
|
|
1242 </xsl:otherwise>
|
|
|
1243 </xsl:choose>
|
|
|
1244 <xsl:choose>
|
|
|
1245 <xsl:when test="@class != ''">
|
|
|
1246 <span class="{@class}">
|
|
|
1247 <xsl:apply-templates mode="includeParsing"/>
|
|
|
1248 </span>
|
|
|
1249 </xsl:when>
|
|
|
1250 <xsl:otherwise>
|
|
|
1251 <xsl:apply-templates mode="includeParsing"/>
|
|
|
1252 </xsl:otherwise>
|
|
|
1253
|
|
|
1254 </xsl:choose>
|
|
|
1255 </span>
|
|
|
1256 </xsl:template>
|
|
|
1257
|
|
|
1258 <!-- convert <elt class="xxx"> to <div class="elt"><p class="xxx"> -->
|
|
|
1259 <xsl:template match="argument|attr|author|composer|incipit|l|meter|music|tune" mode="includeParsing">
|
|
|
1260 <xsl:choose>
|
|
|
1261 <xsl:when test="@class != ''">
|
|
|
1262 <div class="{local-name()}">
|
|
|
1263 <p class="{@class}">
|
|
|
1264 <xsl:apply-templates mode="includeParsing"/>
|
|
|
1265 </p>
|
|
|
1266 </div>
|
|
|
1267 </xsl:when>
|
|
|
1268 <xsl:otherwise>
|
|
|
1269 <p class="{local-name()}">
|
|
|
1270 <xsl:apply-templates mode="includeParsing"/>
|
|
|
1271 </p>
|
|
|
1272 </xsl:otherwise>
|
|
|
1273 </xsl:choose>
|
|
|
1274 </xsl:template>
|
|
|
1275
|
|
|
1276 <!-- hymn: do non-verse stuff, then put <verse>s in a centered td -->
|
|
|
1277 <xsl:template match="hymn" mode="includeParsing">
|
|
|
1278 <div class="hymn" id="{@id}">
|
|
|
1279 <xsl:apply-templates mode="includeParsing" select="*[name()!='verse']"/>
|
|
|
1280 <div class="Center">
|
|
|
1281 <table><tr><td>
|
|
|
1282 <xsl:apply-templates mode="includeParsing" select="verse"/>
|
|
|
1283 </td></tr></table>
|
|
|
1284 </div>
|
|
|
1285 </div>
|
|
|
1286 </xsl:template>
|
|
|
1287
|
|
|
1288 <!-- glossary, term, def -->
|
|
|
1289 <xsl:template match="glossary" mode="includeParsing">
|
|
|
1290 <dl>
|
|
|
1291 <xsl:copy-of select="@*"/>
|
|
|
1292 <xsl:apply-templates mode="includeParsing"/>
|
|
|
1293 </dl>
|
|
|
1294 </xsl:template>
|
|
|
1295
|
|
|
1296 <xsl:template match="term" mode="includeParsing">
|
|
|
1297 <dt>
|
|
|
1298 <xsl:copy-of select="@*"/>
|
|
|
1299 <xsl:choose>
|
|
|
1300 <xsl:when test="following-sibling::def[@source]">
|
|
|
1301 <a href="{following-sibling::def/@target}">
|
|
|
1302 <xsl:apply-templates mode="includeParsing"/>
|
|
|
1303 </a>
|
|
|
1304 <!--<xsl:text> - from </xsl:text>
|
|
|
1305 <a href="{following-sibling::def/@surl}">
|
|
|
1306 <xsl:value-of select="following-sibling::def/@source"/>
|
|
|
1307 </a>-->
|
|
|
1308 </xsl:when>
|
|
|
1309 <xsl:otherwise>
|
|
|
1310 <xsl:apply-templates mode="includeParsing"/>
|
|
|
1311 </xsl:otherwise>
|
|
|
1312 </xsl:choose>
|
|
|
1313 </dt>
|
|
|
1314 </xsl:template>
|
|
|
1315
|
|
|
1316 <xsl:template match="def" mode="includeParsing">
|
|
|
1317 <xsl:if test="not(@source)">
|
|
|
1318 <dd>
|
|
|
1319 <xsl:copy-of select="@*"/>
|
|
|
1320 <xsl:apply-templates mode="includeParsing"/>
|
|
|
1321 </dd>
|
|
|
1322 </xsl:if>
|
|
|
1323 </xsl:template>
|
|
|
1324
|
|
|
1325 <!-- sync -->
|
|
|
1326 <xsl:template match="sync" mode="includeParsing">
|
|
|
1327 <a>
|
|
|
1328 <xsl:attribute name="name"><xsl:value-of select="@type"/>_<xsl:value-of select="@value"/></xsl:attribute>
|
|
|
1329 </a>
|
|
|
1330 </xsl:template>
|
|
|
1331
|
|
|
1332 <!-- <pb> -->
|
|
|
1333 <xsl:template match="pb" mode="includeParsing">
|
|
|
1334 <span>
|
|
|
1335 <xsl:attribute name="class">pb</xsl:attribute>
|
|
|
1336 <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
|
|
1337 <xsl:choose>
|
|
|
1338 <xsl:when test="@href">
|
|
|
1339 <a class="page">
|
|
|
1340 <xsl:attribute name="href">
|
|
|
1341 <xsl:value-of select="@href"/>
|
|
|
1342 </xsl:attribute>
|
|
|
1343 <xsl:value-of select="@n"/>
|
|
|
1344 </a>
|
|
|
1345 </xsl:when>
|
|
|
1346 <xsl:otherwise>
|
|
|
1347 <xsl:value-of select="@n"/>
|
|
|
1348 </xsl:otherwise>
|
|
|
1349 </xsl:choose>
|
|
|
1350 </span>
|
|
|
1351 </xsl:template>
|
|
|
1352
|
|
|
1353
|
|
|
1354 <!-- delete deleted stuff -->
|
|
|
1355 <xsl:template match="deleted" mode="includeParsing">
|
|
|
1356 </xsl:template>
|
|
|
1357
|
|
|
1358
|
|
|
1359 <!-- verse: put in a centered table -->
|
|
|
1360 <xsl:template match="verse" mode="includeParsing">
|
|
|
1361 <div class="verse2">
|
|
|
1362 <table><tr><td>
|
|
|
1363 <xsl:apply-templates mode="includeParsing"/>
|
|
|
1364 </td></tr></table>
|
|
|
1365 </div>
|
|
|
1366 </xsl:template>
|
|
|
1367
|
|
|
1368
|
|
|
1369 <!-- scripref: link to /ccel/bible reference -->
|
|
|
1370 <xsl:template match="scripRef" mode="includeParsing">
|
|
|
1371
|
|
|
1372 <!-- parse osisRef to get bk, ch -->
|
|
48
|
1373 <xsl:variable name="psg"><xsl:value-of select="substring-before(concat(
|
|
50
|
1374 substring-after(substring-before(concat(@osisRef,' '),' '),':'),'-'),'-')"/></xsl:variable>
|
|
48
|
1375 <xsl:variable name="bk1"><xsl:value-of select="substring-before($psg,'.')"/></xsl:variable>
|
|
32
|
1376 <xsl:variable name="bk">
|
|
|
1377 <xsl:choose>
|
|
|
1378 <xsl:when test="starts-with($bk1,'1')"><xsl:value-of select="concat('i',substring-after($bk1,'1'))"/></xsl:when>
|
|
|
1379 <xsl:when test="starts-with($bk1,'2')"><xsl:value-of select="concat('ii',substring-after($bk1,'2'))"/></xsl:when>
|
|
|
1380 <xsl:when test="starts-with($bk1,'3')"><xsl:value-of select="concat('iii',substring-after($bk1,'3'))"/></xsl:when>
|
|
|
1381 <xsl:otherwise><xsl:value-of select="$bk1"/></xsl:otherwise>
|
|
|
1382 </xsl:choose>
|
|
|
1383 </xsl:variable>
|
|
48
|
1384 <xsl:variable name="ch"><xsl:if test="substring-before(substring-after($psg,'.'),'.') != ''"><xsl:value-of select="substring-before(substring-after($psg,'.'),'.')"/></xsl:if><xsl:if test="substring-before(substring-after($psg,'.'),'.') = ''"><xsl:value-of select="substring-after($psg,'.')"/></xsl:if></xsl:variable>
|
|
|
1385 <xsl:variable name="v"><xsl:value-of select="substring-after($psg,concat($bk1,'.',$ch,'.'))"/></xsl:variable>
|
|
|
1386 <xsl:variable name="vdot"><xsl:if test="$v != ''">.<xsl:value-of select="$v"/></xsl:if></xsl:variable>
|
|
|
1387 <!-- The following doesn't align with asv.xml 2009/12/20 -->
|
|
32
|
1388 <xsl:variable name="pref">
|
|
|
1389 <xsl:value-of select="document('bible.xml')/books/grouping[book[osisID[text()=$bk1]]]/@pref"/>
|
|
|
1390 </xsl:variable>
|
|
|
1391 <xsl:variable name="bibleID">
|
|
|
1392 <xsl:choose>
|
|
|
1393 <xsl:when test="$pref = 'ot_bib'"><xsl:value-of select="$ot_bib"/></xsl:when>
|
|
|
1394 <xsl:when test="$pref = 'nt_bib'"><xsl:value-of select="$nt_bib"/></xsl:when>
|
|
|
1395 <xsl:otherwise><xsl:value-of select="$ap_bib"/></xsl:otherwise>
|
|
|
1396 </xsl:choose>
|
|
|
1397 </xsl:variable>
|
|
48
|
1398
|
|
|
1399 <a class="scripRef" id="{@id}" href="{$bibpath}/{$bibleID}.html#{$bk}.{$ch}{$vdot}" target="{$bibleID}">
|
|
32
|
1400 <!-- if bcb, link to new window -->
|
|
48
|
1401 <xsl:if test="$bcb=1"><xsl:attribute name="bcbTarg">true</xsl:attribute><xsl:attribute name="name"><xsl:value-of select="translate(@parsed,'|','_')"/></xsl:attribute></xsl:if>
|
|
|
1402
|
|
|
1403 <!--<xsl:attribute name="href">/ccel/bible/<xsl:value-of select="$bibleID"/>.<xsl:value-of select="$bk"/>.<xsl:value-of select="$ch"/>.html#<xsl:value-of select="$bk"/>.<xsl:value-of select="$ch"/><xsl:value-of select="$vdot"/></xsl:attribute>-->
|
|
|
1404
|
|
32
|
1405
|
|
|
1406 <xsl:value-of select="."/>
|
|
|
1407 </a>
|
|
|
1408 </xsl:template>
|
|
|
1409
|
|
|
1410
|
|
|
1411 <!-- a href: change "#sect-id" urls to "bookID.sect.html#id" if urls='ex' -->
|
|
|
1412 <xsl:template match="a" mode="includeParsing">
|
|
|
1413 <a>
|
|
|
1414 <xsl:copy-of select="@*[name() != 'href']"/>
|
|
|
1415 <xsl:if test="@href">
|
|
|
1416
|
|
|
1417 <!-- href with http://domain_name/ part stripped off -->
|
|
|
1418 <xsl:variable name="temphref">
|
|
|
1419 <xsl:choose>
|
|
48
|
1420 <xsl:when test="starts-with(@href,'http:')">/<xsl:value-of select="substring-after(substring-after(@href,'.'),'/')"/>
|
|
32
|
1421 </xsl:when>
|
|
|
1422 <xsl:otherwise><xsl:value-of select="@href"/></xsl:otherwise>
|
|
|
1423 </xsl:choose>
|
|
|
1424 </xsl:variable>
|
|
|
1425
|
|
|
1426 <!-- authorID of /ccel hrefs -->
|
|
|
1427 <xsl:variable name="linkauthorID">
|
|
|
1428 <xsl:choose>
|
|
48
|
1429 <xsl:when test="starts-with($temphref,'/ccel/')"><xsl:value-of select="substring-before(substring-after($temphref,
|
|
32
|
1430 '/ccel/'),'/')"/>
|
|
|
1431 </xsl:when>
|
|
48
|
1432 <xsl:when test="starts-with($temphref,'/')"><xsl:value-of select="substring-before(substring($temphref,4),'/')"/>
|
|
32
|
1433 </xsl:when>
|
|
|
1434 </xsl:choose>
|
|
|
1435 </xsl:variable>
|
|
|
1436
|
|
|
1437 <!-- authLet of /ccel hrefs -->
|
|
|
1438 <xsl:variable name="linkauthLet" select="substring($linkauthorID,1,1)"/>
|
|
|
1439
|
|
|
1440 <!-- bookID of /ccel href -->
|
|
|
1441 <xsl:variable name="linkbookID">
|
|
|
1442 <xsl:choose>
|
|
48
|
1443 <xsl:when test="starts-with($temphref,'/ccel/')"><xsl:value-of select="substring-before(substring-after(substring-after(
|
|
32
|
1444 $temphref,'/ccel/'),'/'),'.')"/></xsl:when>
|
|
48
|
1445 <xsl:when test="starts-with($temphref,'/')"><xsl:value-of select="substring-before(substring-after(substring($temphref,
|
|
32
|
1446 4),'/'),'/')"/></xsl:when>
|
|
|
1447 </xsl:choose>
|
|
|
1448 </xsl:variable>
|
|
|
1449
|
|
|
1450 <!-- the filename extension of the link -->
|
|
|
1451 <xsl:variable name="linktype">
|
|
|
1452 <xsl:call-template name="getlinktype">
|
|
48
|
1453 <xsl:with-param name="theText" select="substring-after($temphref,$linkbookID)"/>
|
|
32
|
1454 </xsl:call-template>
|
|
|
1455 </xsl:variable>
|
|
|
1456
|
|
|
1457 <xsl:attribute name="href">
|
|
|
1458 <xsl:choose>
|
|
|
1459
|
|
|
1460 <!-- with a non-#id URL, and one big file -->
|
|
|
1461 <xsl:when test="(substring(@href,1,1)!='#' and substring(@href,1,1)!='?') or $urls='in'">
|
|
|
1462 <xsl:value-of select="@href"/>
|
|
|
1463 </xsl:when>
|
|
|
1464
|
|
|
1465 <!-- a #xxx-yyy URI -->
|
|
|
1466 <xsl:otherwise>
|
|
|
1467 <xsl:variable name="hrefSect">
|
|
|
1468 <xsl:choose>
|
|
|
1469 <xsl:when test="contains(@href,'-')">
|
|
|
1470 <xsl:value-of select="substring-after(substring-before(@href,'-'),'#')"/>
|
|
|
1471 </xsl:when>
|
|
|
1472 <xsl:otherwise>
|
|
|
1473 <xsl:value-of select="substring-after(@href,'#')"/>
|
|
|
1474 </xsl:otherwise>
|
|
|
1475 </xsl:choose>
|
|
|
1476 </xsl:variable>
|
|
|
1477 <xsl:variable name="hrefHash">
|
|
|
1478 <xsl:choose>
|
|
|
1479 <xsl:when test="contains(@href,'-')">
|
|
|
1480 <xsl:value-of select="@href"/>
|
|
|
1481 </xsl:when>
|
|
|
1482 <xsl:when test="contains(@href,'?')">
|
|
|
1483 <xsl:value-of select="substring-before(@href,'#')"/>
|
|
|
1484 </xsl:when>
|
|
|
1485 <xsl:otherwise>
|
|
|
1486 </xsl:otherwise>
|
|
|
1487 </xsl:choose>
|
|
|
1488 </xsl:variable>
|
|
48
|
1489 <xsl:value-of select="$bookID"/>.<xsl:value-of select="$hrefSect"/><xsl:text>.html</xsl:text>
|
|
32
|
1490 <xsl:value-of select="$hrefHash"/>
|
|
|
1491
|
|
|
1492 </xsl:otherwise>
|
|
|
1493 </xsl:choose>
|
|
|
1494 </xsl:attribute>
|
|
|
1495 </xsl:if>
|
|
|
1496 <xsl:apply-templates mode="includeParsing"/>
|
|
|
1497 </a>
|
|
|
1498 </xsl:template>
|
|
|
1499
|
|
|
1500 <!-- get extension of link -->
|
|
|
1501 <xsl:template name="getlinktype">
|
|
|
1502 <xsl:param name="theText"/>
|
|
|
1503 <xsl:choose>
|
|
|
1504 <xsl:when test="contains($theText,'.')">
|
|
|
1505 <xsl:call-template name="getlinktype">
|
|
|
1506 <xsl:with-param name="theText" select="substring-after($theText,'.')"/>
|
|
|
1507 </xsl:call-template>
|
|
|
1508 </xsl:when>
|
|
|
1509 <xsl:when test="contains($theText,'?')">
|
|
|
1510 <xsl:call-template name="getlinktype">
|
|
|
1511 <xsl:with-param name="theText" select="substring-before($theText,'?')"/>
|
|
|
1512 </xsl:call-template>
|
|
|
1513 </xsl:when>
|
|
|
1514 <xsl:when test="contains($theText,'#')">
|
|
|
1515 <xsl:call-template name="getlinktype">
|
|
|
1516 <xsl:with-param name="theText" select="substring-before($theText,'#')"/>
|
|
|
1517 </xsl:call-template>
|
|
|
1518 </xsl:when>
|
|
|
1519 <xsl:otherwise><xsl:value-of select="$theText"/></xsl:otherwise>
|
|
|
1520 </xsl:choose>
|
|
|
1521 </xsl:template>
|
|
|
1522
|
|
|
1523 <!-- pass through most HTML-compatible tags unchanged -->
|
|
|
1524 <xsl:template match="abbr|acronym|address|area|applet|b|bdo|big|blockquote|br|button|caption|center|cite|code|col|colgroup|dfn|del|dd|div|dl|dt|em|fieldset|font|form|frame|frameset|h1|h2|h3|h4|h5|h6|hr|i|iframe|img|input|ins|kbd|label|legend|li|map|noframes|object|ol|option|optgroup|p|param|pre|q|s|samp|script|select|small|strong|sub|sup|table|tbody|td|textarea|tfoot|th|thead|tr|tt|u|ul|var" mode="includeParsing">
|
|
|
1525 <xsl:element name="{local-name()}">
|
|
|
1526 <xsl:copy-of select="@*"/>
|
|
|
1527 <xsl:apply-templates mode="includeParsing"/>
|
|
|
1528 </xsl:element>
|
|
|
1529 </xsl:template>
|
|
|
1530
|
|
|
1531
|
|
|
1532 <xsl:template match="span" mode="includeParsing">
|
|
|
1533 <span>
|
|
|
1534 <xsl:copy-of select="@*"/>
|
|
|
1535 <xsl:if test="@lang='HE' and not(@class)">
|
|
|
1536 <xsl:attribute name="class">Hebrew</xsl:attribute>
|
|
|
1537 </xsl:if>
|
|
|
1538 <xsl:if test="@lang='EL' and not(@class)">
|
|
|
1539 <xsl:attribute name="class">Greek</xsl:attribute>
|
|
|
1540 </xsl:if>
|
|
|
1541 <xsl:apply-templates mode="includeParsing"/>
|
|
|
1542 </span>
|
|
|
1543 </xsl:template>
|
|
|
1544
|
|
|
1545
|
|
|
1546 <!-- process footnotes -->
|
|
|
1547 <xsl:template match="note" mode="includeParsing">
|
|
|
1548 <xsl:variable name="fref">fnf_<xsl:value-of select="@id"/></xsl:variable>
|
|
|
1549 <xsl:variable name="bref">fnb_<xsl:value-of select="@id"/></xsl:variable>
|
|
|
1550 <xsl:variable name="noteRef"><xsl:choose><xsl:when test="@n"><xsl:value-of select="@n"/></xsl:when><xsl:otherwise><xsl:value-of select="count(preceding::note | ancestor::note | preceding-sibling::note) + 1"/></xsl:otherwise></xsl:choose></xsl:variable>
|
|
|
1551
|
|
|
1552 <!-- notes processing, footnote mode -->
|
|
|
1553 <xsl:if test="$myNotes='foot'">
|
|
|
1554 <a class="Note">
|
|
|
1555 <xsl:attribute name="name"><xsl:value-of select="$bref"/></xsl:attribute>
|
|
|
1556 <xsl:attribute name="href">#<xsl:value-of select="$fref"/></xsl:attribute>
|
|
|
1557 <sup class="Note"><xsl:value-of select="$noteRef"/></sup>
|
|
|
1558 </a>
|
|
|
1559 </xsl:if>
|
|
|
1560
|
|
|
1561 <!-- notes processing, marginal notes mode -->
|
|
|
1562 <xsl:if test="$myNotes='margin' or $myNotes='hidden'">
|
|
|
1563 <a class="Note">
|
|
|
1564 <xsl:attribute name="href">javascript:toggle('<xsl:value-of select="$fref"/>');</xsl:attribute>
|
|
|
1565 <sup class="Note"><xsl:value-of select="$noteRef"/></sup>
|
|
|
1566 </a>
|
|
|
1567 <span class="mnote">
|
|
|
1568 <xsl:if test="$myNotes='hidden'"><xsl:attribute name="style">display: none</xsl:attribute></xsl:if>
|
|
|
1569 <xsl:attribute name="id"><xsl:value-of select="$fref"/></xsl:attribute><xsl:text> </xsl:text>
|
|
|
1570 <a class="Note">
|
|
|
1571 <xsl:attribute name="name">#<xsl:value-of select="$fref"/></xsl:attribute>
|
|
|
1572 <sup class="NoteRef">
|
|
|
1573 <xsl:value-of select="$noteRef"/>
|
|
|
1574 </sup>
|
|
|
1575 </a>
|
|
|
1576 <xsl:apply-templates mode="createNotesContent"/>
|
|
|
1577 </span>
|
|
|
1578
|
|
|
1579 </xsl:if>
|
|
|
1580
|
|
|
1581 </xsl:template>
|
|
|
1582
|
|
|
1583 <xsl:template match="div1|div2|div3|div4|div5" mode="createNotes">
|
|
|
1584 <!-- do nothing -->
|
|
|
1585 </xsl:template>
|
|
|
1586
|
|
|
1587 <xsl:template match="note" mode="createNotes">
|
|
|
1588 <xsl:variable name="fref">fnf_<xsl:value-of select="@id"/></xsl:variable>
|
|
|
1589 <xsl:variable name="bref">fnb_<xsl:value-of select="@id"/></xsl:variable>
|
|
|
1590 <xsl:variable name="noteRef"><xsl:choose><xsl:when test="@n"><xsl:value-of select="@n"/></xsl:when><xsl:otherwise><xsl:value-of select="count(preceding::note | ancestor::note | preceding-sibling::note) + 1"/></xsl:otherwise></xsl:choose></xsl:variable>
|
|
|
1591
|
|
|
1592 <p class="noteMark">
|
|
48
|
1593 <a class="Note" name="{$fref}" id="{$fref}">
|
|
32
|
1594 <sup class="NoteRef"><xsl:value-of select="$noteRef"/></sup>
|
|
|
1595 </a>
|
|
|
1596 </p>
|
|
|
1597 <div class="Note">
|
|
|
1598 <xsl:apply-templates mode="includeParsing"/>
|
|
|
1599 </div>
|
|
|
1600 </xsl:template>
|
|
|
1601
|
|
|
1602 <xsl:template match="text()" mode="createNotes">
|
|
|
1603 </xsl:template>
|
|
|
1604
|
|
|
1605 <xsl:template match="text()" mode="includeParsing">
|
|
|
1606 <xsl:choose>
|
|
|
1607 <xsl:when test="$words != '1'">
|
|
|
1608 <xsl:value-of select="."/>
|
|
|
1609 </xsl:when>
|
|
|
1610 <xsl:otherwise>
|
|
|
1611 <xsl:call-template name="linkWords">
|
|
|
1612 <xsl:with-param name="theText" select="normalize-space()"/>
|
|
|
1613 <xsl:with-param name="id">
|
|
|
1614 <xsl:value-of select="../@id"/><xsl:text>.</xsl:text>
|
|
|
1615 <xsl:value-of select="position()"/>
|
|
|
1616 </xsl:with-param>
|
|
|
1617 <xsl:with-param name="word" select="0"/>
|
|
|
1618 </xsl:call-template>
|
|
|
1619 </xsl:otherwise>
|
|
|
1620 </xsl:choose>
|
|
|
1621 </xsl:template>
|
|
|
1622
|
|
|
1623 <!-- linkWords: put <a> around each word, so you can process it with
|
|
|
1624 javascript, e.g. right-click to look it up in a dictionary -->
|
|
|
1625 <xsl:template name="linkWords">
|
|
|
1626 <xsl:choose>
|
|
|
1627 <xsl:when test="$theText=''"></xsl:when>
|
|
|
1628 <xsl:when test="$theText=' '"><xsl:text> </xsl:text></xsl:when>
|
|
|
1629 <xsl:when test="substring-before($theText,' ')=''">
|
|
|
1630 <a id="{$id}.w{$word}"><xsl:value-of select="$theText"/></a><xsl:text>
|
|
|
1631 </xsl:text>
|
|
|
1632 </xsl:when>
|
|
|
1633 <xsl:otherwise>
|
|
|
1634 <a id="{$id}.w{$word}">
|
|
|
1635 <xsl:value-of select="substring-before($theText,' ')"/>
|
|
|
1636 </a><xsl:text>
|
|
|
1637 </xsl:text>
|
|
|
1638 <xsl:call-template name="linkWords">
|
|
|
1639 <xsl:with-param name="theText" select="substring-after($theText,' ')"/>
|
|
|
1640 <xsl:with-param name="word" select="$word + 1"/>
|
|
|
1641 <xsl:with-param name="id" select="$id"/>
|
|
|
1642 </xsl:call-template>
|
|
|
1643 </xsl:otherwise>
|
|
|
1644 </xsl:choose>
|
|
|
1645
|
|
|
1646 </xsl:template>
|
|
|
1647
|
|
|
1648 <!-- look-up table mapping language codes to names -->
|
|
|
1649 <lang:name code="en">English</lang:name>
|
|
|
1650 <lang:name code="zh">Chinese</lang:name>
|
|
|
1651 <lang:name code="cn">Chinese</lang:name>
|
|
|
1652 <lang:name code="nl">Dutch</lang:name>
|
|
|
1653 <lang:name code="fr">French</lang:name>
|
|
|
1654 <lang:name code="fy">Frisian</lang:name>
|
|
|
1655 <lang:name code="de">German</lang:name>
|
|
|
1656 <lang:name code="el">Greek</lang:name>
|
|
|
1657 <lang:name code="he">Hebrew</lang:name>
|
|
|
1658 <lang:name code="it">Italian</lang:name>
|
|
|
1659 <lang:name code="la">Latin</lang:name>
|
|
|
1660 <lang:name code="pt">Portuguese</lang:name>
|
|
|
1661 <lang:name code="ru">Russian</lang:name>
|
|
|
1662 <lang:name code="es">Spanish</lang:name>
|
|
|
1663
|
|
|
1664 <!--This list is used to generate the contents for a dictionary-->
|
|
|
1665 <letter:alphabet>
|
|
|
1666 <letter:letter>a</letter:letter>
|
|
|
1667 <letter:letter>b</letter:letter>
|
|
|
1668 <letter:letter>c</letter:letter>
|
|
|
1669 <letter:letter>d</letter:letter>
|
|
|
1670 <letter:letter>e</letter:letter>
|
|
|
1671 <letter:letter>f</letter:letter>
|
|
|
1672 <letter:letter>g</letter:letter>
|
|
|
1673 <letter:letter>h</letter:letter>
|
|
|
1674 <letter:letter>i</letter:letter>
|
|
|
1675 <letter:letter>j</letter:letter>
|
|
|
1676 <letter:letter>k</letter:letter>
|
|
|
1677 <letter:letter>l</letter:letter>
|
|
|
1678 <letter:letter>m</letter:letter>
|
|
|
1679 <letter:letter>n</letter:letter>
|
|
|
1680 <letter:letter>o</letter:letter>
|
|
|
1681 <letter:letter>p</letter:letter>
|
|
|
1682 <letter:letter>q</letter:letter>
|
|
|
1683 <letter:letter>r</letter:letter>
|
|
|
1684 <letter:letter>s</letter:letter>
|
|
|
1685 <letter:letter>t</letter:letter>
|
|
|
1686 <letter:letter>u</letter:letter>
|
|
|
1687 <letter:letter>v</letter:letter>
|
|
|
1688 <letter:letter>w</letter:letter>
|
|
|
1689 <letter:letter>x</letter:letter>
|
|
|
1690 <letter:letter>y</letter:letter>
|
|
|
1691 <letter:letter>z</letter:letter>
|
|
|
1692 </letter:alphabet>
|
|
|
1693
|
|
|
1694 <xsl:template name="url-encode">
|
|
|
1695 <xsl:param name="str"/>
|
|
|
1696 <xsl:param name="isRec"/>
|
|
|
1697 <xsl:if test="$str">
|
|
48
|
1698 <xsl:variable name="trans">
|
|
32
|
1699 <xsl:value-of select="translate($str,$termTrans,'abcdefghijklmnopqrstuvwxyz+')"/>
|
|
|
1700 </xsl:variable>
|
|
|
1701 <xsl:choose>
|
|
|
1702 <xsl:when test="$desktop=0">
|
|
|
1703 <xsl:value-of select="str:encode-uri($trans,true())"/>
|
|
|
1704 </xsl:when>
|
|
|
1705 <xsl:otherwise>
|
|
|
1706 <xsl:value-of select="translate($trans,' ','+')"/>
|
|
|
1707 </xsl:otherwise>
|
|
|
1708 </xsl:choose>
|
|
|
1709 </xsl:if>
|
|
|
1710 </xsl:template>
|
|
|
1711
|
|
|
1712 <xsl:template name="url-decode">
|
|
|
1713 <xsl:param name="encoded"/>
|
|
|
1714 <xsl:if test="$encoded">
|
|
|
1715 <xsl:choose>
|
|
|
1716 <xsl:when test="$desktop=0">
|
|
|
1717 <xsl:value-of select="str:decode-uri($encoded)"/>
|
|
|
1718 </xsl:when>
|
|
|
1719 <xsl:otherwise>
|
|
|
1720 <xsl:value-of select="$encoded"/>
|
|
|
1721 </xsl:otherwise>
|
|
|
1722 </xsl:choose>
|
|
|
1723 </xsl:if>
|
|
|
1724 </xsl:template>
|
|
|
1725 </xsl:stylesheet>
|