2 <!DOCTYPE xsl:transform [
3 <!ENTITY % xhtml.characters SYSTEM "htmlchar.mod">
12 Revision 1.1 2005/01/30 01:32:52 jonathan.blake
13 Initial freepository revision of XML support documents.
15 Revision 1.1 2003/01/15 17:24:02 jblake
16 Initial revision - originally xhtml.xsl:
18 Revision 1.11 2002/12/06 22:12:04 jblake
19 Added default namespace declaration to transformation element
20 and removed all the extraneous declarations in the template
23 Revision 1.10 2002/11/17 22:37:25 jblake
24 Removed the "medium" creator entry from the templates.
25 Will they be of any use?
27 Revision 1.9 2002/11/17 05:06:56 jblake
28 Rearranged the title page.
30 Revision 1.8 2002/11/15 19:35:25 jblake
31 Fixed "Content-type" of XHTML output.
33 Revision 1.7 2002/11/15 00:15:39 jblake
34 Fixed a problem with the client-side image map and fixed
35 the numbered section list generation so that it will work
36 for Shadow on the Sand.
38 Revision 1.6 2002/10/30 05:59:45 jblake
39 Added a value for the alt attribute of the ToC image on the navigation bar.
41 Revision 1.5 2002/10/24 15:53:41 jblake
42 Fixed a conflict with whitespace and paragraphed lists.
44 Revision 1.4 2002/10/24 15:06:51 jblake
45 Added xmlns attributes to all elements that are top level in
46 their templates. This was an adjustment required by Xalan-J 2.4.
48 Also reinstated the comment in each document since the new
49 version of Xalan redirects it properly.
51 Revision 1.3 2002/10/23 05:18:29 jblake
52 Added the capability to filter which illustrators' work is used.
53 This is accomplished by the "use-illustrators" parameter.
55 Revision 1.2 2002/10/20 06:25:35 jblake
56 Added support for CLOSE COMBAT SKILL for Freeway Warrior books.
58 Revision 1.1 2002/10/15 23:29:51 jblake
62 20020327 - repurposed to be used with Xalan Java 2
66 * Add blank whitespace handling to the paragraphed list template
70 <xsl:transform version="1.0"
71 xmlns="http://www.w3.org/1999/xhtml"
72 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
73 xmlns:lxslt="http://xml.apache.org/xslt">
75 <xsl:output method="html"
77 omit-xml-declaration="yes"
78 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
79 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
81 <xsl:strip-space elements="gamebook section meta data ol ul dl li dd footnotes footnote illustration instance" />
82 <xsl:preserve-space elements="p choice" />
84 <!-- ====================== parameters ========================== -->
86 <xsl:param name="book-path"><xsl:text>undefined-book</xsl:text></xsl:param>
87 <xsl:param name="use-illustrators" />
89 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~ colors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
91 <xsl:param name="link-color"><xsl:text>#ff0000</xsl:text></xsl:param>
92 <xsl:param name="alink-color"><xsl:value-of select="$link-color" /></xsl:param>
93 <xsl:param name="vlink-color"><xsl:value-of select="$link-color" /></xsl:param>
95 <xsl:param name="text-color"><xsl:text>#000000</xsl:text></xsl:param>
96 <xsl:param name="background-color"><xsl:text>#ffffe4</xsl:text></xsl:param>
98 <!-- ======================= variables ========================== -->
100 <xsl:variable name="newline">
105 <!-- ======================== Templates ========================= -->
107 <!-- ================= hierarchical sections ==================== -->
109 <xsl:template match="meta" />
110 <xsl:template match="section" />
112 <!-- ::::::::::::::::::: top-level section :::::::::::::::::::::: -->
114 <xsl:template match="/gamebook/section[@id='title']">
115 <html xml:lang="en-UK" lang="en-UK">
117 <xsl:value-of select="$newline" />
118 <xsl:value-of select="$newline" />
120 <head><xsl:value-of select="$newline" />
122 <xsl:value-of select="/gamebook/meta/title[1]" />
123 </title><xsl:value-of select="$newline" />
124 <meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1" /><xsl:value-of select="$newline" />
125 <meta name="robots" content="noindex,nofollow" /><xsl:value-of select="$newline" />
126 <link rel="stylesheet" href="main.css" type="text/css" /><xsl:value-of select="$newline" />
129 <xsl:value-of select="$newline" />
130 <xsl:value-of select="$newline" />
133 <xsl:text> </xsl:text>
134 <xsl:apply-templates select="/gamebook/meta/rights[@class='copyrights']" />
135 <xsl:text> Published by </xsl:text>
136 <xsl:value-of select="/gamebook/meta/publisher[1]" />
137 <xsl:text>. </xsl:text>
140 <xsl:value-of select="$newline" />
141 <xsl:value-of select="$newline" />
144 <xsl:attribute name="text"><xsl:value-of select="$text-color" /></xsl:attribute>
145 <xsl:attribute name="bgcolor"><xsl:value-of select="$background-color" /></xsl:attribute>
146 <xsl:attribute name="background"><xsl:text>bckgrnd.gif</xsl:text></xsl:attribute>
147 <xsl:attribute name="link"><xsl:value-of select="$link-color" /></xsl:attribute>
148 <xsl:attribute name="alink"><xsl:value-of select="$alink-color" /></xsl:attribute>
149 <xsl:attribute name="vlink"><xsl:value-of select="$vlink-color" /></xsl:attribute>
151 <xsl:value-of select="$newline" />
152 <h1 id="title"><xsl:value-of select="/gamebook/meta/title[1]" /></h1><xsl:value-of select="$newline" />
153 <div id="body"><xsl:value-of select="$newline" />
155 <div class="frontmatter"><xsl:value-of select="$newline" />
157 <xsl:apply-templates select="/gamebook/meta/description[@class='blurb']" />
158 <xsl:apply-templates select="/gamebook/meta/creator[@class='long']" />
162 <xsl:apply-templates select="/gamebook/meta/description[@class='publication']" />
165 <xsl:text>Publication Date: </xsl:text>
166 <xsl:value-of select="/gamebook/meta/date[@class='publication']/day" />
167 <xsl:text> </xsl:text>
169 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 1">
170 <xsl:text>January</xsl:text>
172 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 2">
173 <xsl:text>February</xsl:text>
175 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 3">
176 <xsl:text>March</xsl:text>
178 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 4">
179 <xsl:text>April</xsl:text>
181 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 5">
182 <xsl:text>May</xsl:text>
184 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 6">
185 <xsl:text>June</xsl:text>
187 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 7">
188 <xsl:text>July</xsl:text>
190 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 8">
191 <xsl:text>August</xsl:text>
193 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 9">
194 <xsl:text>September</xsl:text>
196 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 10">
197 <xsl:text>October</xsl:text>
199 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 11">
200 <xsl:text>November</xsl:text>
202 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 12">
203 <xsl:text>December</xsl:text>
206 <xsl:text>Invalid Month</xsl:text>
209 <xsl:text> </xsl:text>
210 <xsl:value-of select="/gamebook/meta/date[@class='publication']/year" />
213 <xsl:apply-templates select="/gamebook/meta/rights[@class='license-notification']" />
214 <xsl:value-of select="$newline" />
216 <xsl:apply-templates select="data/section[@class='frontmatter']" />
218 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
220 <div class="mainmatter"><xsl:value-of select="$newline" />
221 <xsl:apply-templates select="/gamebook/section/data/section[@class='mainmatter']" />
222 <xsl:apply-templates select="/gamebook/section/data/section[@class='glossary']" />
223 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
225 <div class="numbered"><xsl:value-of select="$newline" />
226 <xsl:apply-templates select="/gamebook/section/data/section[@class='numbered']" />
227 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
229 <div class="backmatter"><xsl:value-of select="$newline" />
230 <xsl:apply-templates select="/gamebook/section/data/section[@class='backmatter']" />
231 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
234 <h2>Footnotes</h2><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
235 <xsl:for-each select="//footnote">
236 <xsl:variable name="footnote-idref" select="@idref" />
237 <xsl:variable name="footnote-id" select="@id" />
238 <xsl:variable name="footnote-marker"><xsl:number count="footnotes/footnote" from="/" level="any" format="1" /></xsl:variable>
239 <xsl:for-each select="*">
241 <xsl:when test="preceding-sibling::node( )">
242 <xsl:apply-templates select="." />
246 <xsl:text>[</xsl:text>
247 <a href="#{$footnote-idref}" name="{$footnote-id}"><xsl:value-of select="$footnote-marker" /></a>
248 <xsl:text>] </xsl:text>
249 <xsl:apply-templates select="child::node()" />
255 </div><xsl:value-of select="$newline" />
257 </div><xsl:value-of select="$newline" />
260 <xsl:value-of select="$newline" />
261 <xsl:value-of select="$newline" />
266 <xsl:template match="/gamebook/section[@id='toc']" />
268 <!-- ::::::::::: second-level frontmatter sections :::::::::::::: -->
270 <xsl:template match="/gamebook/section/data/section[@class='frontmatter']">
271 <h2><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:value-of select="meta/title" /></a></h2><xsl:value-of select="$newline" />
272 <xsl:value-of select="$newline" />
273 <xsl:apply-templates />
274 <xsl:value-of select="$newline" />
277 <!-- :::::::::::: third-level frontmatter sections ::::::::::::: -->
279 <xsl:template match="/gamebook/section/data/section/data/section[@class='frontmatter' or @class='frontmatter-separate']">
280 <h3><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:value-of select="meta/title" /></a></h3><xsl:value-of select="$newline" />
281 <xsl:value-of select="$newline" />
282 <xsl:apply-templates />
283 <xsl:value-of select="$newline" />
286 <!-- :::::::::::: fourth-level frontmatter sections :::::::::::: -->
288 <xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='frontmatter']">
289 <h4><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:value-of select="meta/title" /></a></h4><xsl:value-of select="$newline" />
290 <xsl:value-of select="$newline" />
291 <xsl:apply-templates />
292 <xsl:value-of select="$newline" />
295 <!-- ::::::::::::: fifth-level frontmatter sections :::::::::::: -->
297 <xsl:template match="/gamebook/section/data/section/data/section/data/section/data/section[@class='frontmatter']">
298 <h5><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:value-of select="meta/title" /></a></h5><xsl:value-of select="$newline" />
299 <xsl:value-of select="$newline" />
300 <xsl:apply-templates />
301 <xsl:value-of select="$newline" />
304 <!-- ::::::::::: second-level main matter sections :::::::::::::: -->
306 <xsl:template match="/gamebook/section/data/section[@class='mainmatter']">
307 <h2><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:value-of select="meta/title" /></a></h2><xsl:value-of select="$newline" />
308 <xsl:value-of select="$newline" />
309 <xsl:apply-templates />
310 <xsl:value-of select="$newline" />
313 <!-- :::::::::::: third-level main matter sections ::::::::::::: -->
315 <xsl:template match="/gamebook/section/data/section/data/section[@class='mainmatter' or @class='mainmatter-separate']">
316 <h3><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:value-of select="meta/title" /></a></h3><xsl:value-of select="$newline" />
317 <xsl:value-of select="$newline" />
318 <xsl:apply-templates />
319 <xsl:value-of select="$newline" />
322 <!-- :::::::::::: fourth-level main matter sections :::::::::::: -->
324 <xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='mainmatter']">
325 <h4><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:value-of select="meta/title" /></a></h4><xsl:value-of select="$newline" />
326 <xsl:value-of select="$newline" />
327 <xsl:apply-templates />
328 <xsl:value-of select="$newline" />
331 <!-- ::::::::::::: fifth-level main matter sections :::::::::::: -->
333 <xsl:template match="/gamebook/section/data/section/data/section/data/section/data/section[@class='mainmatter']">
334 <h5><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:value-of select="meta/title" /></a></h5><xsl:value-of select="$newline" />
335 <xsl:value-of select="$newline" />
336 <xsl:apply-templates />
337 <xsl:value-of select="$newline" />
340 <!-- :::::::::::: second-level glossary sections ::::::::::::: -->
342 <xsl:template match="/gamebook/section/data/section[@class='glossary']">
343 <xsl:variable name="glossary-id-prefix"><xsl:text>topics</xsl:text></xsl:variable>
344 <h2><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:value-of select="meta/title" /></a></h2><xsl:value-of select="$newline" />
345 <xsl:value-of select="$newline" />
346 <xsl:apply-templates />
347 <xsl:value-of select="$newline" />
350 <!-- :::::::::::: third-level glossary sections ::::::::::::: -->
351 <!-- glossary sections should be enclosed in a second level glossary section -->
353 <xsl:template match="/gamebook/section/data/section/data/section[@class='glossary']">
354 <h3><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:value-of select="meta/title" /></a></h3><xsl:value-of select="$newline" />
355 <xsl:call-template name="alpha-bar">
356 <xsl:with-param name="alpha-bar-id-prefix">topics</xsl:with-param>
358 <xsl:value-of select="$newline" />
359 <xsl:apply-templates />
360 <xsl:value-of select="$newline" />
363 <!-- :::::::::::::::::: numbered sections ::::::::::::::::::::::: -->
365 <xsl:template match="/gamebook/section/data/section[@class='numbered']">
366 <h2><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:value-of select="meta/title" /></a></h2><xsl:value-of select="$newline" />
367 <xsl:value-of select="$newline" />
368 <xsl:apply-templates />
369 <xsl:value-of select="$newline" />
372 <xsl:template match="/gamebook/section/data/section/data/section[@class='numbered']">
373 <h3><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:value-of select="meta/title" /></a></h3><xsl:value-of select="$newline" />
374 <xsl:value-of select="$newline" />
375 <xsl:apply-templates />
376 <xsl:value-of select="$newline" />
379 <!-- :::::::::::: second-level backmatter sections :::::::::::::: -->
381 <xsl:template match="/gamebook/section/data/section[@class='backmatter']">
382 <h2><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:value-of select="meta/title" /></a></h2><xsl:value-of select="$newline" />
383 <xsl:value-of select="$newline" />
384 <xsl:apply-templates />
385 <xsl:value-of select="$newline" />
388 <!-- ::::::::::::: third-level back matter sections ::::::::::::: -->
390 <xsl:template match="/gamebook/section/data/section/data/section[@class='backmatter']">
391 <h3><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:value-of select="meta/title" /></a></h3><xsl:value-of select="$newline" />
392 <xsl:value-of select="$newline" />
393 <xsl:apply-templates />
394 <xsl:value-of select="$newline" />
397 <!-- ::::::::::::: fourth-level back matter sections ::::::::::::: -->
399 <xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='backmatter']">
400 <h4><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:value-of select="meta/title" /></a></h4><xsl:value-of select="$newline" />
401 <xsl:value-of select="$newline" />
402 <xsl:apply-templates />
403 <xsl:value-of select="$newline" />
406 <!-- ==================== block elements ======================== -->
408 <xsl:template match="p">
409 <p><xsl:apply-templates /></p>
410 <xsl:value-of select="$newline" />
413 <xsl:template match="p[@class='dedication']">
414 <p class="dedication"><xsl:apply-templates /></p>
415 <xsl:value-of select="$newline" />
418 <xsl:template match="dl[@class='paragraphed']/dd/node() | ol[@class='paragraphed']/li/node() | ul[@class='paragraphed']/li/node()">
420 <xsl:when test="self::p">
421 <xsl:apply-templates /><br /><br /><xsl:value-of select="$newline" />
423 <xsl:when test="self::dl">
424 <dl><xsl:value-of select="$newline" />
425 <xsl:apply-templates />
426 </dl><br /><br /><xsl:value-of select="$newline" />
428 <xsl:when test="self::ol">
429 <ol><xsl:value-of select="$newline" />
430 <xsl:apply-templates />
431 </ol><br /><br /><xsl:value-of select="$newline" />
433 <xsl:when test="self::ul">
435 <xsl:if test="self::*[@class='unbulleted']"><xsl:attribute name="class"><xsl:text>unbulleted</xsl:text></xsl:attribute></xsl:if>
436 <xsl:value-of select="$newline" />
437 <xsl:apply-templates />
438 </ul><br /><br /><xsl:value-of select="$newline" />
440 <xsl:when test="self::blockquote">
441 <blockquote><xsl:value-of select="$newline" />
442 <xsl:apply-templates />
443 </blockquote><xsl:value-of select="$newline" />
445 <xsl:when test="self::illustration" />
447 <xsl:text>[error: paragraphed list template]</xsl:text>
452 <xsl:template match="ol">
453 <ol><xsl:value-of select="$newline" />
454 <xsl:apply-templates />
455 </ol><xsl:value-of select="$newline" />
458 <xsl:template match="ul">
460 <xsl:if test="self::*[@class='unbulleted']"><xsl:attribute name="class"><xsl:text>unbulleted</xsl:text></xsl:attribute></xsl:if>
461 <xsl:value-of select="$newline" />
462 <xsl:apply-templates />
463 </ul><xsl:value-of select="$newline" />
466 <xsl:template match="dl">
467 <dl><xsl:value-of select="$newline" />
468 <xsl:apply-templates />
469 </dl><xsl:value-of select="$newline" />
472 <xsl:template match="dt">
473 <dt><xsl:apply-templates /></dt>
474 <xsl:value-of select="$newline" />
477 <xsl:template match="dd">
478 <dd><xsl:apply-templates /></dd>
479 <xsl:value-of select="$newline" />
482 <xsl:template match="li">
483 <li><xsl:apply-templates /></li>
484 <xsl:value-of select="$newline" />
487 <xsl:template match="table">
488 <table border="1" cellspacing="0" cellpadding="2">
489 <xsl:apply-templates />
491 <xsl:value-of select="$newline" />
494 <xsl:template match="tr">
496 <xsl:apply-templates />
500 <xsl:template match="th">
502 <xsl:if test="@align"><xsl:attribute name="align"><xsl:value-of select="@align" /></xsl:attribute></xsl:if>
503 <xsl:if test="@valign"><xsl:attribute name="valign"><xsl:value-of select="@valign" /></xsl:attribute></xsl:if>
504 <xsl:if test="@char"><xsl:attribute name="char"><xsl:value-of select="@char" /></xsl:attribute></xsl:if>
505 <xsl:apply-templates />
509 <xsl:template match="td">
511 <xsl:if test="@align"><xsl:attribute name="align"><xsl:value-of select="@align" /></xsl:attribute></xsl:if>
512 <xsl:if test="@valign"><xsl:attribute name="valign"><xsl:value-of select="@valign" /></xsl:attribute></xsl:if>
513 <xsl:if test="@char"><xsl:attribute name="char"><xsl:value-of select="@char" /></xsl:attribute></xsl:if>
514 <xsl:apply-templates />
518 <xsl:template match="combat">
520 <xsl:apply-templates select="enemy" />
521 <xsl:text>: </xsl:text>
523 <xsl:when test="enemy-attribute[@class='combatskill']">
524 <span class="smallcaps">COMBAT<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>SKILL</span>
525 <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
526 <xsl:value-of select="enemy-attribute[@class='combatskill']" />
528 <xsl:when test="enemy-attribute[@class='closecombatskill']">
529 <span class="smallcaps">CLOSE<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>COMBAT<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>SKILL</span>
530 <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
531 <xsl:value-of select="enemy-attribute[@class='closecombatskill']" />
534 <xsl:text disable-output-escaping="yes"> &nbsp;&nbsp;</xsl:text>
535 <span class="smallcaps">ENDURANCE</span>
537 <xsl:when test="enemy-attribute[@class='target']">
538 <xsl:text> (</xsl:text><span class="smallcaps">TARGET</span><xsl:text> points)</xsl:text>
539 <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
540 <xsl:value-of select="enemy-attribute[@class='target']" />
542 <xsl:when test="enemy-attribute[@class='resistance']">
543 <xsl:text> (</xsl:text><span class="smallcaps">RESISTANCE</span><xsl:text> points)</xsl:text>
544 <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
545 <xsl:value-of select="enemy-attribute[@class='resistance']" />
548 <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
549 <xsl:value-of select="enemy-attribute[@class='endurance']" />
553 <xsl:value-of select="$newline" />
556 <xsl:template match="choice">
557 <xsl:variable name="link">
558 <xsl:value-of select="@idref" />
562 <xsl:for-each select="* | text()">
564 <xsl:when test="self::link-text">
566 <xsl:apply-templates />
570 <xsl:apply-templates select="." />
575 <xsl:value-of select="$newline" />
578 <xsl:template match="signpost">
579 <div class="signpost">
580 <xsl:apply-templates />
582 <xsl:value-of select="$newline" />
585 <xsl:template match="blockquote">
586 <blockquote><xsl:value-of select="$newline" />
587 <xsl:apply-templates /><xsl:value-of select="$newline" />
588 </blockquote><xsl:value-of select="$newline" />
591 <xsl:template match="illustration" />
593 <xsl:template match="instance" />
595 <xsl:template match="footnotes" />
597 <xsl:template match="footnote" />
599 <xsl:template match="hr">
601 <xsl:value-of select="$newline" />
604 <!-- ==================== inline elements ======================= -->
606 <xsl:template match="a">
608 <xsl:when test="@href">
610 <xsl:attribute name="href"><xsl:value-of select="@href" /></xsl:attribute>
611 <xsl:if test="@id"><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute></xsl:if>
612 <xsl:apply-templates />
617 <xsl:if test="@idref">
618 <xsl:attribute name="href"><xsl:text>#</xsl:text><xsl:value-of select="@idref" /></xsl:attribute>
621 <xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute>
623 <xsl:apply-templates />
629 <xsl:template match="a[@class='footnote']">
630 <xsl:apply-templates />
633 <xsl:attribute name="href"><xsl:text>#</xsl:text><xsl:value-of select="@idref" /></xsl:attribute>
634 <xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute>
635 <xsl:number count="a[@class='footnote']" from="/" level="any" format="1" />
640 <xsl:template match="em">
641 <em><xsl:apply-templates /></em>
644 <xsl:template match="strong">
645 <strong><xsl:apply-templates /></strong>
648 <xsl:template match="thought">
649 <i><xsl:apply-templates /></i>
652 <xsl:template match="onomatopoeia">
653 <i><xsl:apply-templates /></i>
656 <xsl:template match="spell">
657 <i><xsl:apply-templates /></i>
660 <xsl:template match="item">
661 <xsl:apply-templates />
664 <xsl:template match="foreign">
665 <i><xsl:apply-templates /></i>
668 <xsl:template match="quote">
669 <xsl:text>'</xsl:text>
670 <xsl:apply-templates />
671 <xsl:text>'</xsl:text>
674 <xsl:template match="quote//quote">
675 <xsl:text>"</xsl:text>
676 <xsl:apply-templates />
677 <xsl:text>"</xsl:text>
680 <xsl:template match="cite">
681 <cite><xsl:apply-templates /></cite>
684 <xsl:template match="code">
685 <tt><xsl:apply-templates /></tt>
688 <xsl:template match="br">
692 <xsl:template match="typ[@class='attribute']">
693 <span class="smallcaps"><xsl:apply-templates /></span>
696 <!-- ==================== named templates ======================= -->
698 <xsl:template name="alpha-bar">
699 <xsl:param name="alpha-bar-id-prefix"></xsl:param>
701 <p class="navigation">[<a href="#{$alpha-bar-id-prefix}a">A</a> <a href="#{$alpha-bar-id-prefix}b">B</a> <a href="#{$alpha-bar-id-prefix}c">C</a> <a href="#{$alpha-bar-id-prefix}d">D</a> <a href="#{$alpha-bar-id-prefix}e">E</a> <a href="#{$alpha-bar-id-prefix}f">F</a> <a href="#{$alpha-bar-id-prefix}g">G</a> <a href="#{$alpha-bar-id-prefix}h">H</a> <a href="#{$alpha-bar-id-prefix}i">I</a> <a href="#{$alpha-bar-id-prefix}j">J</a> <a href="#{$alpha-bar-id-prefix}k">K</a> <a href="#{$alpha-bar-id-prefix}l">L</a> <a href="#{$alpha-bar-id-prefix}m">M</a> <a href="#{$alpha-bar-id-prefix}n">N</a> <a href="#{$alpha-bar-id-prefix}o">O</a> <a href="#{$alpha-bar-id-prefix}p">P</a> <a href="#{$alpha-bar-id-prefix}q">Q</a> <a href="#{$alpha-bar-id-prefix}r">R</a> <a href="#{$alpha-bar-id-prefix}s">S</a> <a href="#{$alpha-bar-id-prefix}t">T</a> <a href="#{$alpha-bar-id-prefix}u">U</a> <a href="#{$alpha-bar-id-prefix}v">V</a> <a href="#{$alpha-bar-id-prefix}w">W</a> <a href="#{$alpha-bar-id-prefix}x">X</a> <a href="#{$alpha-bar-id-prefix}y">Y</a> <a href="#{$alpha-bar-id-prefix}z">Z</a>]</p><xsl:value-of select="$newline" />