2 <!DOCTYPE xhtml-transform [
3 <!ENTITY nbsp " ">
11 Revision 1.1 2005/01/30 01:32:52 jonathan.blake
12 Initial freepository revision of XML support documents.
14 Revision 1.1 2003/01/15 17:22:44 jblake
18 Revision 1.1 2002/10/22 16:35:26 jblake
22 Revision 1.2 2002/10/20 06:25:35 jblake
23 Added support for CLOSE COMBAT SKILL for Freeway Warrior books.
25 Revision 1.1 2002/10/15 23:29:51 jblake
29 20020327 - repurposed to be used with Xalan Java 2
32 <xsl:transform version="1.0"
33 xmlns:xml="http://www.w3.org/XML/1998/namespace"
34 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
35 xmlns:lxslt="http://xml.apache.org/xslt"
36 xmlns:redirect="org.apache.xalan.lib.Redirect"
37 extension-element-prefixes="redirect">
39 <xsl:output method="xml"
41 omit-xml-declaration="yes"
42 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
43 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
45 <xsl:strip-space elements="section data ol ul dl li dd footnotes footnote" />
46 <xsl:preserve-space elements="p" />
48 <!-- ====================== parameters ========================== -->
50 <xsl:param name="book-path"><xsl:text>undefined-book</xsl:text></xsl:param>
52 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~ colors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
54 <xsl:param name="link-color"><xsl:text>#ff0000</xsl:text></xsl:param>
55 <xsl:param name="alink-color"><xsl:value-of select="$link-color" /></xsl:param>
56 <xsl:param name="vlink-color"><xsl:value-of select="$link-color" /></xsl:param>
58 <xsl:param name="text-color"><xsl:text>#000000</xsl:text></xsl:param>
59 <xsl:param name="background-color"><xsl:text>ffffe4</xsl:text></xsl:param>
61 <!-- ======================= variables ========================== -->
63 <xsl:variable name="newline">
68 <!-- ======================== Templates ========================= -->
70 <!-- ================= hierarchical sections ==================== -->
72 <xsl:template match="meta" />
73 <xsl:template match="section" />
75 <!-- ::::::::::::::::::: top-level section :::::::::::::::::::::: -->
77 <xsl:template match="/gamebook/section">
78 <xsl:call-template name="xhtml-wrapper">
79 <xsl:with-param name="document-type">top-level</xsl:with-param>
80 <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
83 <xsl:call-template name="xhtml-wrapper">
84 <xsl:with-param name="document-type">toc</xsl:with-param>
85 <xsl:with-param name="filename">toc</xsl:with-param>
88 <xsl:apply-templates />
92 <!-- ::::::::::: second-level frontmatter sections :::::::::::::: -->
94 <xsl:template match="/gamebook/section/data/section[@class='frontmatter']">
95 <xsl:call-template name="xhtml-wrapper">
96 <xsl:with-param name="document-type">second-level-frontmatter</xsl:with-param>
97 <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
101 <!-- :::::::::::: third-level front matter sections ::::::::::::: -->
103 <xsl:template match="/gamebook/section/data/section/data/section[@class='frontmatter']">
104 <h3><xsl:value-of select="meta/title[1]" /></h3>
106 <xsl:value-of select="$newline" />
107 <xsl:value-of select="$newline" />
109 <xsl:apply-templates />
112 <xsl:template match="/gamebook/section/data/section/data/section[@class='frontmatter-separate']">
113 <xsl:call-template name="xhtml-wrapper">
114 <xsl:with-param name="document-type">third-level-frontmatter-separate</xsl:with-param>
115 <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
119 <!-- :::::::::::: fourth-level front matter sections :::::::::::: -->
121 <xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='frontmatter']">
122 <h4><xsl:value-of select="meta/title[1]" /></h4>
124 <xsl:value-of select="$newline" />
125 <xsl:value-of select="$newline" />
127 <xsl:apply-templates />
130 <!-- ::::::::::::: fifth-level front matter sections :::::::::::: -->
132 <xsl:template match="/gamebook/section/data/section/data/section/data/section/data/section[@class='frontmatter']">
133 <h5><xsl:value-of select="meta/title[1]" /></h5>
135 <xsl:value-of select="$newline" />
136 <xsl:value-of select="$newline" />
138 <xsl:apply-templates />
141 <!-- ::::::::::: second-level main matter sections :::::::::::::: -->
143 <xsl:template match="/gamebook/section/data/section[@class='mainmatter']">
144 <xsl:call-template name="xhtml-wrapper">
145 <xsl:with-param name="document-type">second-level-mainmatter</xsl:with-param>
146 <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
150 <!-- :::::::::::: third-level main matter sections ::::::::::::: -->
152 <xsl:template match="/gamebook/section/data/section/data/section[@class='mainmatter']">
153 <h3><xsl:value-of select="meta/title[1]" /></h3>
155 <xsl:value-of select="$newline" />
156 <xsl:value-of select="$newline" />
158 <xsl:apply-templates />
161 <xsl:template match="/gamebook/section/data/section/data/section[@class='mainmatter-separate']">
162 <xsl:call-template name="xhtml-wrapper">
163 <xsl:with-param name="document-type">third-level-mainmatter-separate</xsl:with-param>
164 <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
168 <!-- :::::::::::: fourth-level main matter sections :::::::::::: -->
170 <xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='mainmatter']">
171 <h4><xsl:value-of select="meta/title[1]" /></h4>
173 <xsl:value-of select="$newline" />
174 <xsl:value-of select="$newline" />
176 <xsl:apply-templates />
179 <!-- ::::::::::::: fifth-level main matter sections :::::::::::: -->
181 <xsl:template match="/gamebook/section/data/section/data/section/data/section/data/section[@class='mainmatter']">
182 <h5><xsl:value-of select="meta/title[1]" /></h5>
184 <xsl:value-of select="$newline" />
185 <xsl:value-of select="$newline" />
187 <xsl:apply-templates />
190 <!-- :::::::::::: second-level glossary sections ::::::::::::: -->
192 <xsl:template match="/gamebook/section/data/section[@class='glossary']">
193 <xsl:call-template name="xhtml-wrapper">
194 <xsl:with-param name="document-type">second-level-glossary</xsl:with-param>
195 <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
196 <xsl:with-param name="glossary-id-prefix">topics</xsl:with-param>
200 <!-- :::::::::::: third-level glossary sections ::::::::::::: -->
201 <!-- glossary sections should be enclosed in a second level glossary section -->
203 <xsl:template match="/gamebook/section/data/section/data/section[@class='glossary']">
204 <h3><xsl:value-of select="meta/title[1]" /></h3>
206 <xsl:value-of select="$newline" />
207 <xsl:value-of select="$newline" />
209 <xsl:apply-templates />
212 <xsl:template match="/gamebook/section/data/section/data/section[@class='glossary-separate']">
213 <xsl:call-template name="xhtml-wrapper">
214 <xsl:with-param name="document-type">third-level-glossary-separate</xsl:with-param>
215 <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
216 <xsl:with-param name="glossary-id-prefix">topics</xsl:with-param>
220 <!-- :::::::::::::::::: numbered sections ::::::::::::::::::::::: -->
222 <xsl:template match="/gamebook/section/data/section[@class='numbered']">
223 <xsl:call-template name="xhtml-wrapper">
224 <xsl:with-param name="document-type">second-level-numbered</xsl:with-param>
225 <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
228 <xsl:apply-templates />
231 <xsl:template match="/gamebook/section/data/section/data/section[@class='numbered']">
232 <xsl:call-template name="xhtml-wrapper">
233 <xsl:with-param name="document-type">third-level-numbered</xsl:with-param>
234 <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
238 <!-- :::::::::::: second-level backmatter sections :::::::::::::: -->
240 <xsl:template match="/gamebook/section/data/section[@class='backmatter']">
241 <xsl:call-template name="xhtml-wrapper">
242 <xsl:with-param name="document-type">second-level-backmatter</xsl:with-param>
243 <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
247 <!-- ::::::::::::: third-level back matter sections ::::::::::::: -->
249 <xsl:template match="/gamebook/section/data/section/data/section[@class='backmatter']">
250 <h3><xsl:value-of select="meta/title[1]" /></h3>
252 <xsl:value-of select="$newline" />
253 <xsl:value-of select="$newline" />
255 <xsl:apply-templates />
258 <!-- ::::::::::::: fourth-level back matter sections ::::::::::::: -->
260 <xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='backmatter']">
261 <h4><xsl:value-of select="meta/title[1]" /></h4>
263 <xsl:value-of select="$newline" />
264 <xsl:value-of select="$newline" />
266 <xsl:apply-templates />
269 <!-- ::::::::::::::::::::: map template ::::::::::::::::::::::::: -->
271 <xsl:template match="id( 'map' )">
272 <xsl:call-template name="xhtml-wrapper">
273 <xsl:with-param name="document-type">map-adjusted</xsl:with-param>
274 <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
277 <xsl:call-template name="xhtml-wrapper">
278 <xsl:with-param name="document-type">map</xsl:with-param>
279 <xsl:with-param name="filename"><xsl:value-of select="@id" /><xsl:text>large</xsl:text></xsl:with-param>
283 <!-- ==================== block elements ======================== -->
285 <xsl:template match="p">
286 <p><xsl:apply-templates /></p>
287 <xsl:value-of select="$newline" />
290 <xsl:template match="p[@class='dedication']">
291 <p class="dedication"><xsl:apply-templates /></p>
292 <xsl:value-of select="$newline" />
295 <xsl:template match="dl[@class='paragraphed']/dd/node() | ol[@class='paragraphed']/li/node() | ul[@class='paragraphed']/li/node()">
297 <xsl:when test="self::p">
298 <xsl:apply-templates /><br /><br /><xsl:value-of select="$newline" />
300 <xsl:when test="self::dl">
301 <dl><xsl:value-of select="$newline" />
302 <xsl:apply-templates />
303 </dl><br /><br /><xsl:value-of select="$newline" />
305 <xsl:when test="self::ol">
306 <ol><xsl:value-of select="$newline" />
307 <xsl:apply-templates />
308 </ol><br /><br /><xsl:value-of select="$newline" />
310 <xsl:when test="self::ul">
312 <xsl:if test="self::*[@class='unbulleted']"><xsl:attribute name="class"><xsl:text>unbulleted</xsl:text></xsl:attribute></xsl:if>
313 <xsl:value-of select="$newline" />
314 <xsl:apply-templates />
315 </ul><br /><br /><xsl:value-of select="$newline" />
317 <xsl:when test="self::blockquote">
318 <blockquote><xsl:value-of select="$newline" />
319 <xsl:apply-templates />
320 </blockquote><xsl:value-of select="$newline" />
322 <xsl:when test="self::illustration">
323 <xsl:variable name="illustration-width" select="instance[@class='html']/@width" />
324 <xsl:variable name="illustration-height" select="instance[@class='html']/@height" />
325 <xsl:variable name="illustration-src" select="instance[@class='html']/@src" />
327 <xsl:if test="instance[@class='pdaxhtml']">
328 <div class="illustration"><div align="center"><xsl:value-of select="$newline" />
329 <p><img src="{$illustration-src}" width="{$illustration-width}" height="{$illustration-height}" border="0" align="middle" alt="[illustration]" /></p><xsl:value-of select="$newline" />
330 </div></div><xsl:value-of select="$newline" />
334 <xsl:text>[error: paragraphed list template]</xsl:text>
339 <xsl:template match="ol">
340 <ol><xsl:value-of select="$newline" />
341 <xsl:apply-templates />
342 </ol><xsl:value-of select="$newline" />
345 <xsl:template match="ul">
347 <xsl:if test="self::*[@class='unbulleted']"><xsl:attribute name="class"><xsl:text>unbulleted</xsl:text></xsl:attribute></xsl:if>
348 <xsl:value-of select="$newline" />
349 <xsl:apply-templates />
350 </ul><xsl:value-of select="$newline" />
353 <xsl:template match="dl">
354 <dl><xsl:value-of select="$newline" />
355 <xsl:apply-templates />
356 </dl><xsl:value-of select="$newline" />
359 <xsl:template match="dt">
360 <dt><xsl:apply-templates /></dt>
361 <xsl:value-of select="$newline" />
364 <xsl:template match="dd">
365 <dd><xsl:apply-templates /></dd>
366 <xsl:value-of select="$newline" />
369 <xsl:template match="li">
370 <li><xsl:apply-templates /></li>
371 <xsl:value-of select="$newline" />
374 <xsl:template match="table">
375 <table border="1" cellspacing="0" cellpadding="2">
376 <xsl:apply-templates />
378 <xsl:value-of select="$newline" />
381 <xsl:template match="tr">
383 <xsl:apply-templates />
387 <xsl:template match="th">
389 <xsl:if test="@align"><xsl:attribute name="align"><xsl:value-of select="@align" /></xsl:attribute></xsl:if>
390 <xsl:if test="@valign"><xsl:attribute name="valign"><xsl:value-of select="@valign" /></xsl:attribute></xsl:if>
391 <xsl:if test="@char"><xsl:attribute name="char"><xsl:value-of select="@char" /></xsl:attribute></xsl:if>
392 <xsl:apply-templates />
396 <xsl:template match="td">
398 <xsl:if test="@align"><xsl:attribute name="align"><xsl:value-of select="@align" /></xsl:attribute></xsl:if>
399 <xsl:if test="@valign"><xsl:attribute name="valign"><xsl:value-of select="@valign" /></xsl:attribute></xsl:if>
400 <xsl:if test="@char"><xsl:attribute name="char"><xsl:value-of select="@char" /></xsl:attribute></xsl:if>
401 <xsl:apply-templates />
405 <xsl:template match="combat">
407 <xsl:apply-templates select="enemy" />
408 <xsl:text>: </xsl:text>
410 <xsl:when test="enemy-attribute[@class='combatskill']">
411 <span class="smallcaps">COMBAT<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>SKILL</span>
412 <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
413 <xsl:value-of select="enemy-attribute[@class='combatskill']" />
415 <xsl:when test="enemy-attribute[@class='closecombatskill']">
416 <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>
417 <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
418 <xsl:value-of select="enemy-attribute[@class='closecombatskill']" />
421 <xsl:text disable-output-escaping="yes"> &nbsp;&nbsp;</xsl:text>
422 <span class="smallcaps">ENDURANCE</span>
424 <xsl:when test="enemy-attribute[@class='target']">
425 <xsl:text>(</xsl:text><span class="smallcaps">TARGET</span><xsl:text> points)</xsl:text>
426 <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
427 <xsl:value-of select="enemy-attribute[@class='target']" />
429 <xsl:when test="enemy-attribute[@class='resistance']">
430 <xsl:text>(</xsl:text><span class="smallcaps">RESISTANCE</span><xsl:text> points)</xsl:text>
431 <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
432 <xsl:value-of select="enemy-attribute[@class='resistance']" />
435 <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
436 <xsl:value-of select="enemy-attribute[@class='endurance']" />
440 <xsl:value-of select="$newline" />
443 <xsl:template match="choice">
444 <xsl:variable name="link">
445 <xsl:value-of select="@idref" />
449 <xsl:for-each select="* | text()">
451 <xsl:when test="self::link-text">
452 <a href="{$link}.htm">
453 <xsl:apply-templates />
457 <xsl:apply-templates select="." />
462 <xsl:value-of select="$newline" />
465 <xsl:template match="signpost">
466 <div class="signpost">
467 <xsl:apply-templates />
469 <xsl:value-of select="$newline" />
472 <xsl:template match="blockquote">
473 <blockquote><xsl:value-of select="$newline" />
474 <xsl:apply-templates /><xsl:value-of select="$newline" />
475 </blockquote><xsl:value-of select="$newline" />
478 <xsl:template match="illustration">
479 <xsl:variable name="illustration-width" select="instance[@class='html']/@width" />
480 <xsl:variable name="illustration-height" select="instance[@class='html']/@height" />
481 <xsl:variable name="illustration-src" select="instance[@class='html']/@src" />
483 <xsl:variable name="illustration-width-adjusted"><xsl:number value="$illustration-width div 2" /></xsl:variable>
484 <xsl:variable name="illustration-height-adjusted"><xsl:number value="$illustration-height div 2" /></xsl:variable>
486 <xsl:if test="instance[@class='pdaxhtml']">
488 <xsl:when test="@class='float'">
489 <div class="illustration"><div align="center"><xsl:value-of select="$newline" />
492 <xsl:attribute name="href"><xsl:text>ill</xsl:text><xsl:number count="illustration[@class='float']" from="/" level="any" format="1" /><xsl:text>.htm</xsl:text></xsl:attribute>
493 <img src="{$illustration-src}" width="{$illustration-width-adjusted}" height="{$illustration-height-adjusted}" border="0" align="middle" alt="[illustration]" />
495 </p><xsl:value-of select="$newline" />
496 </div></div><xsl:value-of select="$newline" />
498 <xsl:call-template name="xhtml-wrapper">
499 <xsl:with-param name="document-type">illustration</xsl:with-param>
500 <xsl:with-param name="filename"><xsl:text>ill</xsl:text><xsl:number count="illustration[@class='float']" from="/" level="any" format="1" /></xsl:with-param>
505 <div class="illustration"><div align="center"><xsl:value-of select="$newline" />
506 <p><img src="{$illustration-src}" width="{$illustration-width}" height="{$illustration-height}" border="0" align="middle" alt="[illustration]" /></p><xsl:value-of select="$newline" />
507 </div></div><xsl:value-of select="$newline" />
514 <xsl:template match="instance" />
516 <xsl:template match="footnotes" />
518 <xsl:template match="footnote" />
520 <xsl:template match="hr">
522 <xsl:value-of select="$newline" />
525 <!-- ==================== inline elements ======================= -->
527 <xsl:template match="a">
529 <xsl:when test="@href">
531 <xsl:attribute name="href"><xsl:value-of select="@href" /></xsl:attribute>
532 <xsl:if test="@id"><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute></xsl:if>
533 <xsl:apply-templates />
538 <xsl:if test="@idref">
539 <xsl:variable name="my-idref" select="@idref" />
540 <xsl:attribute name="href">
542 <!-- The order of these tests is deliberate. They are ordered roughly from most to least specific. -->
543 <xsl:when test="/gamebook/section[@id=$my-idref] | /gamebook/section/data/section[@id=$my-idref]">
544 <xsl:value-of select="$my-idref" /><xsl:text>.htm</xsl:text>
546 <xsl:when test="/gamebook/section/data/section/data/section[@class='frontmatter-separate' and @id=$my-idref]">
547 <xsl:value-of select="$my-idref" /><xsl:text>.htm</xsl:text>
549 <xsl:when test="/gamebook/section/data/section/data/section[@class='mainmatter-separate' and @id=$my-idref]">
550 <xsl:value-of select="$my-idref" /><xsl:text>.htm</xsl:text>
552 <xsl:when test="/gamebook/section/data/section/data/section[@class='numbered' and @id=$my-idref]">
553 <xsl:value-of select="$my-idref" /><xsl:text>.htm</xsl:text>
555 <xsl:when test="/gamebook/section/data/section/data/section[@class='glossary-separate' and @id=$my-idref]">
556 <xsl:value-of select="$my-idref" /><xsl:text>.htm</xsl:text>
558 <xsl:when test="/gamebook/section/data/section/data/section[@class='frontmatter-separate' and descendant::*[@id=$my-idref]]">
559 <xsl:value-of select="/gamebook/section/data/section/data/section[@class='frontmatter-separate' and descendant::*[@id=$my-idref]]/@id" /><xsl:text>.htm#</xsl:text><xsl:value-of select="$my-idref" />
561 <xsl:when test="/gamebook/section/data/section/data/section[@class='mainmatter-separate' and descendant::*[@id=$my-idref]]">
562 <xsl:value-of select="/gamebook/section/data/section/data/section[@class='mainmatter-separate' and descendant::*[@id=$my-idref]]/@id" /><xsl:text>.htm#</xsl:text><xsl:value-of select="$my-idref" />
564 <xsl:when test="/gamebook/section/data/section/data/section[@class='glossary-separate' and descendant::*[@id=$my-idref]]">
565 <xsl:value-of select="/gamebook/section/data/section/data/section[@class='glossary-separate' and descendant::*[@id=$my-idref]]/@id" /><xsl:text>.htm#</xsl:text><xsl:value-of select="$my-idref" />
567 <xsl:when test="/gamebook/section/data/section[descendant::*[@id=$my-idref]]">
568 <xsl:value-of select="/gamebook/section/data/section[descendant::*[@id=$my-idref]]/@id" /><xsl:text>.htm#</xsl:text><xsl:value-of select="$my-idref" />
571 <xsl:text>[error: "a" template]</xsl:text>
576 <xsl:if test="@id"><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute></xsl:if>
577 <xsl:apply-templates />
583 <xsl:template match="a[@class='footnote']">
584 <xsl:apply-templates />
587 <xsl:attribute name="href"><xsl:text>#</xsl:text><xsl:value-of select="@idref" /></xsl:attribute>
588 <xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute>
589 <xsl:number count="a[@class='footnote']" from="/" level="any" format="1" />
594 <xsl:template match="em">
595 <em><xsl:apply-templates /></em>
598 <xsl:template match="strong">
599 <strong><xsl:apply-templates /></strong>
602 <xsl:template match="thought">
603 <i><xsl:apply-templates /></i>
606 <xsl:template match="onomatopoeia">
607 <i><xsl:apply-templates /></i>
610 <xsl:template match="spell">
611 <i><xsl:apply-templates /></i>
614 <xsl:template match="item">
615 <xsl:apply-templates />
618 <xsl:template match="foreign">
619 <i><xsl:apply-templates /></i>
622 <xsl:template match="quote">
623 <xsl:text>'</xsl:text>
624 <xsl:apply-templates />
625 <xsl:text>'</xsl:text>
628 <xsl:template match="quote//quote">
629 <xsl:text>"</xsl:text>
630 <xsl:apply-templates />
631 <xsl:text>"</xsl:text>
634 <xsl:template match="cite">
635 <cite><xsl:apply-templates /></cite>
638 <xsl:template match="code">
639 <tt><xsl:apply-templates /></tt>
642 <xsl:template match="br">
646 <xsl:template match="typ[@class='attribute']">
647 <span class="smallcaps"><xsl:apply-templates /></span>
650 <!-- ==================== named templates ======================= -->
652 <xsl:template name="xhtml-wrapper">
653 <xsl:param name="document-type">undefined</xsl:param>
654 <xsl:param name="filename">undefined</xsl:param>
655 <xsl:param name="glossary-id-prefix"></xsl:param>
657 <redirect:write file="{$book-path}/{$filename}.htm">
659 <xsl:text>xhtml-wrapper: Cannot write to filename: "</xsl:text>
660 <xsl:value-of select="$filename" /><xsl:text>.htm"</xsl:text>
664 <xsl:text> </xsl:text>
665 <xsl:apply-templates select="/gamebook/meta/rights[@class='copyrights']" />
666 <xsl:text> Published by </xsl:text>
667 <xsl:value-of select="/gamebook/meta/publisher[1]" />
668 <xsl:text>. </xsl:text>
670 <xsl:value-of select="$newline" />
672 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-UK" lang="en-UK">
674 <xsl:value-of select="$newline" />
675 <xsl:value-of select="$newline" />
677 <head><xsl:value-of select="$newline" />
679 <xsl:value-of select="/gamebook/meta/title[1]" />
680 <xsl:text>: </xsl:text>
682 <xsl:when test="$document-type='illustration'">
683 <xsl:text>Illustration </xsl:text>
684 <xsl:number count="illustration[@class='float']" from="/" level="any" format="I" />
686 <xsl:otherwise><xsl:value-of select="meta/title[1]" /></xsl:otherwise>
688 </title><xsl:value-of select="$newline" />
689 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><xsl:value-of select="$newline" />
690 <meta name="robots" content="noindex,nofollow" /><xsl:value-of select="$newline" />
691 <link rel="stylesheet" href="main.css" type="text/css" /><xsl:value-of select="$newline" />
694 <xsl:value-of select="$newline" />
695 <xsl:value-of select="$newline" />
698 <xsl:attribute name="text"><xsl:value-of select="$text-color" /></xsl:attribute>
699 <xsl:attribute name="bgcolor"><xsl:value-of select="$background-color" /></xsl:attribute>
700 <xsl:attribute name="background"><xsl:text>bckgrnd.gif</xsl:text></xsl:attribute>
701 <xsl:attribute name="link"><xsl:value-of select="$link-color" /></xsl:attribute>
702 <xsl:attribute name="alink"><xsl:value-of select="$alink-color" /></xsl:attribute>
703 <xsl:attribute name="vlink"><xsl:value-of select="$vlink-color" /></xsl:attribute>
705 <xsl:value-of select="$newline" />
706 <h1><xsl:value-of select="/gamebook/meta/title[1]" /></h1><xsl:value-of select="$newline" />
707 <div id="body"><xsl:value-of select="$newline" />
711 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~ top-level ~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
713 <xsl:when test="$document-type='top-level'">
714 <div class="frontmatter"><xsl:value-of select="$newline" />
715 <p class="author"><xsl:apply-templates select="/gamebook/meta/creator[@class='medium']" /></p>
717 <xsl:apply-templates select="/gamebook/meta/description[@class='publication']" />
720 <xsl:text>Publication Date: </xsl:text>
721 <xsl:value-of select="/gamebook/meta/date[@class='publication']/day" />
722 <xsl:text> </xsl:text>
724 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 1">
725 <xsl:text>January</xsl:text>
727 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 2">
728 <xsl:text>February</xsl:text>
730 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 3">
731 <xsl:text>March</xsl:text>
733 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 4">
734 <xsl:text>April</xsl:text>
736 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 5">
737 <xsl:text>May</xsl:text>
739 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 6">
740 <xsl:text>June</xsl:text>
742 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 7">
743 <xsl:text>July</xsl:text>
745 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 8">
746 <xsl:text>August</xsl:text>
748 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 9">
749 <xsl:text>September</xsl:text>
751 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 10">
752 <xsl:text>October</xsl:text>
754 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 11">
755 <xsl:text>November</xsl:text>
757 <xsl:when test="/gamebook/meta/date[@class='publication']/month = 12">
758 <xsl:text>December</xsl:text>
761 <xsl:text>Invalid Month</xsl:text>
764 <xsl:text> </xsl:text>
765 <xsl:value-of select="/gamebook/meta/date[@class='publication']/year" />
768 <xsl:apply-templates select="/gamebook/meta/rights[@class='license-notification']" />
772 <xsl:apply-templates select="/gamebook/meta/description[@class='blurb']" />
773 <xsl:apply-templates select="/gamebook/meta/creator[@class='long']" />
775 <xsl:value-of select="$newline" />
777 <xsl:call-template name="navigation-bar" />
779 <xsl:value-of select="$newline" />
780 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
784 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ toc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
786 <xsl:when test="$document-type='toc'">
787 <div class="frontmatter"><xsl:value-of select="$newline" />
788 <h2>Table of Contents</h2><xsl:value-of select="$newline" />
790 <xsl:value-of select="$newline" />
791 <xsl:value-of select="$newline" />
793 <ul><xsl:value-of select="$newline" />
795 <a><xsl:attribute name="href"><xsl:value-of select="@id" /><xsl:text>.htm</xsl:text></xsl:attribute>
796 <xsl:value-of select="meta/title[1]" />
799 <xsl:for-each select="data/section">
801 <a><xsl:attribute name="href"><xsl:value-of select="@id" /><xsl:text>.htm</xsl:text></xsl:attribute>
802 <xsl:value-of select="meta/title[1]" />
804 <xsl:if test="data/section[@class='frontmatter-separate' or @class='mainmatter-separate']">
805 <xsl:value-of select="$newline" />
806 <ul><xsl:value-of select="$newline" />
807 <xsl:for-each select="data/section[@class='frontmatter-separate' or @class='mainmatter-separate']">
809 <a><xsl:attribute name="href"><xsl:value-of select="@id" /><xsl:text>.htm</xsl:text></xsl:attribute>
810 <xsl:value-of select ="meta/title[1]" />
812 </li><xsl:value-of select="$newline" />
814 </ul><xsl:value-of select="$newline" />
816 </li><xsl:value-of select="$newline" />
818 </ul><xsl:value-of select="$newline" />
820 <xsl:value-of select="$newline" />
821 <xsl:value-of select="$newline" />
822 <xsl:call-template name="navigation-bar" />
823 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
826 <!-- ~~~~~~~~~~~~~~~~ second-level-frontmatter ~~~~~~~~~~~~~~~~~~~ -->
828 <xsl:when test="$document-type='second-level-frontmatter'">
829 <div class="frontmatter"><xsl:value-of select="$newline" />
830 <h2><xsl:value-of select="meta/title" /></h2><xsl:value-of select="$newline" />
832 <xsl:value-of select="$newline" />
834 <xsl:apply-templates />
836 <xsl:value-of select="$newline" />
838 <xsl:call-template name="navigation-bar" />
840 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
843 <!-- ~~~~~~~~~~~~~ third-level-frontmatter-separate ~~~~~~~~~~~~~~ -->
845 <xsl:when test="$document-type='third-level-frontmatter-separate'">
846 <div class="frontmatter"><xsl:value-of select="$newline" />
847 <h3><xsl:value-of select="meta/title" /></h3><xsl:value-of select="$newline" />
848 <xsl:value-of select="$newline" />
850 <xsl:apply-templates />
852 <xsl:value-of select="$newline" />
854 <xsl:call-template name="navigation-bar" />
856 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
859 <!-- ~~~~~~~~~~~~~~~~ second-level-mainmatter ~~~~~~~~~~~~~~~~~~~ -->
861 <xsl:when test="$document-type='second-level-mainmatter'">
862 <div class="mainmatter"><xsl:value-of select="$newline" />
863 <h2><xsl:value-of select="meta/title" /></h2><xsl:value-of select="$newline" />
864 <xsl:value-of select="$newline" />
866 <xsl:apply-templates />
868 <xsl:value-of select="$newline" />
870 <xsl:call-template name="navigation-bar" />
872 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
875 <!-- ~~~~~~~~~~~~~ third-level-mainmatter-separate ~~~~~~~~~~~~~~ -->
877 <xsl:when test="$document-type='third-level-mainmatter-separate'">
878 <div class="mainmatter"><xsl:value-of select="$newline" />
879 <h3><xsl:value-of select="meta/title" /></h3><xsl:value-of select="$newline" />
880 <xsl:value-of select="$newline" />
882 <xsl:apply-templates />
884 <xsl:value-of select="$newline" />
886 <xsl:call-template name="navigation-bar" />
888 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
891 <!-- ~~~~~~~~~~~~~~~~ second-level-glossary ~~~~~~~~~~~~~~~~~~~ -->
893 <xsl:when test="$document-type='second-level-glossary'">
894 <div class="mainmatter"><xsl:value-of select="$newline" />
895 <h2><xsl:value-of select="meta/title" /></h2><xsl:value-of select="$newline" />
896 <xsl:value-of select="$newline" />
898 <xsl:apply-templates />
900 <xsl:value-of select="$newline" />
902 <xsl:call-template name="alpha-bar">
903 <xsl:with-param name="alpha-bar-id-prefix"><xsl:value-of select="$glossary-id-prefix" /></xsl:with-param>
906 <xsl:call-template name="navigation-bar" />
908 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
911 <!-- ~~~~~~~~~~~~~ third-level-glossary-separate ~~~~~~~~~~~~~~ -->
913 <xsl:when test="$document-type='third-level-glossary-separate'">
914 <div class="glossary"><xsl:value-of select="$newline" />
915 <h3><xsl:value-of select="meta/title" /></h3><xsl:value-of select="$newline" />
916 <xsl:call-template name="alpha-bar">
917 <xsl:with-param name="alpha-bar-id-prefix"><xsl:value-of select="$glossary-id-prefix" /></xsl:with-param>
920 <xsl:value-of select="$newline" />
922 <xsl:apply-templates />
924 <xsl:value-of select="$newline" />
926 <xsl:call-template name="navigation-bar" />
927 <xsl:value-of select="$newline" />
928 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
931 <!-- ~~~~~~~~~~~~~~~~~~ second-level-numbered ~~~~~~~~~~~~~~~~~~~~ -->
933 <xsl:when test="$document-type='second-level-numbered'">
934 <div class="frontmatter"><xsl:value-of select="$newline" />
935 <h2><xsl:value-of select="meta/title" /></h2><xsl:value-of select="$newline" />
936 <xsl:value-of select="$newline" />
939 <xsl:for-each select="data/section">
940 <xsl:if test="position() mod 50 = 1">
942 <xsl:attribute name="href"><xsl:text>#</xsl:text><xsl:value-of select="position()" /></xsl:attribute>
943 <xsl:value-of select="position()" /><xsl:text> - </xsl:text>
945 <xsl:when test="position() + 49 <= last()">
946 <xsl:value-of select="position() + 49" />
949 <xsl:value-of select="last()" />
952 </a><br /><xsl:value-of select="$newline" />
957 <xsl:value-of select="$newline" />
958 <xsl:value-of select="$newline" />
962 <xsl:value-of select="$newline" />
963 <xsl:value-of select="$newline" />
965 <xsl:for-each select="data/section">
966 <xsl:if test="position() mod 10 = 1">
969 <xsl:attribute name="name"><xsl:value-of select="position()" /></xsl:attribute>
970 <xsl:value-of select="position()" /><xsl:text> - </xsl:text>
972 <xsl:when test="position() + 9 <= last()">
973 <xsl:value-of select="position() + 9" />
976 <xsl:value-of select="last()" />
980 </h3><xsl:value-of select="$newline" />
981 <xsl:text disable-output-escaping="yes"><p class="center"><tt>[</xsl:text>
984 <xsl:attribute name="href"><xsl:value-of select="@id" /><xsl:text>.htm</xsl:text></xsl:attribute>
985 <xsl:value-of select="meta/title[1]" />
988 <xsl:when test="position() mod 10 = 0">
989 <xsl:text disable-output-escaping="yes">]</tt></p></xsl:text>
990 <xsl:value-of select="$newline" />
991 <xsl:value-of select="$newline" />
994 <xsl:text>|</xsl:text>
999 <xsl:value-of select="$newline" />
1000 <xsl:value-of select="$newline" />
1002 <xsl:call-template name="navigation-bar" />
1003 <xsl:value-of select="$newline" />
1004 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
1007 <!-- ~~~~~~~~~~~~~~~~~~ third-level-numbered ~~~~~~~~~~~~~~~~~~~~~ -->
1009 <xsl:when test="$document-type='third-level-numbered'">
1010 <div class="numbered"><xsl:value-of select="$newline" />
1011 <h3><xsl:value-of select="meta/title" /></h3><xsl:value-of select="$newline" />
1012 <xsl:value-of select="$newline" />
1014 <xsl:apply-templates />
1016 <xsl:value-of select="$newline" />
1017 <xsl:call-template name="navigation-bar" />
1018 <xsl:value-of select="$newline" />
1022 <!-- ~~~~~~~~~~~~~~~~~ second-level-backmatter ~~~~~~~~~~~~~~~~~~~ -->
1024 <xsl:when test="$document-type='second-level-backmatter'">
1025 <div class="frontmatter"><xsl:value-of select="$newline" />
1026 <h2><xsl:value-of select="meta/title" /></h2><xsl:value-of select="$newline" />
1028 <xsl:value-of select="$newline" />
1029 <xsl:value-of select="$newline" />
1031 <xsl:apply-templates />
1033 <xsl:value-of select="$newline" />
1035 <xsl:call-template name="navigation-bar" />
1036 <xsl:value-of select="$newline" />
1037 </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
1040 <!-- ~~~~~~~~~~~~~~~~~~~~~~~ map-adjusted ~~~~~~~~~~~~~~~~~~~~~~~~ -->
1042 <xsl:when test="$document-type='map-adjusted'">
1043 <div class="frontmatter"><xsl:value-of select="$newline" />
1044 <h2><xsl:value-of select="meta/title" /></h2><xsl:value-of select="$newline" />
1046 <xsl:value-of select="$newline" />
1047 <xsl:value-of select="$newline" />
1049 <xsl:for-each select="data/* | data/text()">
1051 <xsl:when test="self::illustration">
1052 <xsl:variable name="illustration-width" select="instance[@class='html']/@width" />
1053 <xsl:variable name="illustration-height" select="instance[@class='html']/@height" />
1054 <xsl:variable name="illustration-src" select="instance[@class='html']/@src" />
1056 <xsl:variable name="illustration-width-adjusted"><xsl:number value="386" /></xsl:variable>
1057 <xsl:variable name="illustration-height-adjusted"><xsl:number value="$illustration-height * $illustration-width-adjusted div $illustration-width" /></xsl:variable>
1061 <!-- <div class="illustration"><div align="center"><xsl:value-of select="$newline" />
1062 <table border="0" cellpadding="0" cellspacing="0"><xsl:value-of select="$newline" />
1063 <tr><xsl:value-of select="$newline" />
1064 <td><img src="brdrtpl.gif" width="31" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
1065 <td><img src="brdrtp.gif" width="{$illustration-width-adjusted}" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
1066 <td><img src="brdrtpr.gif" width="33" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
1067 </tr><xsl:value-of select="$newline" />
1068 <tr><xsl:value-of select="$newline" />
1069 <td><img src="brdrl.gif" width="31" height="{$illustration-height-adjusted}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
1070 <td><a href="maplarge.htm"><img src="{$illustration-src}" width="{$illustration-width-adjusted}" height="{$illustration-height-adjusted}" align="middle" border="0" alt="[map]" /></a></td><xsl:value-of select="$newline" />
1071 <td><img src="brdrr.gif" width="33" height="{$illustration-height-adjusted}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
1072 </tr><xsl:value-of select="$newline" />
1073 <tr><xsl:value-of select="$newline" />
1074 <td><img src="brdrbtl.gif" width="31" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
1075 <td><img src="brdrbt.gif" width="{$illustration-width-adjusted}" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
1076 <td><img src="brdrbtr.gif" width="33" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
1077 </tr><xsl:value-of select="$newline" />
1078 </table><xsl:value-of select="$newline" />
1080 </div></div><xsl:value-of select="$newline" /> -->
1083 <xsl:apply-templates select="." />
1088 <xsl:value-of select="$newline" />
1090 <xsl:call-template name="navigation-bar" />
1091 <xsl:value-of select="$newline" />
1095 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ map ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
1097 <xsl:when test="$document-type='map'">
1098 <div class="frontmatter"><xsl:value-of select="$newline" />
1099 <h2><xsl:value-of select="meta/title" /></h2><xsl:value-of select="$newline" />
1101 <xsl:value-of select="$newline" />
1102 <xsl:value-of select="$newline" />
1104 <xsl:for-each select="data/* | data/text()">
1106 <xsl:when test="self::illustration">
1107 <xsl:variable name="illustration-width" select="instance[@class='html']/@width" />
1108 <xsl:variable name="illustration-height" select="instance[@class='html']/@height" />
1109 <xsl:variable name="illustration-src" select="instance[@class='html']/@src" />
1113 <!-- <div class="illustration"><div align="center"><xsl:value-of select="$newline" />
1114 <table border="0" cellpadding="0" cellspacing="0"><xsl:value-of select="$newline" />
1115 <tr><xsl:value-of select="$newline" />
1116 <td><img src="brdrtpl.gif" width="31" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
1117 <td><img src="brdrtp.gif" width="{$illustration-width}" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
1118 <td><img src="brdrtpr.gif" width="33" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
1119 </tr><xsl:value-of select="$newline" />
1120 <tr><xsl:value-of select="$newline" />
1121 <td><img src="brdrl.gif" width="31" height="{$illustration-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
1122 <td><a href="map.htm"><img src="{$illustration-src}" width="{$illustration-width}" height="{$illustration-height}" align="middle" border="0" alt="[map]" /></a></td><xsl:value-of select="$newline" />
1123 <td><img src="brdrr.gif" width="33" height="{$illustration-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
1124 </tr><xsl:value-of select="$newline" />
1125 <tr><xsl:value-of select="$newline" />
1126 <td><img src="brdrbtl.gif" width="31" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
1127 <td><img src="brdrbt.gif" width="{$illustration-width}" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
1128 <td><img src="brdrbtr.gif" width="33" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
1129 </tr><xsl:value-of select="$newline" />
1130 </table><br /><xsl:value-of select="$newline" />
1131 </div></div><xsl:value-of select="$newline" />-->
1134 <xsl:apply-templates select="." />
1139 <xsl:value-of select="$newline" />
1141 <xsl:call-template name="navigation-bar" />
1142 <xsl:value-of select="$newline" />
1146 <!-- ~~~~~~~~~~~~~~~~~~~~~~ illustration ~~~~~~~~~~~~~~~~~~~~~~~~~ -->
1148 <xsl:when test="$document-type='illustration'">
1149 <xsl:variable name="illustration-width" select="instance[@class='html']/@width" />
1150 <xsl:variable name="illustration-height" select="instance[@class='html']/@height" />
1151 <xsl:variable name="illustration-src" select="instance[@class='html']/@src" />
1154 <xsl:text>Illustration </xsl:text>
1155 <xsl:number count="illustration[@class='float']" from="/" level="any" format="I" />
1156 </h3><xsl:value-of select="$newline" />
1158 <div class="illustration"><div align="center"><xsl:value-of select="$newline" />
1159 <p><img src="{$illustration-src}" width="{$illustration-width}" height="{$illustration-height}" align="middle" border="0" alt="[illustration]" /></p><xsl:value-of select="$newline" />
1160 </div></div><xsl:value-of select="$newline" />
1161 <p class="caption"><strong><xsl:apply-templates select="meta/description" /></strong></p><xsl:value-of select="$newline" />
1164 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
1168 <xsl:text>xhtml-wrapper: Cannot process document of type "</xsl:text>
1169 <xsl:value-of select="$document-type" />
1170 <xsl:text>".</xsl:text>
1173 <xsl:text>xhtml-wrapper: Cannot process document of type "</xsl:text>
1174 <xsl:value-of select="$document-type" />
1175 <xsl:text>".</xsl:text>
1181 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ footer ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
1183 <xsl:call-template name="process-footnotes" />
1185 <p class="copyright"><xsl:apply-templates select="/gamebook/meta/rights[@class='copyrights']" /></p><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
1187 </div><xsl:value-of select="$newline" />
1189 <map name="imagemap" id="imagemap">
1190 <area shape="rect" coords="0,0,99,99" href="http://www.projectaon.org/" alt="Project Aon" />
1191 <area shape="default" href="title.htm" alt="The Masters of Darkness" />
1196 <xsl:value-of select="$newline" />
1197 <xsl:value-of select="$newline" />
1204 <xsl:template name="process-footnotes">
1205 <xsl:if test="footnotes/footnote">
1206 <div id="footnotes"><xsl:value-of select="$newline" />
1207 <xsl:for-each select="footnotes/footnote">
1208 <xsl:variable name="footnote-idref" select="@idref" />
1209 <xsl:variable name="footnote-id" select="@id" />
1210 <xsl:variable name="footnote-marker"><xsl:number count="footnotes/footnote" from="/" level="any" format="1" /></xsl:variable>
1212 <xsl:for-each select="*[1]">
1214 <xsl:text>[</xsl:text>
1215 <a href="#{$footnote-idref}" name="{$footnote-id}"><xsl:value-of select="$footnote-marker" /></a>
1216 <xsl:text>] </xsl:text>
1217 <xsl:apply-templates select="child::* | child::text()" />
1221 <xsl:for-each select="*[position() != 1]">
1222 <xsl:apply-templates select="." />
1225 </div><xsl:value-of select="$newline" />
1229 <xsl:template name="navigation-bar">
1230 <div class="navigation">
1231 <table cellspacing="0" cellpadding="0" border="0">
1235 <xsl:when test="meta/link[@class='prev']">
1237 <xsl:attribute name="href">
1238 <xsl:value-of select="meta/link[@class='prev']/@idref" />
1239 <xsl:text>.htm</xsl:text>
1241 <img src="back.gif" width="150" height="30" border="0">
1242 <xsl:attribute name="alt">
1243 <xsl:value-of select="id( meta/link[@class='prev']/@idref )/meta/title" />
1249 <img src="left.gif" width="150" height="30" border="0" alt="" />
1253 <td><a href="toc.htm"><img src="toc.gif" width="150" height="30" border="0" alt="" /></a></td>
1256 <xsl:when test="meta/link[@class='next']">
1258 <xsl:attribute name="href">
1259 <xsl:value-of select="meta/link[@class='next']/@idref" />
1260 <xsl:text>.htm</xsl:text>
1262 <img src="forward.gif" width="150" height="30" border="0">
1263 <xsl:attribute name="alt">
1265 <xsl:when test="$next-id = 'sect1'">
1266 <xsl:text>Section 1</xsl:text>
1269 <xsl:value-of select="id( meta/link[@class='next']/@idref )/meta/title" />
1277 <img src="right.gif" width="150" height="30" border="0" alt="" />
1286 <xsl:template name="alpha-bar">
1287 <xsl:param name="alpha-bar-id-prefix"></xsl:param>
1289 <p class="navigation">[<a href="{$alpha-bar-id-prefix}a.htm">A</a> <a href="{$alpha-bar-id-prefix}b.htm">B</a> <a href="{$alpha-bar-id-prefix}c.htm">C</a> <a href="{$alpha-bar-id-prefix}d.htm">D</a> <a href="{$alpha-bar-id-prefix}e.htm">E</a> <a href="{$alpha-bar-id-prefix}f.htm">F</a> <a href="{$alpha-bar-id-prefix}g.htm">G</a> <a href="{$alpha-bar-id-prefix}h.htm">H</a> <a href="{$alpha-bar-id-prefix}i.htm">I</a> <a href="{$alpha-bar-id-prefix}j.htm">J</a> <a href="{$alpha-bar-id-prefix}k.htm">K</a> <a href="{$alpha-bar-id-prefix}l.htm">L</a> <a href="{$alpha-bar-id-prefix}m.htm">M</a> <a href="{$alpha-bar-id-prefix}n.htm">N</a> <a href="{$alpha-bar-id-prefix}o.htm">O</a> <a href="{$alpha-bar-id-prefix}p.htm">P</a> <a href="{$alpha-bar-id-prefix}q.htm">Q</a> <a href="{$alpha-bar-id-prefix}r.htm">R</a> <a href="{$alpha-bar-id-prefix}s.htm">S</a> <a href="{$alpha-bar-id-prefix}t.htm">T</a> <a href="{$alpha-bar-id-prefix}u.htm">U</a> <a href="{$alpha-bar-id-prefix}v.htm">V</a> <a href="{$alpha-bar-id-prefix}w.htm">W</a> <a href="{$alpha-bar-id-prefix}x.htm">X</a> <a href="{$alpha-bar-id-prefix}y.htm">Y</a> <a href="{$alpha-bar-id-prefix}z.htm">Z</a>]</p><xsl:value-of select="$newline" />