2 <!DOCTYPE xsl:transform [
3 <!ENTITY % xhtml.characters SYSTEM "../../en/xml/htmlchar.mod">
11 * Add blank whitespace handling to the paragraphed list template
15 <xsl:transform version="1.0"
16 xmlns="http://www.w3.org/1999/xhtml"
17 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
18 xmlns:redirect="org.apache.xalan.lib.Redirect"
19 extension-element-prefixes="redirect">
21 <xsl:output method="xml"
23 omit-xml-declaration="yes"
24 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
25 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
27 <xsl:strip-space elements="section data ol ul dl li dd footnotes footnote" />
28 <xsl:preserve-space elements="p choice puzzle deadend" />
30 <!-- ====================== parameters ========================== -->
32 <xsl:param name="use-illustrators" />
33 <xsl:param name="language"><xsl:text>en</xsl:text></xsl:param>
35 <!-- ======================= variables ========================== -->
37 <xsl:variable name="newline">
42 <!-- ======================== Templates ========================= -->
44 <!-- ================= hierarchical sections ==================== -->
46 <xsl:template match="meta" />
47 <xsl:template match="section" />
49 <xsl:template match="/gamebook">
50 <html xml:lang="en-UK" lang="en-UK">
52 <xsl:value-of select="$newline" />
53 <xsl:value-of select="$newline" />
55 <head><xsl:value-of select="$newline" />
57 <xsl:apply-templates select="/gamebook/meta/title[1]" />
58 </title><xsl:value-of select="$newline" />
59 <meta http-equiv="Content-type" content="text/html; charset=utf-8" /><xsl:value-of select="$newline" />
60 <meta name="robots" content="noindex,nofollow" /><xsl:value-of select="$newline" />
63 <xsl:value-of select="$newline" />
64 <xsl:value-of select="$newline" />
68 <xsl:text> </xsl:text>
69 <xsl:apply-templates select="/gamebook/meta/rights[@class='copyrights']" />
71 <xsl:when test="$language='es'">
72 <xsl:text> Publicado por </xsl:text>
75 <xsl:text> Published by </xsl:text>
78 <xsl:apply-templates select="/gamebook/meta/publisher[1]" />
79 <xsl:text>. </xsl:text>
82 <xsl:value-of select="$newline" />
83 <xsl:value-of select="$newline" />
87 <xsl:apply-templates select="/gamebook/meta/title[1]" />
89 </h1><xsl:value-of select="$newline" />
91 <xsl:apply-templates/>
97 <!-- ::::::::::::::::::: top-level section :::::::::::::::::::::: -->
99 <xsl:template match="/gamebook/section[@id='title']">
100 <div class="frontmatter"><xsl:value-of select="$newline" />
102 <xsl:apply-templates select="/gamebook/meta/description[@class='blurb']" />
103 <xsl:apply-templates select="/gamebook/meta/creator[@class='long']" />
107 <xsl:apply-templates select="/gamebook/meta/description[@class='publication']" />
111 <xsl:when test="$language='es'">
112 <xsl:text>Fecha de Publicación: </xsl:text>
115 <xsl:text>Publication Date: </xsl:text>
118 <xsl:value-of select="/gamebook/meta/date[@class='publication']/day" />
119 <xsl:text> </xsl:text>
121 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 1">
123 <xsl:when test="$language='es'"><xsl:text>de enero de</xsl:text></xsl:when>
124 <xsl:otherwise><xsl:text>January</xsl:text></xsl:otherwise>
127 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 2">
129 <xsl:when test="$language='es'"><xsl:text>de febrero de</xsl:text></xsl:when>
130 <xsl:otherwise><xsl:text>February</xsl:text></xsl:otherwise>
133 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 3">
135 <xsl:when test="$language='es'"><xsl:text>de marzo de</xsl:text></xsl:when>
136 <xsl:otherwise><xsl:text>March</xsl:text></xsl:otherwise>
139 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 4">
141 <xsl:when test="$language='es'"><xsl:text>de abril de</xsl:text></xsl:when>
142 <xsl:otherwise><xsl:text>April</xsl:text></xsl:otherwise>
145 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 5">
147 <xsl:when test="$language='es'"><xsl:text>de mayo de</xsl:text></xsl:when>
148 <xsl:otherwise><xsl:text>May</xsl:text></xsl:otherwise>
151 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 6">
153 <xsl:when test="$language='es'"><xsl:text>de junio de</xsl:text></xsl:when>
154 <xsl:otherwise><xsl:text>June</xsl:text></xsl:otherwise>
157 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 7">
159 <xsl:when test="$language='es'"><xsl:text>de julio de</xsl:text></xsl:when>
160 <xsl:otherwise><xsl:text>July</xsl:text></xsl:otherwise>
163 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 8">
165 <xsl:when test="$language='es'"><xsl:text>de agosto de</xsl:text></xsl:when>
166 <xsl:otherwise><xsl:text>August</xsl:text></xsl:otherwise>
169 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 9">
171 <xsl:when test="$language='es'"><xsl:text>de septiembre de</xsl:text></xsl:when>
172 <xsl:otherwise><xsl:text>September</xsl:text></xsl:otherwise>
175 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 10">
177 <xsl:when test="$language='es'"><xsl:text>de octubre de</xsl:text></xsl:when>
178 <xsl:otherwise><xsl:text>October</xsl:text></xsl:otherwise>
181 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 11">
183 <xsl:when test="$language='es'"><xsl:text>de noviembre de</xsl:text></xsl:when>
184 <xsl:otherwise><xsl:text>November</xsl:text></xsl:otherwise>
187 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 12">
189 <xsl:when test="$language='es'"><xsl:text>de diciembre de</xsl:text></xsl:when>
190 <xsl:otherwise><xsl:text>December</xsl:text></xsl:otherwise>
194 <xsl:text>Invalid Month</xsl:text>
197 <xsl:text> </xsl:text>
198 <xsl:value-of select="/gamebook/meta/date[@class='publication']/year" />
201 <xsl:apply-templates select="/gamebook/meta/rights[@class='license-notification']" />
203 <xsl:value-of select="$newline" />
205 <xsl:value-of select="$newline" />
206 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
208 <xsl:apply-templates />
211 <xsl:template match="/gamebook/section[@id='toc']">
212 <div class="frontmatter"><xsl:value-of select="$newline" />
215 <xsl:when test="$language='es'">
216 <xsl:text>Índice de Contenidos</xsl:text>
219 <xsl:text>Table of Contents</xsl:text>
222 </h2><xsl:value-of select="$newline" />
224 <xsl:value-of select="$newline" />
225 <xsl:value-of select="$newline" />
227 <ul><xsl:value-of select="$newline" />
228 <xsl:variable name="title-page">
230 <xsl:when test="$language='es'">
231 <xsl:text>Página Principal</xsl:text>
234 <xsl:text>Title Page</xsl:text>
239 <xsl:for-each select="/gamebook/section/data/section">
241 <a><xsl:attribute name="href"><xsl:text>#</xsl:text><xsl:value-of select="@id" /></xsl:attribute>
242 <xsl:apply-templates select="meta/title[1]" />
244 <xsl:if test="data/section[@class='frontmatter-separate' or @class='mainmatter-separate']">
245 <xsl:value-of select="$newline" />
246 <ul><xsl:value-of select="$newline" />
247 <xsl:for-each select="data/section[@class='frontmatter-separate' or @class='mainmatter-separate']">
249 <a><xsl:attribute name="href"><xsl:text>#</xsl:text><xsl:value-of select="@id" /></xsl:attribute>
250 <xsl:value-of select ="meta/title[1]" />
252 </li><xsl:value-of select="$newline" />
254 </ul><xsl:value-of select="$newline" />
256 </li><xsl:value-of select="$newline" />
258 </ul><xsl:value-of select="$newline" />
260 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
263 <!-- ::::::::::: second-level frontmatter sections :::::::::::::: -->
265 <xsl:template match="/gamebook/section/data/section[@class='frontmatter']">
266 <div class="frontmatter"><xsl:value-of select="$newline" />
267 <h2><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h2>
269 <xsl:value-of select="$newline" />
270 <xsl:value-of select="$newline" />
272 <xsl:apply-templates />
276 <!-- :::::::::::: third-level front matter sections ::::::::::::: -->
278 <xsl:template match="/gamebook/section/data/section/data/section[@class='frontmatter']">
279 <h3><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h3>
281 <xsl:value-of select="$newline" />
282 <xsl:value-of select="$newline" />
284 <xsl:apply-templates />
287 <xsl:template match="/gamebook/section/data/section/data/section[@class='frontmatter-separate']">
288 <h3><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h3>
290 <xsl:value-of select="$newline" />
291 <xsl:value-of select="$newline" />
293 <xsl:apply-templates />
296 <!-- :::::::::::: fourth-level front matter sections :::::::::::: -->
298 <xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='frontmatter']">
299 <h4><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h4>
301 <xsl:value-of select="$newline" />
302 <xsl:value-of select="$newline" />
304 <xsl:apply-templates />
307 <!-- ::::::::::::: fifth-level front matter sections :::::::::::: -->
309 <xsl:template match="/gamebook/section/data/section/data/section/data/section/data/section[@class='frontmatter']">
310 <h5><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h5>
312 <xsl:value-of select="$newline" />
313 <xsl:value-of select="$newline" />
315 <xsl:apply-templates />
318 <!-- ::::::::::: second-level main matter sections :::::::::::::: -->
320 <xsl:template match="/gamebook/section/data/section[@class='mainmatter']">
321 <div class="mainmatter"><xsl:value-of select="$newline" />
322 <h2><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h2>
324 <xsl:value-of select="$newline" />
325 <xsl:value-of select="$newline" />
327 <xsl:apply-templates />
331 <!-- :::::::::::: third-level main matter sections ::::::::::::: -->
333 <xsl:template match="/gamebook/section/data/section/data/section[@class='mainmatter']">
334 <h3><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h3>
336 <xsl:value-of select="$newline" />
337 <xsl:value-of select="$newline" />
339 <xsl:apply-templates />
342 <xsl:template match="/gamebook/section/data/section/data/section[@class='mainmatter-separate']">
343 <h3><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h3>
345 <xsl:value-of select="$newline" />
346 <xsl:value-of select="$newline" />
348 <xsl:apply-templates />
351 <!-- :::::::::::: fourth-level main matter sections :::::::::::: -->
353 <xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='mainmatter']">
354 <h4><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h4>
356 <xsl:value-of select="$newline" />
357 <xsl:value-of select="$newline" />
359 <xsl:apply-templates />
362 <!-- ::::::::::::: fifth-level main matter sections :::::::::::: -->
364 <xsl:template match="/gamebook/section/data/section/data/section/data/section/data/section[@class='mainmatter']">
365 <h5><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h5>
367 <xsl:value-of select="$newline" />
368 <xsl:value-of select="$newline" />
370 <xsl:apply-templates />
373 <!-- :::::::::::::::::: numbered sections ::::::::::::::::::::::: -->
375 <xsl:template match="/gamebook/section/data/section[@class='numbered']">
376 <div class="numbered"><xsl:value-of select="$newline" />
377 <h2><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h2><xsl:value-of select="$newline" />
378 <xsl:value-of select="$newline" />
380 <xsl:apply-templates/>
382 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
385 <xsl:template match="/gamebook/section/data/section/data/section[@class='numbered']">
386 <h3 align="center"><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h3><xsl:value-of select="$newline" />
387 <xsl:value-of select="$newline" />
389 <xsl:apply-templates />
391 <xsl:value-of select="$newline" />
394 <!-- :::::::::::: second-level backmatter sections :::::::::::::: -->
396 <xsl:template match="/gamebook/section/data/section[@class='backmatter']">
397 <div class="frontmatter"><xsl:value-of select="$newline" />
398 <h2><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h2><xsl:value-of select="$newline" />
400 <xsl:value-of select="$newline" />
401 <xsl:value-of select="$newline" />
403 <xsl:apply-templates />
405 <xsl:value-of select="$newline" />
407 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
410 <!-- ::::::::::::: third-level back matter sections ::::::::::::: -->
412 <xsl:template match="/gamebook/section/data/section/data/section[@class='backmatter']">
413 <h3><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h3>
415 <xsl:value-of select="$newline" />
416 <xsl:value-of select="$newline" />
418 <xsl:apply-templates />
421 <!-- ::::::::::::: fourth-level back matter sections ::::::::::::: -->
423 <xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='backmatter']">
424 <h4><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h4>
426 <xsl:value-of select="$newline" />
427 <xsl:value-of select="$newline" />
429 <xsl:apply-templates />
432 <!-- ::::::::::::::::::::: footnotes template ::::::::::::::::::::::::: -->
434 <xsl:template match="id( 'footnotz' )">
435 <div class="backmatter">
436 <xsl:value-of select="$newline" />
437 <!-- No particular reason to code title here -->
438 <h2><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h2><xsl:value-of select="$newline" />
439 <xsl:value-of select="$newline" />
440 <xsl:value-of select="$newline" />
442 <!-- Generate list of footnotes -->
443 <div class="footnote">
444 <xsl:for-each select="//footnotes/footnote">
445 <!-- will the list always contain the closest ancestor first? -->
446 <xsl:variable name="footnote-section"><xsl:value-of select="ancestor::section[position()=1]/@id" /></xsl:variable>
447 <xsl:variable name="footnote-marker"><xsl:number count="footnotes/footnote" from="/" level="any" format="1" /></xsl:variable>
448 <xsl:variable name="footnote-id"><xsl:value-of select="@id" /></xsl:variable>
449 <xsl:variable name="footnote-idref"><xsl:text>#</xsl:text><xsl:value-of select="@idref" /></xsl:variable>
451 <xsl:for-each select="*[1]">
453 <xsl:text>[</xsl:text>
455 <xsl:attribute name="name"><xsl:value-of select="$footnote-id" /></xsl:attribute>
456 <xsl:attribute name="href"><xsl:value-of select="$footnote-idref" /></xsl:attribute>
457 <xsl:value-of select="$footnote-marker" />
459 <xsl:text>] </xsl:text>
461 <xsl:text> (</xsl:text>
462 <xsl:call-template name="section-title-link" />
463 <xsl:text>) </xsl:text>
465 <xsl:apply-templates select="child::* | child::text()" />
469 <xsl:for-each select="*[position() != 1]">
470 <xsl:apply-templates select="." />
476 <!-- Backwards compatibility... needed? Probably not. -->
477 <xsl:apply-templates />
479 <xsl:value-of select="$newline" />
481 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
484 <!-- ==================== block elements ======================== -->
486 <xsl:template match="p">
487 <p><xsl:apply-templates /></p>
488 <xsl:value-of select="$newline" />
491 <xsl:template match="p[@class='dedication']">
492 <p class="dedication"><xsl:apply-templates /></p>
493 <xsl:value-of select="$newline" />
496 <xsl:template match="dl[@class='paragraphed']/dd/node() | ol[@class='paragraphed']/li/node() | ul[@class='paragraphed']/li/node()">
498 <xsl:when test="self::p">
499 <xsl:apply-templates /><br /><br /><xsl:value-of select="$newline" />
501 <xsl:when test="self::dl">
502 <dl><xsl:value-of select="$newline" />
503 <xsl:apply-templates />
504 </dl><br /><br /><xsl:value-of select="$newline" />
506 <xsl:when test="self::ol">
507 <ol><xsl:value-of select="$newline" />
508 <xsl:apply-templates />
509 </ol><br /><br /><xsl:value-of select="$newline" />
511 <xsl:when test="self::ul">
513 <xsl:if test="self::*[@class='unbulleted']"><xsl:attribute name="class"><xsl:text>unbulleted</xsl:text></xsl:attribute></xsl:if>
514 <xsl:value-of select="$newline" />
515 <xsl:apply-templates />
516 </ul><br /><br /><xsl:value-of select="$newline" />
518 <xsl:when test="self::blockquote">
519 <blockquote><xsl:value-of select="$newline" />
520 <xsl:apply-templates />
521 </blockquote><xsl:value-of select="$newline" />
523 <xsl:when test="self::poetry">
524 <blockquote class="poetry"><xsl:value-of select="$newline" />
525 <xsl:apply-templates />
526 </blockquote><xsl:value-of select="$newline" />
528 <xsl:when test="self::illustration">
529 <!-- Backwards compatibility code -->
530 <xsl:if test="instance[@class='html'] and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )">
531 <xsl:call-template name="illustration-no-frame" />
534 <xsl:when test="self::illref">
535 <xsl:if test="@class='html'">
536 <xsl:for-each select="id( @idref )">
537 <xsl:apply-templates select="." />
542 <xsl:text>[error: paragraphed list template]</xsl:text>
543 <xsl:message><xsl:text>error: paragraphed list template</xsl:text></xsl:message>
548 <xsl:template match="ol">
549 <ol><xsl:value-of select="$newline" />
550 <xsl:apply-templates />
551 </ol><xsl:value-of select="$newline" />
554 <xsl:template match="ul">
556 <xsl:if test="self::*[@class='unbulleted']"><xsl:attribute name="class"><xsl:text>unbulleted</xsl:text></xsl:attribute></xsl:if>
557 <xsl:value-of select="$newline" />
558 <xsl:apply-templates />
559 </ul><xsl:value-of select="$newline" />
562 <xsl:template match="dl">
563 <dl><xsl:value-of select="$newline" />
564 <xsl:apply-templates />
565 </dl><xsl:value-of select="$newline" />
568 <xsl:template match="dt">
569 <dt><xsl:apply-templates /></dt>
570 <xsl:value-of select="$newline" />
573 <xsl:template match="dd">
574 <dd><xsl:apply-templates /></dd>
575 <xsl:value-of select="$newline" />
578 <xsl:template match="li">
579 <li><xsl:apply-templates /></li>
580 <xsl:value-of select="$newline" />
583 <xsl:template match="table">
584 <table border="1" cellspacing="0" cellpadding="2">
585 <xsl:if test="@summary"><xsl:attribute name="summary"><xsl:value-of select="@summary" /></xsl:attribute></xsl:if>
586 <xsl:apply-templates />
588 <xsl:value-of select="$newline" />
591 <xsl:template match="caption">
593 <xsl:apply-templates />
597 <xsl:template match="colgroup[@scope]">
599 <xsl:attribute name="scope"><xsl:value-of select="@scope" /></xsl:attribute>
603 <xsl:template match="thead">
605 <xsl:apply-templates />
609 <xsl:template match="tfoot">
611 <xsl:apply-templates />
615 <xsl:template match="tbody">
617 <xsl:apply-templates />
621 <xsl:template match="tr">
623 <xsl:apply-templates />
627 <xsl:template match="th">
629 <xsl:if test="@align"><xsl:attribute name="align"><xsl:value-of select="@align" /></xsl:attribute></xsl:if>
630 <xsl:if test="@valign"><xsl:attribute name="valign"><xsl:value-of select="@valign" /></xsl:attribute></xsl:if>
631 <xsl:if test="@char"><xsl:attribute name="char"><xsl:value-of select="@char" /></xsl:attribute></xsl:if>
632 <xsl:if test="@rowspan"><xsl:attribute name="rowspan"><xsl:value-of select="@rowspan" /></xsl:attribute></xsl:if>
633 <xsl:if test="@colspan"><xsl:attribute name="colspan"><xsl:value-of select="@colspan" /></xsl:attribute></xsl:if>
634 <xsl:if test="@axis"><xsl:attribute name="axis"><xsl:value-of select="@axis" /></xsl:attribute></xsl:if>
635 <xsl:if test="@scope"><xsl:attribute name="scope"><xsl:value-of select="@scope" /></xsl:attribute></xsl:if>
636 <xsl:apply-templates />
640 <xsl:template match="td">
642 <xsl:if test="@align"><xsl:attribute name="align"><xsl:value-of select="@align" /></xsl:attribute></xsl:if>
643 <xsl:if test="@valign"><xsl:attribute name="valign"><xsl:value-of select="@valign" /></xsl:attribute></xsl:if>
644 <xsl:if test="@char"><xsl:attribute name="char"><xsl:value-of select="@char" /></xsl:attribute></xsl:if>
645 <xsl:if test="@rowspan"><xsl:attribute name="rowspan"><xsl:value-of select="@rowspan" /></xsl:attribute></xsl:if>
646 <xsl:if test="@colspan"><xsl:attribute name="colspan"><xsl:value-of select="@colspan" /></xsl:attribute></xsl:if>
647 <xsl:if test="@axis"><xsl:attribute name="axis"><xsl:value-of select="@axis" /></xsl:attribute></xsl:if>
648 <xsl:if test="@scope"><xsl:attribute name="scope"><xsl:value-of select="@scope" /></xsl:attribute></xsl:if>
649 <xsl:apply-templates />
653 <xsl:template match="combat">
655 <xsl:apply-templates select="enemy" />
656 <xsl:text>: </xsl:text>
658 <xsl:when test="enemy-attribute[@class='combatskill']">
661 <xsl:when test="$language='es'">
662 <xsl:text>DESTREZA EN EL COMBATE</xsl:text>
665 <xsl:text>COMBAT SKILL</xsl:text>
669 <xsl:text> </xsl:text>
670 <xsl:value-of select="enemy-attribute[@class='combatskill']" />
672 <xsl:when test="enemy-attribute[@class='closecombatskill']">
675 <xsl:when test="$language='es'">
676 <xsl:text>CLOSE COMBAT SKILL</xsl:text>
679 <xsl:text>CLOSE COMBAT SKILL</xsl:text>
683 <xsl:text> </xsl:text>
684 <xsl:value-of select="enemy-attribute[@class='closecombatskill']" />
687 <xsl:text> </xsl:text>
690 <xsl:when test="$language='es'">
691 <xsl:text>RESISTENCIA</xsl:text>
694 <xsl:text>ENDURANCE</xsl:text>
699 <xsl:when test="enemy-attribute[@class='target']">
701 <xsl:when test="$language='es'">
702 <xsl:text> (o </xsl:text><small>BLANCOS</small><xsl:text>)</xsl:text>
705 <xsl:text> (</xsl:text><small>TARGET</small><xsl:text> points)</xsl:text>
708 <xsl:text> </xsl:text>
709 <xsl:value-of select="enemy-attribute[@class='target']" />
711 <xsl:when test="enemy-attribute[@class='resistance']">
713 <xsl:when test="$language='es'"></xsl:when>
715 <xsl:text> (</xsl:text><small>RESISTANCE</small><xsl:text> points)</xsl:text>
718 <xsl:text> </xsl:text>
719 <xsl:value-of select="enemy-attribute[@class='resistance']" />
722 <xsl:text> </xsl:text>
723 <xsl:value-of select="enemy-attribute[@class='endurance']" />
727 <xsl:value-of select="$newline" />
730 <xsl:template match="choice">
731 <xsl:variable name="link">
732 <xsl:value-of select="@idref" />
736 <xsl:for-each select="* | text()">
738 <xsl:when test="self::link-text">
740 <xsl:apply-templates />
744 <xsl:apply-templates select="." />
749 <xsl:value-of select="$newline" />
752 <xsl:template match="puzzle">
754 <xsl:apply-templates />
756 <xsl:value-of select="$newline" />
759 <xsl:template match="deadend">
761 <xsl:apply-templates />
763 <xsl:value-of select="$newline" />
766 <xsl:template match="data/signpost">
767 <div class="signpost">
768 <xsl:apply-templates />
770 <xsl:value-of select="$newline" />
773 <xsl:template match="signpost">
774 <span class="signpost"><xsl:apply-templates /></span>
777 <xsl:template match="blockquote">
778 <blockquote><xsl:value-of select="$newline" />
779 <xsl:apply-templates /><xsl:value-of select="$newline" />
780 </blockquote><xsl:value-of select="$newline" />
783 <xsl:template match="poetry">
784 <blockquote class="poetry"><p><xsl:value-of select="$newline" />
785 <xsl:apply-templates /><xsl:value-of select="$newline" />
786 </p></blockquote><xsl:value-of select="$newline" />
789 <xsl:template match="illref">
790 <!-- It is important that the class is not checked right in the template - that would make this template match with higher priority, which will turn a few things upside down -->
791 <xsl:if test="@class='html'">
792 <xsl:for-each select="id( @idref )">
793 <!-- This creates unneccessary regeneration of float illustration pages, but it is easiest to keep things this way as long as we have to be backwards compatible... -->
794 <!-- When backwards compatibility can be dropped, most of (all?) the <illustration> processing can happen here -->
795 <xsl:apply-templates select="." />
800 <xsl:template match="illustrations">
801 <ul class="unbulleted">
802 <xsl:for-each select="illustration[contains( $use-illustrators, concat( ':', meta/creator, ':' ) )] | illgroup">
804 <xsl:when test="self::illustration and @class='float'">
805 <!-- List item with illustration name as link -->
808 <xsl:when test="$language='es'">
809 <xsl:text>Ilustración </xsl:text>
812 <xsl:text>Illustration </xsl:text>
815 <xsl:number count="illustration[@class='float' and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )]" from="/" level="any" format="I" />
816 <!-- List the sections that the illustration appears in -->
817 <xsl:text> (</xsl:text>
818 <xsl:for-each select="//illref[@class='html' and @idref=current()/@id]">
819 <xsl:call-template name="section-title-link" />
820 <xsl:if test="position()!=last()">
821 <xsl:text>, </xsl:text>
824 <xsl:text>)</xsl:text><xsl:value-of select="$newline" />
828 <xsl:when test="self::illustration"> <!-- inline and map -->
829 <!-- List the sections that the illustration appears in -->
831 <!-- TODO: fix this so that sections that do not represent separate XHTML files are not linked to? -->
832 <xsl:for-each select="//illref[@class='html' and @idref=current()/@id]">
833 <xsl:call-template name="section-title-link" />
834 <xsl:if test="position()!=last()">
835 <xsl:text>, </xsl:text>
841 <xsl:when test="self::illgroup and @class!='hidden'">
842 <!-- Check if the group contains any illustrations being used, before creating the list item -->
843 <xsl:if test="count( illustration[contains( $use-illustrators, concat( ':', meta/creator, ':' ) )] ) != 0">
846 <xsl:attribute name="href"><xsl:value-of select="@idref" /><xsl:text>.htm</xsl:text></xsl:attribute>
847 <xsl:value-of select="id(@idref)/meta/title[1]" />
854 </ul><xsl:value-of select="$newline" />
857 <xsl:template match="illustration">
858 <xsl:if test="instance[@class='html'] and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )">
860 <xsl:when test="@class='accent'" />
863 <xsl:call-template name="illustration-no-frame" />
869 <xsl:template match="instance" />
871 <xsl:template match="footnotes" />
873 <xsl:template match="footnote" />
875 <xsl:template match="hr">
877 <xsl:value-of select="$newline" />
880 <xsl:template match="choose">
882 <xsl:when test="@test='has-numbered-section-list'">
884 <xsl:when test="when[@value='false']">
885 <xsl:apply-templates select="when[@value='false'][1]/node()" />
887 <xsl:when test="otherwise">
888 <!-- this should only be applied when there is no option for "false" -->
889 <xsl:apply-templates select="otherwise/node()" />
895 <xsl:text>choose: unrecognized test "</xsl:text>
896 <xsl:value-of select="@test" />
897 <xsl:text>" - element ignored.</xsl:text>
903 <!-- ==================== inline elements ======================= -->
905 <xsl:template match="a">
907 <xsl:when test="@href">
909 <xsl:attribute name="href"><xsl:value-of select="@href" /></xsl:attribute>
910 <xsl:if test="@id"><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute></xsl:if>
911 <xsl:apply-templates />
916 <xsl:if test="@idref">
917 <xsl:attribute name="href">
918 <xsl:text>#</xsl:text><xsl:value-of select="@idref" />
921 <xsl:if test="@id"><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute></xsl:if>
922 <xsl:apply-templates />
928 <!-- This template is obsolete, the "footref" element should be used instead -->
929 <xsl:template match="a[@class='footnote']">
930 <!-- <xsl:message><xsl:text>WARNING: Obsolete <a idref='...' class='footnote' /> usage</xsl:text></xsl:message> -->
931 <xsl:apply-templates />
934 <xsl:attribute name="href"><xsl:text>#</xsl:text><xsl:value-of select="@idref" /></xsl:attribute>
935 <xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute>
936 <xsl:number count="a[@class='footnote']" from="/" level="any" format="1" />
941 <!-- TODO: can this be made more uniform with illrefs? -->
942 <xsl:template match="a[@class='accent-illustration']">
943 <xsl:for-each select="id( @idref )">
944 <xsl:variable name="illustration-src" select="instance[@class='html']/@src" />
945 <xsl:variable name="illustration-width" select="instance[@class='html']/@width" />
946 <xsl:variable name="illustration-height" select="instance[@class='html']/@height" />
947 <xsl:if test="instance[@class='html'] and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )">
948 <img src="{$illustration-src}" class="accent" width="{$illustration-width}" height="{$illustration-height}" alt="" border="" align="left" />
953 <xsl:template match="bookref">
955 <xsl:attribute name="href">
956 <xsl:variable name="my-section">
958 <xsl:when test="@section">
959 <xsl:value-of select="@section" />
962 <xsl:text>title</xsl:text>
966 <xsl:variable name="my-series">
967 <!-- If series is specified, go one directory back and then to series. Otherwise, add nothing. -->
969 <xsl:when test="@series">
970 <xsl:text>/../</xsl:text><xsl:value-of select="@series" />
973 <xsl:text></xsl:text>
977 <xsl:text>..</xsl:text>
978 <xsl:value-of select="$my-series" /><xsl:text>/</xsl:text><xsl:value-of select="@book" /><xsl:text>/title.htm#</xsl:text><xsl:value-of select="$my-section" />
980 <xsl:if test="@id"><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute></xsl:if>
981 <xsl:apply-templates />
985 <xsl:template match="footref">
986 <xsl:apply-templates />
989 <xsl:attribute name="href"><xsl:text>#</xsl:text><xsl:value-of select="@idref" /></xsl:attribute>
990 <xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute>
991 <xsl:number count="footref" from="/" level="any" format="1" />
996 <xsl:template match="em">
997 <em><xsl:apply-templates /></em>
1000 <xsl:template match="strong">
1001 <strong><xsl:apply-templates /></strong>
1004 <xsl:template match="thought">
1005 <i><xsl:apply-templates /></i>
1008 <xsl:template match="onomatopoeia">
1009 <i><xsl:apply-templates /></i>
1012 <xsl:template match="spell">
1013 <i><xsl:apply-templates /></i>
1016 <xsl:template match="item">
1017 <strong><xsl:apply-templates /></strong>
1020 <xsl:template match="foreign">
1022 <xsl:attribute name="xml:lang">
1023 <xsl:value-of select="@xml:lang"/>
1025 <xsl:apply-templates />
1029 <xsl:template match="quote">
1030 <xsl:text>‘</xsl:text>
1031 <xsl:apply-templates />
1032 <xsl:if test="not(self::*[@class='open-ended'])"><xsl:text>’</xsl:text></xsl:if>
1035 <xsl:template match="quote//quote">
1036 <xsl:text>“</xsl:text>
1037 <xsl:apply-templates />
1038 <xsl:if test="not(self::*[@class='open-ended'])"><xsl:text>”</xsl:text></xsl:if>
1041 <xsl:template match="cite">
1042 <cite><xsl:apply-templates /></cite>
1045 <xsl:template match="code">
1046 <tt><xsl:apply-templates /></tt>
1049 <xsl:template match="line">
1050 <xsl:apply-templates />
1051 <xsl:if test="position( ) != last( )"><br /></xsl:if>
1054 <xsl:template match="br">
1058 <xsl:template match="typ[@class='attribute']">
1059 <small><xsl:apply-templates /></small>
1062 <!-- ==================== character elements ==================== -->
1065 These templates define the mapping between the character elements used in
1066 the Project Aon instances of Gamebook XML and the ISO-8859-1
1069 Portions Copyright International Organization for Standardization 1986
1070 Permission to copy in any form is granted for use with conforming SGML
1071 systems and applications as defined in ISO 8879, provided this notice
1072 is included in all copies.
1076 <xsl:template match="ch.apos"><xsl:text>’</xsl:text></xsl:template><!-- apostrophe = single quotation mark -->
1077 <xsl:template match="ch.nbsp"><xsl:text> </xsl:text></xsl:template><!-- no-break space = non-breaking space, U+00A0 ISOnum -->
1078 <xsl:template match="ch.iexcl"><xsl:text>¡</xsl:text></xsl:template><!-- inverted exclamation mark, U+00A1 ISOnum -->
1079 <xsl:template match="ch.cent"><xsl:text>¢</xsl:text></xsl:template><!-- cent sign, U+00A2 ISOnum -->
1080 <xsl:template match="ch.pound"><xsl:text>£</xsl:text></xsl:template><!-- pound sign, U+00A3 ISOnum -->
1081 <xsl:template match="ch.curren"><xsl:text>¤</xsl:text></xsl:template><!-- currency sign, U+00A4 ISOnum -->
1082 <xsl:template match="ch.yen"><xsl:text>¥</xsl:text></xsl:template><!-- yen sign = yuan sign, U+00A5 ISOnum -->
1083 <xsl:template match="ch.brvbar"><xsl:text>¦</xsl:text></xsl:template><!-- broken bar = broken vertical bar, U+00A6 ISOnum -->
1084 <xsl:template match="ch.sect"><xsl:text>§</xsl:text></xsl:template><!-- section sign, U+00A7 ISOnum -->
1085 <xsl:template match="ch.uml"><xsl:text>¨</xsl:text></xsl:template><!-- diaeresis = spacing diaeresis, U+00A8 ISOdia -->
1086 <xsl:template match="ch.copy"><xsl:text>©</xsl:text></xsl:template><!-- copyright sign, U+00A9 ISOnum -->
1087 <xsl:template match="ch.ordf"><xsl:text>ª</xsl:text></xsl:template><!-- feminine ordinal indicator, U+00AA ISOnum -->
1088 <xsl:template match="ch.laquo"><xsl:text>«</xsl:text></xsl:template><!-- left-pointing double angle quotation mark = left pointing guillemet, U+00AB ISOnum -->
1089 <xsl:template match="ch.not"><xsl:text>¬</xsl:text></xsl:template><!-- not sign, U+00AC ISOnum -->
1090 <xsl:template match="ch.shy"><xsl:text>­</xsl:text></xsl:template><!-- soft hyphen = discretionary hyphen, U+00AD ISOnum -->
1091 <xsl:template match="ch.reg"><xsl:text>®</xsl:text></xsl:template><!-- registered sign = registered trade mark sign, U+00AE ISOnum -->
1092 <xsl:template match="ch.macr"><xsl:text>¯</xsl:text></xsl:template><!-- macron = spacing macron = overline = APL overbar, U+00AF ISOdia -->
1093 <xsl:template match="ch.deg"><xsl:text>°</xsl:text></xsl:template><!-- degree sign, U+00B0 ISOnum -->
1094 <xsl:template match="ch.plusmn"><xsl:text>±</xsl:text></xsl:template><!-- plus-minus sign = plus-or-minus sign, U+00B1 ISOnum -->
1095 <xsl:template match="ch.sup2"><xsl:text>²</xsl:text></xsl:template><!-- superscript two = superscript digit two = squared, U+00B2 ISOnum -->
1096 <xsl:template match="ch.sup3"><xsl:text>³</xsl:text></xsl:template><!-- superscript three = superscript digit three = cubed, U+00B3 ISOnum -->
1097 <xsl:template match="ch.acute"><xsl:text>´</xsl:text></xsl:template><!-- acute accent = spacing acute, U+00B4 ISOdia -->
1098 <xsl:template match="ch.micro"><xsl:text>µ</xsl:text></xsl:template><!-- micro sign, U+00B5 ISOnum -->
1099 <xsl:template match="ch.para"><xsl:text>¶</xsl:text></xsl:template><!-- pilcrow sign = paragraph sign, U+00B6 ISOnum -->
1100 <xsl:template match="ch.middot"><xsl:text>·</xsl:text></xsl:template><!-- middle dot = Georgian comma = Greek middle dot, U+00B7 ISOnum -->
1101 <xsl:template match="ch.cedil"><xsl:text>¸</xsl:text></xsl:template><!-- cedilla = spacing cedilla, U+00B8 ISOdia -->
1102 <xsl:template match="ch.sup1"><xsl:text>¹</xsl:text></xsl:template><!-- superscript one = superscript digit one, U+00B9 ISOnum -->
1103 <xsl:template match="ch.ordm"><xsl:text>º</xsl:text></xsl:template><!-- masculine ordinal indicator, U+00BA ISOnum -->
1104 <xsl:template match="ch.raquo"><xsl:text>»</xsl:text></xsl:template><!-- right-pointing double angle quotation mark = right pointing guillemet, U+00BB ISOnum -->
1105 <xsl:template match="ch.frac14"><xsl:text>¼</xsl:text></xsl:template><!-- vulgar fraction one quarter = fraction one quarter, U+00BC ISOnum -->
1106 <xsl:template match="ch.frac12"><xsl:text>½</xsl:text></xsl:template><!-- vulgar fraction one half = fraction one half, U+00BD ISOnum -->
1107 <xsl:template match="ch.frac34"><xsl:text>¾</xsl:text></xsl:template><!-- vulgar fraction three quarters = fraction three quarters, U+00BE ISOnum -->
1108 <xsl:template match="ch.iquest"><xsl:text>¿</xsl:text></xsl:template><!-- inverted question mark = turned question mark, U+00BF ISOnum -->
1109 <xsl:template match="ch.Agrave"><xsl:text>À</xsl:text></xsl:template><!-- latin capital letter A with grave = latin capital letter A grave, U+00C0 ISOlat1 -->
1110 <xsl:template match="ch.Aacute"><xsl:text>Á</xsl:text></xsl:template><!-- latin capital letter A with acute, U+00C1 ISOlat1 -->
1111 <xsl:template match="ch.Acirc"><xsl:text>Â</xsl:text></xsl:template><!-- latin capital letter A with circumflex, U+00C2 ISOlat1 -->
1112 <xsl:template match="ch.Atilde"><xsl:text>Ã</xsl:text></xsl:template><!-- latin capital letter A with tilde, U+00C3 ISOlat1 -->
1113 <xsl:template match="ch.Auml"><xsl:text>Ä</xsl:text></xsl:template><!-- latin capital letter A with diaeresis, U+00C4 ISOlat1 -->
1114 <xsl:template match="ch.Aring"><xsl:text>Å</xsl:text></xsl:template><!-- latin capital letter A with ring above = latin capital letter A ring, U+00C5 ISOlat1 -->
1115 <xsl:template match="ch.AElig"><xsl:text>Æ</xsl:text></xsl:template><!-- latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1 -->
1116 <xsl:template match="ch.Ccedil"><xsl:text>Ç</xsl:text></xsl:template><!-- latin capital letter C with cedilla, U+00C7 ISOlat1 -->
1117 <xsl:template match="ch.Egrave"><xsl:text>È</xsl:text></xsl:template><!-- latin capital letter E with grave, U+00C8 ISOlat1 -->
1118 <xsl:template match="ch.Eacute"><xsl:text>É</xsl:text></xsl:template><!-- latin capital letter E with acute, U+00C9 ISOlat1 -->
1119 <xsl:template match="ch.Ecirc"><xsl:text>Ê</xsl:text></xsl:template><!-- latin capital letter E with circumflex, U+00CA ISOlat1 -->
1120 <xsl:template match="ch.Euml"><xsl:text>Ë</xsl:text></xsl:template><!-- latin capital letter E with diaeresis, U+00CB ISOlat1 -->
1121 <xsl:template match="ch.Igrave"><xsl:text>Ì</xsl:text></xsl:template><!-- latin capital letter I with grave, U+00CC ISOlat1 -->
1122 <xsl:template match="ch.Iacute"><xsl:text>Í</xsl:text></xsl:template><!-- latin capital letter I with acute, U+00CD ISOlat1 -->
1123 <xsl:template match="ch.Icirc"><xsl:text>Î</xsl:text></xsl:template><!-- latin capital letter I with circumflex, U+00CE ISOlat1 -->
1124 <xsl:template match="ch.Iuml"><xsl:text>Ï</xsl:text></xsl:template><!-- latin capital letter I with diaeresis, U+00CF ISOlat1 -->
1125 <xsl:template match="ch.ETH"><xsl:text>Ð</xsl:text></xsl:template><!-- latin capital letter ETH, U+00D0 ISOlat1 -->
1126 <xsl:template match="ch.Ntilde"><xsl:text>Ñ</xsl:text></xsl:template><!-- latin capital letter N with tilde, U+00D1 ISOlat1 -->
1127 <xsl:template match="ch.Ograve"><xsl:text>Ò</xsl:text></xsl:template><!-- latin capital letter O with grave, U+00D2 ISOlat1 -->
1128 <xsl:template match="ch.Oacute"><xsl:text>Ó</xsl:text></xsl:template><!-- latin capital letter O with acute, U+00D3 ISOlat1 -->
1129 <xsl:template match="ch.Ocirc"><xsl:text>Ô</xsl:text></xsl:template><!-- latin capital letter O with circumflex, U+00D4 ISOlat1 -->
1130 <xsl:template match="ch.Otilde"><xsl:text>Õ</xsl:text></xsl:template><!-- latin capital letter O with tilde, U+00D5 ISOlat1 -->
1131 <xsl:template match="ch.Ouml"><xsl:text>Ö</xsl:text></xsl:template><!-- latin capital letter O with diaeresis, U+00D6 ISOlat1 -->
1132 <xsl:template match="ch.times"><xsl:text>×</xsl:text></xsl:template><!-- multiplication sign, U+00D7 ISOnum -->
1133 <xsl:template match="ch.Oslash"><xsl:text>Ø</xsl:text></xsl:template><!-- latin capital letter O with stroke = latin capital letter O slash, U+00D8 ISOlat1 -->
1134 <xsl:template match="ch.Ugrave"><xsl:text>Ù</xsl:text></xsl:template><!-- latin capital letter U with grave, U+00D9 ISOlat1 -->
1135 <xsl:template match="ch.Uacute"><xsl:text>Ú</xsl:text></xsl:template><!-- latin capital letter U with acute, U+00DA ISOlat1 -->
1136 <xsl:template match="ch.Ucirc"><xsl:text>Û</xsl:text></xsl:template><!-- latin capital letter U with circumflex, U+00DB ISOlat1 -->
1137 <xsl:template match="ch.Uuml"><xsl:text>Ü</xsl:text></xsl:template><!-- latin capital letter U with diaeresis, U+00DC ISOlat1 -->
1138 <xsl:template match="ch.Yacute"><xsl:text>Ý</xsl:text></xsl:template><!-- latin capital letter Y with acute, U+00DD ISOlat1 -->
1139 <xsl:template match="ch.THORN"><xsl:text>Þ</xsl:text></xsl:template><!-- latin capital letter THORN, U+00DE ISOlat1 -->
1140 <xsl:template match="ch.szlig"><xsl:text>ß</xsl:text></xsl:template><!-- latin small letter sharp s = ess-zed, U+00DF ISOlat1 -->
1141 <xsl:template match="ch.agrave"><xsl:text>à</xsl:text></xsl:template><!-- latin small letter a with grave = latin small letter a grave, U+00E0 ISOlat1 -->
1142 <xsl:template match="ch.aacute"><xsl:text>á</xsl:text></xsl:template><!-- latin small letter a with acute, U+00E1 ISOlat1 -->
1143 <xsl:template match="ch.acirc"><xsl:text>â</xsl:text></xsl:template><!-- latin small letter a with circumflex, U+00E2 ISOlat1 -->
1144 <xsl:template match="ch.atilde"><xsl:text>ã</xsl:text></xsl:template><!-- latin small letter a with tilde, U+00E3 ISOlat1 -->
1145 <xsl:template match="ch.auml"><xsl:text>ä</xsl:text></xsl:template><!-- latin small letter a with diaeresis, U+00E4 ISOlat1 -->
1146 <xsl:template match="ch.aring"><xsl:text>å</xsl:text></xsl:template><!-- latin small letter a with ring above = latin small letter a ring, U+00E5 ISOlat1 -->
1147 <xsl:template match="ch.aelig"><xsl:text>æ</xsl:text></xsl:template><!-- latin small letter ae = latin small ligature ae, U+00E6 ISOlat1 -->
1148 <xsl:template match="ch.ccedil"><xsl:text>ç</xsl:text></xsl:template><!-- latin small letter c with cedilla, U+00E7 ISOlat1 -->
1149 <xsl:template match="ch.egrave"><xsl:text>è</xsl:text></xsl:template><!-- latin small letter e with grave, U+00E8 ISOlat1 -->
1150 <xsl:template match="ch.eacute"><xsl:text>é</xsl:text></xsl:template><!-- latin small letter e with acute, U+00E9 ISOlat1 -->
1151 <xsl:template match="ch.ecirc"><xsl:text>ê</xsl:text></xsl:template><!-- latin small letter e with circumflex, U+00EA ISOlat1 -->
1152 <xsl:template match="ch.euml"><xsl:text>ë</xsl:text></xsl:template><!-- latin small letter e with diaeresis, U+00EB ISOlat1 -->
1153 <xsl:template match="ch.igrave"><xsl:text>ì</xsl:text></xsl:template><!-- latin small letter i with grave, U+00EC ISOlat1 -->
1154 <xsl:template match="ch.iacute"><xsl:text>í</xsl:text></xsl:template><!-- latin small letter i with acute, U+00ED ISOlat1 -->
1155 <xsl:template match="ch.icirc"><xsl:text>î</xsl:text></xsl:template><!-- latin small letter i with circumflex, U+00EE ISOlat1 -->
1156 <xsl:template match="ch.iuml"><xsl:text>ï</xsl:text></xsl:template><!-- latin small letter i with diaeresis, U+00EF ISOlat1 -->
1157 <xsl:template match="ch.eth"><xsl:text>ð</xsl:text></xsl:template><!-- latin small letter eth, U+00F0 ISOlat1 -->
1158 <xsl:template match="ch.ntilde"><xsl:text>ñ</xsl:text></xsl:template><!-- latin small letter n with tilde, U+00F1 ISOlat1 -->
1159 <xsl:template match="ch.ograve"><xsl:text>ò</xsl:text></xsl:template><!-- latin small letter o with grave, U+00F2 ISOlat1 -->
1160 <xsl:template match="ch.oacute"><xsl:text>ó</xsl:text></xsl:template><!-- latin small letter o with acute, U+00F3 ISOlat1 -->
1161 <xsl:template match="ch.ocirc"><xsl:text>ô</xsl:text></xsl:template><!-- latin small letter o with circumflex, U+00F4 ISOlat1 -->
1162 <xsl:template match="ch.otilde"><xsl:text>õ</xsl:text></xsl:template><!-- latin small letter o with tilde, U+00F5 ISOlat1 -->
1163 <xsl:template match="ch.ouml"><xsl:text>ö</xsl:text></xsl:template><!-- latin small letter o with diaeresis, U+00F6 ISOlat1 -->
1164 <xsl:template match="ch.divide"><xsl:text>÷</xsl:text></xsl:template><!-- division sign, U+00F7 ISOnum -->
1165 <xsl:template match="ch.oslash"><xsl:text>ø</xsl:text></xsl:template><!-- latin small letter o with stroke, = latin small letter o slash, U+00F8 ISOlat1 -->
1166 <xsl:template match="ch.ugrave"><xsl:text>ù</xsl:text></xsl:template><!-- latin small letter u with grave, U+00F9 ISOlat1 -->
1167 <xsl:template match="ch.uacute"><xsl:text>ú</xsl:text></xsl:template><!-- latin small letter u with acute, U+00FA ISOlat1 -->
1168 <xsl:template match="ch.ucirc"><xsl:text>û</xsl:text></xsl:template><!-- latin small letter u with circumflex, U+00FB ISOlat1 -->
1169 <xsl:template match="ch.uuml"><xsl:text>ü</xsl:text></xsl:template><!-- latin small letter u with diaeresis, U+00FC ISOlat1 -->
1170 <xsl:template match="ch.yacute"><xsl:text>ý</xsl:text></xsl:template><!-- latin small letter y with acute, U+00FD ISOlat1 -->
1171 <xsl:template match="ch.thorn"><xsl:text>þ</xsl:text></xsl:template><!-- latin small letter thorn, U+00FE ISOlat1 -->
1172 <xsl:template match="ch.yuml"><xsl:text>ÿ</xsl:text></xsl:template><!-- latin small letter y with diaeresis, U+00FF ISOlat1 -->
1174 <!-- ~~~~~~~~~~~~~~~~~~~~~ Special Characters ~~~~~~~~~~~~~~~~~~~~ -->
1176 <xsl:template match="ch.ampersand">&</xsl:template><!-- ampersand -->
1177 <xsl:template match="ch.lsquot">‘</xsl:template><!-- opening left quotation mark -->
1178 <xsl:template match="ch.rsquot">’</xsl:template><!-- closing right quotation mark -->
1179 <xsl:template match="ch.ldquot">“</xsl:template><!-- opening left double quotation mark -->
1180 <xsl:template match="ch.rdquot">”</xsl:template><!-- closing right double quotation mark -->
1181 <xsl:template match="ch.minus">−</xsl:template><!-- mathematical minus -->
1182 <xsl:template match="ch.endash">–</xsl:template><!-- endash -->
1183 <xsl:template match="ch.emdash">—</xsl:template><!-- emdash -->
1184 <xsl:template match="ch.ellips">…</xsl:template><!-- ellipsis -->
1185 <xsl:template match="ch.lellips">…</xsl:template><!-- left ellipsis, used at the beginning of edited material -->
1186 <xsl:template match="ch.blankline">_______</xsl:template><!-- blank line to be filled in -->
1187 <xsl:template match="ch.percent"><xsl:text>%</xsl:text></xsl:template><!-- percent sign -->
1188 <xsl:template match="ch.thinspace"><xsl:text> </xsl:text></xsl:template><!-- small horizontal space for use between adjacent quotation marks - added mainly for LaTeX's sake -->
1189 <xsl:template match="ch.frac116"><xsl:text>1/16</xsl:text></xsl:template><!-- vulgar fraction one sixteenth = fraction on sixteenth -->
1190 <xsl:template match="ch.plus"><xsl:text>+</xsl:text></xsl:template><!-- mathematical plus -->
1192 <!-- ==================== named templates ======================= -->
1194 <xsl:template name="illustration-no-frame">
1195 <xsl:param name="illustration-width" select="instance[@class='html']/@width" />
1196 <xsl:param name="illustration-height" select="instance[@class='html']/@height" />
1197 <xsl:param name="illustration-src" select="instance[@class='html']/@src" />
1198 <xsl:param name="illustration-alt-text">
1200 <xsl:when test="$language='es'">
1201 <xsl:text>ilustración</xsl:text>
1204 <xsl:text>illustration</xsl:text>
1209 <div align="center">
1210 <img src="{$illustration-src}" width="{$illustration-width}" height="{$illustration-height}" align="middle" border="0" alt="[{$illustration-alt-text}]" />
1211 <xsl:if test="@class='float'">
1215 <xsl:when test="$language='es'">
1216 <xsl:text>Ilustración </xsl:text>
1219 <xsl:text>Illustration </xsl:text>
1222 <xsl:number count="illustration[@class='float' and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )]" from="/" level="any" format="I" />
1224 <xsl:text>—</xsl:text>
1225 <xsl:apply-templates select="meta/description" /><xsl:value-of select="$newline" />
1232 A "subroutine" to generate a link to the current section, with the section title (expanded with "Section " in case of a numbered section) as link text.
1234 <xsl:template name="section-title-link">
1235 <!-- will the list always contain the closest ancestor first? -->
1236 <xsl:variable name="section-title">
1237 <!-- numbered or not? -->
1238 <xsl:if test="ancestor::section[position()=1]/@class='numbered'">
1240 <xsl:when test="$language='es'">
1241 <xsl:text>Sección </xsl:text>
1244 <xsl:text>Section </xsl:text>
1248 <xsl:apply-templates select="ancestor::section[position()=1]/meta/title[1]" />
1252 <xsl:attribute name="href"><xsl:text>#</xsl:text><xsl:value-of select="ancestor::section[position()=1]/@id" /></xsl:attribute>
1253 <xsl:value-of select="$section-title" />