2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 <xsl:import href="../../html/chunk.xsl"/>
6 <xsl:include href="../../VERSION"/>
8 <xsl:include href="param.xsl"/>
9 <xsl:include href="jscript.xsl"/>
10 <xsl:include href="graphics.xsl"/>
11 <xsl:include href="css.xsl"/>
13 <xsl:output method="html"/>
15 <xsl:strip-space elements="slides foil foilgroup"/>
17 <!-- Process the slides -->
19 <xsl:template match="/">
20 <xsl:apply-templates/>
23 <xsl:template match="slides">
24 <xsl:apply-templates select="." mode="toc"/>
25 <xsl:apply-templates/>
28 <!-- ====================================================================== -->
29 <!-- Every slide has top and bottom navigation -->
31 <xsl:template name="top-nav">
32 <xsl:param name="home"/>
33 <xsl:param name="up"/>
34 <xsl:param name="next"/>
35 <xsl:param name="prev"/>
36 <xsl:param name="tocfile" select="$toc.html"/>
39 <table border="0" width="100%" cellspacing="0" cellpadding="0"
40 summary="Navigation table">
42 <td align="left" valign="bottom">
44 <span class="slidestitle">
46 <xsl:attribute name="href">
47 <xsl:apply-templates select="$home" mode="filename"/>
49 <xsl:value-of select="($home/title|$home/slidesinfo/title)[1]"/>
53 <xsl:text> </xsl:text>
56 <td align="right" valign="bottom">
58 <xsl:when test="$home">
59 <span class="link-text">
61 <xsl:attribute name="href">
62 <xsl:apply-templates select="$home" mode="filename"/>
64 <img alt="{$text.home}" border="0">
65 <xsl:attribute name="src">
66 <xsl:call-template name="home.image"/>
73 <span class="no-link-text">
74 <img alt="{$text.home}" border="0">
75 <xsl:attribute name="src">
76 <xsl:call-template name="no.home.image"/>
82 <xsl:text> </xsl:text>
85 <xsl:when test="$tocfile">
86 <span class="link-text">
88 <xsl:attribute name="href">
89 <xsl:value-of select="$tocfile"/>
91 <img alt="{$text.toc}" border="0">
92 <xsl:attribute name="src">
93 <xsl:call-template name="toc.image"/>
100 <span class="no-link-text">
101 <img alt="{$text.toc}" border="0">
102 <xsl:attribute name="src">
103 <xsl:call-template name="no.toc.image"/>
109 <xsl:text> </xsl:text>
112 <xsl:when test="$prev">
113 <span class="link-text">
115 <xsl:attribute name="href">
116 <xsl:apply-templates select="$prev" mode="filename"/>
118 <img alt="{$text.prev}" border="0">
119 <xsl:attribute name="src">
120 <xsl:call-template name="prev.image"/>
127 <span class="no-link-text">
128 <img alt="{$text.prev}" border="0">
129 <xsl:attribute name="src">
130 <xsl:call-template name="no.prev.image"/>
136 <xsl:text> </xsl:text>
139 <xsl:when test="$up">
140 <span class="link-text">
142 <xsl:attribute name="href">
143 <xsl:apply-templates select="$up" mode="filename"/>
145 <img alt="{$text.up}" border="0">
146 <xsl:attribute name="src">
147 <xsl:call-template name="up.image"/>
154 <span class="no-link-text">
155 <img alt="{$text.up}" border="0">
156 <xsl:attribute name="src">
157 <xsl:call-template name="no.up.image"/>
163 <xsl:text> </xsl:text>
166 <xsl:when test="$next">
167 <span class="link-text">
169 <xsl:attribute name="href">
170 <xsl:apply-templates select="$next" mode="filename"/>
172 <img alt="{$text.next}" border="0">
173 <xsl:attribute name="src">
174 <xsl:call-template name="next.image"/>
181 <span class="no-link-text">
182 <img alt="{$text.next}" border="0">
183 <xsl:attribute name="src">
184 <xsl:call-template name="no.next.image"/>
190 <xsl:text> </xsl:text>
194 <hr class="top-nav-sep"/>
198 <xsl:template name="bottom-nav">
199 <xsl:param name="home"/>
200 <xsl:param name="up"/>
201 <xsl:param name="next"/>
202 <xsl:param name="prev"/>
203 <xsl:param name="tocfile" select="$toc.html"/>
205 <div class="navfoot">
206 <hr class="bottom-nav-sep"/>
207 <table border="0" width="100%" cellspacing="0" cellpadding="0"
208 summary="Navigation table">
210 <td align="left" valign="top">
211 <xsl:apply-templates select="/slides/slidesinfo/copyright"
212 mode="slide.footer.mode"/>
213 <xsl:text> </xsl:text>
216 <td align="right" valign="top">
218 <xsl:when test="$prev">
219 <span class="link-text">
221 <xsl:attribute name="href">
222 <xsl:apply-templates select="$prev" mode="filename"/>
224 <img alt="{$text.prev}" border="0">
225 <xsl:attribute name="src">
226 <xsl:call-template name="prev.image"/>
233 <span class="no-link-text">
234 <img alt="{$text.prev}" border="0">
235 <xsl:attribute name="src">
236 <xsl:call-template name="no.prev.image"/>
242 <xsl:text> </xsl:text>
245 <xsl:when test="$next">
246 <span class="link-text">
248 <xsl:attribute name="href">
249 <xsl:apply-templates select="$next" mode="filename"/>
251 <img alt="{$text.next}" border="0">
252 <xsl:attribute name="src">
253 <xsl:call-template name="next.image"/>
260 <span class="no-link-text">
261 <img alt="{$text.next}" border="0">
262 <xsl:attribute name="src">
263 <xsl:call-template name="no.next.image"/>
269 <xsl:text> </xsl:text>
276 <!-- Navigation is also provided in the form of links in the head -->
278 <xsl:template name="links">
279 <xsl:param name="home"/>
280 <xsl:param name="up"/>
281 <xsl:param name="next"/>
282 <xsl:param name="prev"/>
283 <xsl:param name="tocfile" select="$toc.html"/>
285 <xsl:if test="$tocfile != ''">
286 <link rel="contents" href="{$tocfile}">
287 <xsl:attribute name="title">
288 <xsl:value-of select="/slides/slidesinfo/title"/>
293 <xsl:if test="$home">
295 <xsl:attribute name="href">
296 <xsl:apply-templates select="$home" mode="filename"/>
298 <xsl:attribute name="title">
299 <xsl:value-of select="($home/title|$home/slidesinfo/title)[1]"/>
304 <xsl:attribute name="href">
305 <xsl:apply-templates select="$home" mode="filename"/>
307 <xsl:attribute name="title">
308 <xsl:value-of select="($home/title|$home/slidesinfo/title)[1]"/>
315 <xsl:attribute name="href">
316 <xsl:apply-templates select="$up" mode="filename"/>
318 <xsl:attribute name="title">
319 <xsl:value-of select="($up/title|$up/slidesinfo/title)[1]"/>
324 <xsl:if test="$prev">
325 <link rel="previous">
326 <xsl:attribute name="href">
327 <xsl:apply-templates select="$prev" mode="filename"/>
329 <xsl:attribute name="title">
330 <xsl:value-of select="($prev/title|$prev/slidesinfo/title)[1]"/>
335 <xsl:if test="$next">
337 <xsl:attribute name="href">
338 <xsl:apply-templates select="$next" mode="filename"/>
340 <xsl:attribute name="title">
341 <xsl:value-of select="$next/title"/>
345 <xsl:variable name="last" select="$next/following::foil[last()]"/>
346 <xsl:if test="$last">
348 <xsl:attribute name="href">
349 <xsl:apply-templates select="$last" mode="filename"/>
351 <xsl:attribute name="title">
352 <xsl:value-of select="$last/title"/>
358 <xsl:for-each select="foil">
360 <xsl:attribute name="href">
361 <xsl:apply-templates select="." mode="filename"/>
363 <xsl:attribute name="title">
364 <xsl:value-of select="title[1]"/>
369 <xsl:for-each select="foilgroup|../foilgroup">
371 <xsl:attribute name="href">
372 <xsl:apply-templates select="." mode="filename"/>
374 <xsl:attribute name="title">
375 <xsl:value-of select="title[1]"/>
381 <!-- ====================================================================== -->
382 <!-- There are four kinds of slides: titlepage, toc, foil, and foilgroup -->
385 <xsl:template match="slidesinfo">
386 <xsl:variable name="id">
387 <xsl:call-template name="object.id"/>
390 <xsl:variable name="next" select="(/slides/foil|/slides/foilgroup)[1]"/>
391 <xsl:variable name="tocfile" select="$toc.html"/>
392 <xsl:variable name="dir">
393 <xsl:call-template name="dbhtml-dir"/>
397 <xsl:call-template name="write.chunk">
398 <xsl:with-param name="indent" select="$output.indent"/>
399 <xsl:with-param name="filename" select="concat($base.dir, $dir, $titlefoil.html)"/>
400 <xsl:with-param name="content">
403 <title><xsl:value-of select="title"/></title>
405 <xsl:call-template name="system.head.content">
406 <xsl:with-param name="node" select=".."/>
409 <meta name="generator" content="DocBook Slides Stylesheets V{$VERSION}"/>
412 <xsl:if test="$css.stylesheet != ''">
413 <link type="text/css" rel="stylesheet">
414 <xsl:attribute name="href">
415 <xsl:call-template name="css.stylesheet"/>
419 <xsl:apply-templates select="/processing-instruction('dbhtml')" mode="css.pi"/>
421 <xsl:call-template name="links">
422 <xsl:with-param name="home" select="/slides"/>
423 <xsl:with-param name="next" select="$next"/>
424 <xsl:with-param name="tocfile" select="$tocfile"/>
429 <xsl:if test="$overlay != 0 or $keyboard.nav != 0">
430 <script language="javascript" type="text/javascript">
431 <xsl:text> </xsl:text>
435 <xsl:if test="$keyboard.nav != 0">
436 <xsl:call-template name="ua.js"/>
437 <xsl:call-template name="xbDOM.js">
438 <xsl:with-param name="language" select="'javascript'"/>
440 <xsl:call-template name="xbLibrary.js"/>
441 <script language="javascript" type="text/javascript">
442 <xsl:text disable-output-escaping="yes">
444 xblibrary = new xbLibrary('</xsl:text>
445 <xsl:call-template name="script-dir"/>
446 <xsl:text disable-output-escaping="yes">');
450 <xsl:call-template name="xbStyle.js"/>
451 <xsl:call-template name="xbCollapsibleLists.js"/>
452 <xsl:call-template name="slides.js">
453 <xsl:with-param name="language" select="'javascript'"/>
457 <xsl:if test="$overlay != '0'">
458 <xsl:call-template name="overlay.js">
459 <xsl:with-param name="language" select="'javascript'"/>
463 <xsl:call-template name="user.head.content">
464 <xsl:with-param name="node" select=".."/>
468 <xsl:attribute name="class">
469 <xsl:text>titlepage</xsl:text>
470 <xsl:if test="@role">
471 <xsl:text>-</xsl:text>
472 <xsl:value-of select="@role"/>
476 <xsl:call-template name="body.attributes"/>
477 <xsl:if test="$overlay != 0">
478 <xsl:attribute name="onload">
479 <xsl:text>overlaySetup('lc')</xsl:text>
482 <xsl:if test="$keyboard.nav != 0">
483 <xsl:attribute name="onkeypress">
484 <xsl:text>navigate(event)</xsl:text>
488 <div class="titlepage" id="{$id}">
489 <xsl:call-template name="titlepage-top-nav">
490 <xsl:with-param name="next" select="$next"/>
491 <xsl:with-param name="tocfile" select="$tocfile"/>
494 <div class="titlepage-body">
495 <xsl:call-template name="titlepage-body"/>
498 <div id="overlayDiv">
499 <xsl:call-template name="overlayDiv.attributes"/>
500 <xsl:call-template name="titlepage-bottom-nav">
501 <xsl:with-param name="next" select="$next"/>
502 <xsl:with-param name="tocfile" select="$tocfile"/>
512 <xsl:template name="titlepage-body">
513 <div class="{name(.)}">
514 <xsl:apply-templates mode="titlepage.mode"/>
518 <xsl:template name="titlepage-top-nav">
519 <xsl:param name="home"/>
520 <xsl:param name="up"/>
521 <xsl:param name="next"/>
522 <xsl:param name="prev"/>
523 <xsl:param name="tocfile" select="$toc.html"/>
525 <xsl:call-template name="top-nav">
526 <xsl:with-param name="home" select="$home"/>
527 <xsl:with-param name="up" select="$up"/>
528 <xsl:with-param name="next" select="$next"/>
529 <xsl:with-param name="prev" select="$prev"/>
530 <xsl:with-param name="tocfile" select="$tocfile"/>
534 <xsl:template name="titlepage-bottom-nav">
535 <xsl:param name="home"/>
536 <xsl:param name="up"/>
537 <xsl:param name="next"/>
538 <xsl:param name="prev"/>
539 <xsl:param name="tocfile" select="$toc.html"/>
541 <xsl:call-template name="bottom-nav">
542 <xsl:with-param name="home" select="$home"/>
543 <xsl:with-param name="up" select="$up"/>
544 <xsl:with-param name="next" select="$next"/>
545 <xsl:with-param name="prev" select="$prev"/>
546 <xsl:with-param name="tocfile" select="$tocfile"/>
550 <xsl:template match="slidesinfo/title">
551 <h1 class="{name(.)}"><xsl:apply-templates/></h1>
554 <xsl:template match="slidesinfo/authorgroup">
555 <xsl:apply-templates/>
558 <xsl:template match="slidesinfo/author|slidesinfo/authorgroup/author">
559 <h1 class="{name(.)}"><xsl:apply-imports/></h1>
562 <xsl:template match="slidesinfo/releaseinfo">
563 <h4 class="{name(.)}"><xsl:apply-templates/></h4>
566 <xsl:template match="slidesinfo/date">
567 <h4 class="{name(.)}"><xsl:apply-templates/></h4>
570 <xsl:template match="slidesinfo/copyright">
574 <!-- On slides, output the credits explicitly each time -->
575 <xsl:template match="othercredit" mode="titlepage.mode">
576 <xsl:variable name="contrib" select="string(contrib)"/>
578 <xsl:when test="contrib">
579 <xsl:call-template name="paragraph">
580 <xsl:with-param name="class" select="name(.)"/>
581 <xsl:with-param name="content">
582 <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
583 <xsl:text>: </xsl:text>
584 <xsl:call-template name="person.name"/>
585 <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
590 <xsl:call-template name="paragraph">
591 <xsl:with-param name="class" select="name(.)"/>
592 <xsl:with-param name="content">
593 <xsl:call-template name="person.name"/>
596 <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
601 <!-- ====================================================================== -->
604 <xsl:template match="slides" mode="toc">
605 <xsl:variable name="id">
606 <xsl:call-template name="object.id"/>
609 <xsl:variable name="home" select="/slides"/>
610 <xsl:variable name="up" select="/slides"/>
611 <xsl:variable name="next" select="(foil|foilgroup)[1]"/>
612 <xsl:variable name="tocfile" select="''"/>
613 <xsl:variable name="dir"> <!-- MJ: added -->
614 <xsl:call-template name="dbhtml-dir"/>
617 <xsl:call-template name="write.chunk">
618 <xsl:with-param name="indent" select="$output.indent"/>
619 <xsl:with-param name="filename" select="concat($base.dir, $dir, $toc.html)"/>
620 <xsl:with-param name="content">
623 <title><xsl:value-of select="slidesinfo/title"/></title>
625 <xsl:call-template name="system.head.content"/>
627 <meta name="generator" content="DocBook Slides Stylesheets V{$VERSION}"/>
630 <xsl:if test="$css.stylesheet != ''">
631 <link type="text/css" rel="stylesheet">
632 <xsl:attribute name="href">
633 <xsl:call-template name="css.stylesheet"/>
637 <xsl:apply-templates select="/processing-instruction('dbhtml')" mode="css.pi"/>
639 <xsl:call-template name="links">
640 <xsl:with-param name="home" select="$home"/>
641 <xsl:with-param name="up" select="$up"/>
642 <xsl:with-param name="next" select="$next"/>
643 <xsl:with-param name="tocfile" select="$tocfile"/>
648 <xsl:if test="$overlay != 0 or $keyboard.nav != 0">
649 <script language="javascript" type="text/javascript">
650 <xsl:text> </xsl:text>
654 <xsl:if test="$keyboard.nav != 0">
655 <xsl:call-template name="ua.js"/>
656 <xsl:call-template name="xbDOM.js">
657 <xsl:with-param name="language" select="'javascript'"/>
659 <xsl:call-template name="xbLibrary.js"/>
660 <script language="javascript" type="text/javascript">
661 <xsl:text disable-output-escaping="yes">
663 xblibrary = new xbLibrary('</xsl:text>
664 <xsl:call-template name="script-dir"/>
665 <xsl:text disable-output-escaping="yes">');
669 <xsl:call-template name="xbStyle.js"/>
670 <xsl:call-template name="xbCollapsibleLists.js"/>
671 <xsl:call-template name="slides.js">
672 <xsl:with-param name="language" select="'javascript'"/>
676 <xsl:if test="$overlay != '0'">
677 <xsl:call-template name="overlay.js">
678 <xsl:with-param name="language" select="'javascript'"/>
682 <xsl:call-template name="user.head.content"/>
685 <body class="tocpage">
686 <xsl:call-template name="body.attributes"/>
687 <xsl:if test="$overlay != 0">
688 <xsl:attribute name="onload">
689 <xsl:text>overlaySetup('lc')</xsl:text>
692 <xsl:if test="$keyboard.nav != 0">
693 <xsl:attribute name="onkeypress">
694 <xsl:text>navigate(event)</xsl:text>
699 <xsl:call-template name="toc-top-nav">
700 <xsl:with-param name="home" select="$home"/>
701 <xsl:with-param name="up" select="$up"/>
702 <xsl:with-param name="next" select="$next"/>
703 <xsl:with-param name="tocfile" select="$tocfile"/>
706 <div class="toc-body">
707 <xsl:call-template name="toc-body"/>
710 <div id="overlayDiv">
711 <xsl:call-template name="overlayDiv.attributes"/>
712 <xsl:call-template name="toc-bottom-nav">
713 <xsl:with-param name="home" select="$home"/>
714 <xsl:with-param name="up" select="$up"/>
715 <xsl:with-param name="next" select="$next"/>
716 <xsl:with-param name="tocfile" select="$tocfile"/>
726 <xsl:template name="toc-body">
728 <a href="{$titlefoil.html}">
729 <xsl:value-of select="/slides/slidesinfo/title"/>
735 <xsl:call-template name="gentext">
736 <xsl:with-param name="key">TableofContents</xsl:with-param>
741 <xsl:apply-templates select="foilgroup|foil" mode="toc"/>
745 <xsl:template name="toc-top-nav">
746 <xsl:param name="home" select="/slides"/>
747 <xsl:param name="up"/>
748 <xsl:param name="prev"/>
749 <xsl:param name="next" select="(foil|foilgroup)[1]"/>
750 <xsl:param name="tocfile"/>
752 <xsl:call-template name="top-nav">
753 <xsl:with-param name="home" select="$home"/>
754 <xsl:with-param name="up" select="$up"/>
755 <xsl:with-param name="next" select="$next"/>
756 <xsl:with-param name="prev" select="$prev"/>
757 <xsl:with-param name="tocfile" select="$tocfile"/>
761 <xsl:template name="toc-bottom-nav">
762 <xsl:param name="home" select="/slides"/>
763 <xsl:param name="up"/>
764 <xsl:param name="prev"/>
765 <xsl:param name="next" select="(foil|foilgroup)[1]"/>
766 <xsl:param name="tocfile"/>
768 <xsl:call-template name="bottom-nav">
769 <xsl:with-param name="home" select="$home"/>
770 <xsl:with-param name="up" select="$up"/>
771 <xsl:with-param name="next" select="$next"/>
772 <xsl:with-param name="prev" select="$prev"/>
773 <xsl:with-param name="tocfile" select="$tocfile"/>
777 <xsl:template match="foilgroup" mode="toc">
778 <xsl:param name="recursive" select="1"/>
781 <xsl:apply-templates select="." mode="number"/>
782 <xsl:text>. </xsl:text>
784 <xsl:attribute name="href">
785 <xsl:apply-templates select="." mode="filename"/>
787 <xsl:value-of select="title"/>
790 <xsl:if test="$recursive != 0">
793 <xsl:apply-templates select="foil" mode="toc"/>
799 <xsl:template match="foil" mode="toc">
801 <xsl:apply-templates select="." mode="number"/>
802 <xsl:text>. </xsl:text>
804 <xsl:attribute name="href">
805 <xsl:apply-templates select="." mode="filename"/>
807 <xsl:value-of select="title"/>
812 <xsl:template match="title|titleabbrev" mode="toc">
813 <xsl:apply-templates mode="toc"/>
816 <xsl:template match="speakernotes" mode="toc">
820 <!-- ====================================================================== -->
823 <xsl:template match="foil">
824 <xsl:param name="thisfoil">
825 <xsl:apply-templates select="." mode="chunk-filename"/>
828 <xsl:variable name="id">
829 <xsl:call-template name="object.id"/>
832 <xsl:variable name="home" select="/slides"/>
833 <xsl:variable name="up" select="(parent::slides|parent::foilgroup)[1]"/>
834 <xsl:variable name="next" select="(following::foil
835 |following::foilgroup)[1]"/>
836 <xsl:variable name="prev" select="(preceding-sibling::foil[1]
837 |parent::foilgroup[1]
840 <xsl:call-template name="write.chunk">
841 <xsl:with-param name="indent" select="$output.indent"/>
842 <xsl:with-param name="filename" select="concat($base.dir, $thisfoil)"/>
843 <xsl:with-param name="content">
846 <title><xsl:value-of select="title"/></title>
848 <xsl:call-template name="system.head.content"/>
850 <meta name="generator" content="DocBook Slides Stylesheets V{$VERSION}"/>
853 <xsl:if test="$css.stylesheet != ''">
854 <link type="text/css" rel="stylesheet">
855 <xsl:attribute name="href">
856 <xsl:call-template name="css.stylesheet"/>
860 <xsl:apply-templates select="/processing-instruction('dbhtml')" mode="css.pi"/>
862 <xsl:call-template name="links">
863 <xsl:with-param name="home" select="$home"/>
864 <xsl:with-param name="up" select="$up"/>
865 <xsl:with-param name="next" select="$next"/>
866 <xsl:with-param name="prev" select="$prev"/>
871 <xsl:if test="$overlay != 0 or $keyboard.nav != 0">
872 <script language="javascript" type="text/javascript">
873 <xsl:text> </xsl:text>
877 <xsl:if test="$keyboard.nav != 0">
878 <xsl:call-template name="ua.js"/>
879 <xsl:call-template name="xbDOM.js">
880 <xsl:with-param name="language" select="'javascript'"/>
882 <xsl:call-template name="xbLibrary.js"/>
883 <script language="javascript" type="text/javascript">
884 <xsl:text disable-output-escaping="yes">
886 xblibrary = new xbLibrary('</xsl:text>
887 <xsl:call-template name="script-dir"/>
888 <xsl:text disable-output-escaping="yes">');
892 <xsl:call-template name="xbStyle.js"/>
893 <xsl:call-template name="xbCollapsibleLists.js"/>
894 <xsl:call-template name="slides.js">
895 <xsl:with-param name="language" select="'javascript'"/>
899 <xsl:if test="$overlay != '0'">
900 <xsl:call-template name="overlay.js">
901 <xsl:with-param name="language" select="'javascript'"/>
905 <xsl:call-template name="user.head.content"/>
908 <xsl:attribute name="class">
909 <xsl:value-of select="local-name(.)"/>
910 <xsl:if test="@role">
911 <xsl:text>-</xsl:text>
912 <xsl:value-of select="@role"/>
916 <xsl:call-template name="body.attributes"/>
917 <xsl:if test="$overlay != 0">
918 <xsl:attribute name="onload">
919 <xsl:text>overlaySetup('lc')</xsl:text>
922 <xsl:if test="$keyboard.nav != 0">
923 <xsl:attribute name="onkeypress">
924 <xsl:text>navigate(event)</xsl:text>
928 <div class="{name(.)}" id="{$id}">
929 <xsl:call-template name="foil-top-nav">
930 <xsl:with-param name="home" select="$home"/>
931 <xsl:with-param name="up" select="$up"/>
932 <xsl:with-param name="next" select="$next"/>
933 <xsl:with-param name="prev" select="$prev"/>
936 <div class="foil-body">
937 <xsl:call-template name="foil-body">
938 <xsl:with-param name="home" select="$home"/>
939 <xsl:with-param name="up" select="$up"/>
940 <xsl:with-param name="next" select="$next"/>
941 <xsl:with-param name="prev" select="$prev"/>
945 <div id="overlayDiv">
946 <xsl:call-template name="overlayDiv.attributes"/>
947 <xsl:call-template name="foil-bottom-nav">
948 <xsl:with-param name="home" select="$home"/>
949 <xsl:with-param name="up" select="$up"/>
950 <xsl:with-param name="next" select="$next"/>
951 <xsl:with-param name="prev" select="$prev"/>
956 <xsl:call-template name="process.footnotes"/>
963 <xsl:template name="foil-body">
964 <xsl:param name="home"/>
965 <xsl:param name="up"/>
966 <xsl:param name="next"/>
967 <xsl:param name="prev"/>
968 <xsl:param name="tocfile" select="$toc.html"/>
969 <xsl:apply-templates/>
972 <xsl:template name="foil-top-nav">
973 <xsl:param name="home"/>
974 <xsl:param name="up"/>
975 <xsl:param name="next"/>
976 <xsl:param name="prev"/>
977 <xsl:param name="tocfile" select="$toc.html"/>
979 <xsl:call-template name="top-nav">
980 <xsl:with-param name="home" select="$home"/>
981 <xsl:with-param name="up" select="$up"/>
982 <xsl:with-param name="next" select="$next"/>
983 <xsl:with-param name="prev" select="$prev"/>
987 <xsl:template name="foil-bottom-nav">
988 <xsl:param name="home"/>
989 <xsl:param name="up"/>
990 <xsl:param name="next"/>
991 <xsl:param name="prev"/>
992 <xsl:param name="tocfile" select="$toc.html"/>
994 <xsl:call-template name="bottom-nav">
995 <xsl:with-param name="home" select="$home"/>
996 <xsl:with-param name="up" select="$up"/>
997 <xsl:with-param name="next" select="$next"/>
998 <xsl:with-param name="prev" select="$prev"/>
1002 <xsl:template match="foil/title">
1003 <h1 class="{name(.)}">
1004 <xsl:apply-templates/>
1008 <!-- ====================================================================== -->
1011 <xsl:template match="foilgroup">
1012 <xsl:param name="thisfoilgroup">
1013 <xsl:apply-templates select="." mode="chunk-filename"/>
1016 <xsl:variable name="id">
1017 <xsl:call-template name="object.id"/>
1020 <xsl:variable name="home" select="/slides"/>
1021 <xsl:variable name="up" select="(parent::slides|parent::foilgroup)[1]"/>
1022 <xsl:variable name="next" select="foil[1]"/>
1023 <xsl:variable name="prev" select="(preceding::foil|parent::foilgroup|/slides)[last()]"/>
1025 <xsl:call-template name="write.chunk">
1026 <xsl:with-param name="indent" select="$output.indent"/>
1027 <xsl:with-param name="filename" select="concat($base.dir, $thisfoilgroup)"/>
1028 <xsl:with-param name="content">
1031 <title><xsl:value-of select="title"/></title>
1033 <xsl:call-template name="system.head.content"/>
1035 <meta name="generator" content="DocBook Slides Stylesheets V{$VERSION}"/>
1038 <xsl:if test="$css.stylesheet != ''">
1039 <link type="text/css" rel="stylesheet">
1040 <xsl:attribute name="href">
1041 <xsl:call-template name="css.stylesheet"/>
1045 <xsl:apply-templates select="/processing-instruction('dbhtml')" mode="css.pi"/>
1047 <xsl:call-template name="links">
1048 <xsl:with-param name="home" select="$home"/>
1049 <xsl:with-param name="up" select="$up"/>
1050 <xsl:with-param name="next" select="$next"/>
1051 <xsl:with-param name="prev" select="$prev"/>
1052 </xsl:call-template>
1056 <xsl:if test="$overlay != 0 or $keyboard.nav != 0">
1057 <script language="javascript" type="text/javascript">
1058 <xsl:text> </xsl:text>
1062 <xsl:if test="$keyboard.nav != 0">
1063 <xsl:call-template name="ua.js"/>
1064 <xsl:call-template name="xbDOM.js">
1065 <xsl:with-param name="language" select="'javascript'"/>
1066 </xsl:call-template>
1067 <xsl:call-template name="xbLibrary.js"/>
1068 <script language="javascript" type="text/javascript">
1069 <xsl:text disable-output-escaping="yes">
1071 xblibrary = new xbLibrary('</xsl:text>
1072 <xsl:call-template name="script-dir"/>
1073 <xsl:text disable-output-escaping="yes">');
1077 <xsl:call-template name="xbStyle.js"/>
1078 <xsl:call-template name="xbCollapsibleLists.js"/>
1079 <xsl:call-template name="slides.js">
1080 <xsl:with-param name="language" select="'javascript'"/>
1081 </xsl:call-template>
1084 <xsl:if test="$overlay != '0'">
1085 <xsl:call-template name="overlay.js">
1086 <xsl:with-param name="language" select="'javascript'"/>
1087 </xsl:call-template>
1090 <xsl:call-template name="user.head.content"/>
1093 <xsl:attribute name="class">
1094 <xsl:value-of select="local-name(.)"/>
1095 <xsl:if test="@role">
1096 <xsl:text>-</xsl:text>
1097 <xsl:value-of select="@role"/>
1101 <xsl:call-template name="body.attributes"/>
1102 <xsl:if test="$overlay != 0">
1103 <xsl:attribute name="onload">
1104 <xsl:text>overlaySetup('lc')</xsl:text>
1107 <xsl:if test="$keyboard.nav != 0">
1108 <xsl:attribute name="onkeypress">
1109 <xsl:text>navigate(event)</xsl:text>
1113 <div class="{name(.)}" id="{$id}">
1114 <xsl:call-template name="foilgroup-top-nav">
1115 <xsl:with-param name="home" select="$home"/>
1116 <xsl:with-param name="up" select="$up"/>
1117 <xsl:with-param name="next" select="$next"/>
1118 <xsl:with-param name="prev" select="$prev"/>
1119 </xsl:call-template>
1121 <!-- n.b. the foilgroup-body template is responsible for generating -->
1122 <!-- the foilgroup toc -->
1123 <div class="foilgroup-body">
1124 <xsl:call-template name="foilgroup-body">
1125 <xsl:with-param name="home" select="$home"/>
1126 <xsl:with-param name="up" select="$up"/>
1127 <xsl:with-param name="next" select="$next"/>
1128 <xsl:with-param name="prev" select="$prev"/>
1129 </xsl:call-template>
1132 <div id="overlayDiv">
1133 <xsl:call-template name="overlayDiv.attributes"/>
1134 <xsl:call-template name="foilgroup-bottom-nav">
1135 <xsl:with-param name="home" select="$home"/>
1136 <xsl:with-param name="up" select="$up"/>
1137 <xsl:with-param name="next" select="$next"/>
1138 <xsl:with-param name="prev" select="$prev"/>
1139 </xsl:call-template>
1143 <xsl:call-template name="process.footnotes"/>
1147 </xsl:call-template>
1149 <xsl:apply-templates select="foil"/>
1152 <xsl:template match="foilgroup/title">
1153 <h1 class="{name(.)}"><xsl:apply-templates/></h1>
1156 <xsl:template name="foilgroup-body">
1157 <xsl:param name="home"/>
1158 <xsl:param name="up"/>
1159 <xsl:param name="next"/>
1160 <xsl:param name="prev"/>
1161 <xsl:param name="tocfile" select="$toc.html"/>
1163 <xsl:apply-templates select="*[name(.) != 'foil'
1164 and name(.) != 'foilgroup']"/>
1166 <xsl:if test="$foilgroup.toc != 0">
1168 <xsl:apply-templates select="foil" mode="toc"/>
1173 <xsl:template name="foilgroup-top-nav">
1174 <xsl:param name="home"/>
1175 <xsl:param name="up"/>
1176 <xsl:param name="next"/>
1177 <xsl:param name="prev"/>
1178 <xsl:param name="tocfile" select="$toc.html"/>
1180 <xsl:call-template name="top-nav">
1181 <xsl:with-param name="home" select="$home"/>
1182 <xsl:with-param name="up" select="$up"/>
1183 <xsl:with-param name="next" select="$next"/>
1184 <xsl:with-param name="prev" select="$prev"/>
1185 </xsl:call-template>
1188 <xsl:template name="foilgroup-bottom-nav">
1189 <xsl:param name="home"/>
1190 <xsl:param name="up"/>
1191 <xsl:param name="next"/>
1192 <xsl:param name="prev"/>
1193 <xsl:param name="tocfile" select="$toc.html"/>
1195 <xsl:call-template name="bottom-nav">
1196 <xsl:with-param name="home" select="$home"/>
1197 <xsl:with-param name="up" select="$up"/>
1198 <xsl:with-param name="next" select="$next"/>
1199 <xsl:with-param name="prev" select="$prev"/>
1200 </xsl:call-template>
1203 <!-- ====================================================================== -->
1205 <xsl:template name="overlayDiv.attributes">
1207 <xsl:when test="$overlay != 0">
1208 <xsl:attribute name="style">
1209 <xsl:text>position: absolute; visibility: visible;</xsl:text>
1213 <xsl:attribute name="style">padding-top: 2in;</xsl:attribute>
1218 <!-- ====================================================================== -->
1220 <xsl:template match="processing-instruction('dbhtml')" mode="css.pi">
1221 <xsl:variable name="href">
1222 <xsl:call-template name="dbhtml-attribute">
1223 <xsl:with-param name="pis" select="."/>
1224 <xsl:with-param name="attribute" select="'css-stylesheet'"/>
1225 </xsl:call-template>
1228 <xsl:if test="$href!=''">
1230 <xsl:when test="$href = ''">
1233 <xsl:when test="contains($href, '//')">
1234 <link type="text/css" rel="stylesheet" href="{$href}"/>
1236 <xsl:when test="starts-with($href, '/')">
1237 <link type="text/css" rel="stylesheet" href="{$href}"/>
1240 <link type="text/css" rel="stylesheet">
1241 <xsl:attribute name="href">
1242 <xsl:call-template name="css-file">
1243 <xsl:with-param name="css" select="$href"/>
1244 </xsl:call-template>
1253 <!-- ====================================================================== -->
1255 <xsl:template match="foil" mode="number">
1256 <xsl:number count="foil|foilgroup" level="any"/>
1259 <xsl:template match="foilgroup" mode="number">
1260 <xsl:number count="foil|foilgroup" level="any"/>
1263 <!-- ====================================================================== -->
1265 <xsl:template match="slides" mode="filename">
1266 <xsl:value-of select="$titlefoil.html"/>
1269 <xsl:template match="foil" mode="filename">
1270 <xsl:text>foil</xsl:text>
1271 <xsl:number count="foil" level="any" format="01"/>
1272 <xsl:value-of select="$html.ext"/>
1275 <xsl:template match="foilgroup" mode="filename">
1276 <xsl:text>foilgroup</xsl:text>
1277 <xsl:number count="foilgroup" level="any" format="01"/>
1278 <xsl:value-of select="$html.ext"/>
1281 <!-- ============================================================ -->
1283 <xsl:template match="processing-instruction('Pub')">
1284 <xsl:variable name="pidata"><xsl:value-of select="(.)"/></xsl:variable>
1286 <xsl:when test="contains($pidata,'UDT')"></xsl:when>
1287 <xsl:when test="contains($pidata,'/_font')">
1288 <xsl:text disable-output-escaping="yes"></span></xsl:text>
1290 <xsl:when test="contains($pidata,'_font')">
1291 <xsl:text disable-output-escaping="yes"><span </xsl:text>
1293 <xsl:when test="contains($pidata,'green')">class="green"</xsl:when>
1294 <xsl:when test="contains($pidata,'blue')">class="blue"</xsl:when>
1295 <xsl:when test="contains($pidata,'orange')">class="orange"</xsl:when>
1296 <xsl:when test="contains($pidata,'red')">class="red"</xsl:when>
1297 <xsl:when test="contains($pidata,'brown')">class="brown"</xsl:when>
1298 <xsl:when test="contains($pidata,'violet')">class="violet"</xsl:when>
1299 <xsl:when test="contains($pidata,'black')">class="black"</xsl:when>
1300 <xsl:otherwise>class="bold"</xsl:otherwise>
1302 <xsl:text disable-output-escaping="yes">></xsl:text>
1307 <!-- ============================================================ -->
1310 <xsl:template match="figure">
1311 <div class="{name(.)}">
1312 <xsl:apply-imports/>
1314 <xsl:if test="following-sibling::*"><hr/></xsl:if>
1317 <xsl:template match="copyright" mode="slide.footer.mode">
1318 <span class="{name(.)}">
1319 <xsl:call-template name="gentext">
1320 <xsl:with-param name="key" select="'Copyright'"/>
1321 </xsl:call-template>
1322 <xsl:call-template name="gentext.space"/>
1323 <xsl:call-template name="dingbat">
1324 <xsl:with-param name="dingbat">copyright</xsl:with-param>
1325 </xsl:call-template>
1326 <xsl:call-template name="gentext.space"/>
1327 <xsl:call-template name="copyright.years">
1328 <xsl:with-param name="years" select="year"/>
1329 <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
1330 <xsl:with-param name="single.year.ranges"
1331 select="$make.single.year.ranges"/>
1332 </xsl:call-template>
1333 <xsl:call-template name="gentext.space"/>
1334 <xsl:apply-templates select="holder" mode="titlepage.mode"/>
1338 <!-- ============================================================ -->
1341 <xsl:template match="link">
1342 <xsl:call-template name="link">
1343 <xsl:with-param name="a.target" select="'foil'"/>
1344 </xsl:call-template>
1347 <xsl:template match="ulink">
1350 <xsl:attribute name="name"><xsl:value-of select="@id"/></xsl:attribute>
1352 <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
1353 <xsl:if test="$ulink.target != ''">
1354 <xsl:attribute name="target">
1355 <xsl:value-of select="$ulink.target"/>
1359 <xsl:when test="count(child::node())=0">
1360 <xsl:value-of select="@url"/>
1363 <xsl:apply-templates/>
1364 <xsl:if test="@role='show'">
1365 <xsl:text> (</xsl:text>
1366 <xsl:value-of select="@url"/>
1367 <xsl:text>)</xsl:text>
1374 <xsl:template match="title/ulink">
1377 <xsl:attribute name="name"><xsl:value-of select="@id"/></xsl:attribute>
1379 <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
1380 <xsl:if test="$ulink.target != ''">
1381 <xsl:attribute name="target">
1382 <xsl:value-of select="$ulink.target"/>
1386 <xsl:when test="count(child::node())=0">
1387 <xsl:value-of select="@url"/>
1390 <xsl:apply-templates/>
1396 <xsl:template match="subtitle">
1397 <h2 class="subtitle">
1398 <xsl:apply-templates/>
1402 <xsl:template match="graphic">
1404 <!-- can't this be done a better way? -->
1405 <xsl:apply-imports/>
1409 <xsl:template match="titleabbrev">
1413 <xsl:template match="speakernotes">
1417 <!-- ====================================================================== -->
1418 <!-- Chunking for slides -->
1420 <xsl:template name="chunk">
1421 <xsl:param name="node" select="."/>
1423 <xsl:when test="name($node)='slides'">1</xsl:when>
1424 <xsl:when test="name($node)='foilgroup'">1</xsl:when>
1425 <xsl:when test="name($node)='foil'">1</xsl:when>
1426 <xsl:otherwise>0</xsl:otherwise>
1430 <xsl:template match="*" mode="chunk-filename">
1431 <xsl:param name="recursive">0</xsl:param>
1432 <!-- returns the filename of a chunk -->
1433 <xsl:variable name="ischunk"><xsl:call-template name="chunk"/></xsl:variable>
1434 <xsl:variable name="filename">
1435 <xsl:call-template name="pi.dbhtml_filename"/>
1437 <xsl:variable name="dir">
1438 <xsl:call-template name="dbhtml-dir"/>
1442 <xsl:when test="$ischunk='0'">
1443 <!-- if called on something that isn't a chunk, walk up... -->
1445 <xsl:when test="count(./parent::*)>0">
1446 <xsl:apply-templates mode="chunk-filename" select="./parent::*">
1447 <xsl:with-param name="recursive" select="$recursive"/>
1448 </xsl:apply-templates>
1450 <!-- unless there is no up, in which case return "" -->
1451 <xsl:otherwise></xsl:otherwise>
1455 <xsl:when test="not($recursive) and $filename != ''">
1456 <!-- if this chunk has an explicit name, use it -->
1457 <xsl:if test="$dir != ''">
1458 <xsl:value-of select="$dir"/>
1459 <xsl:text>/</xsl:text>
1461 <xsl:value-of select="$filename"/>
1464 <xsl:when test="name(.)='foil'">
1465 <xsl:variable name="foilnumber">
1466 <xsl:number count="foil" level="any"/>
1469 <xsl:value-of select="$dir"/>
1470 <xsl:text>foil</xsl:text>
1471 <xsl:number value="$foilnumber" format="01"/>
1472 <xsl:value-of select="$html.ext"/>
1475 <xsl:when test="name(.)='foilgroup'">
1476 <xsl:variable name="foilgroupnumber">
1477 <xsl:number count="foilgroup" level="any" format="01"/>
1480 <xsl:value-of select="$dir"/>
1481 <xsl:text>foilgroup</xsl:text>
1482 <xsl:number value="$foilgroupnumber" format="01"/>
1483 <xsl:value-of select="$html.ext"/>
1487 <xsl:text>chunk-filename-error-</xsl:text>
1488 <xsl:value-of select="name(.)"/>
1489 <xsl:number level="any" format="01" from="set"/>
1490 <xsl:if test="not($recursive)">
1491 <xsl:value-of select="$html.ext"/>
1497 <!-- ====================================================================== -->
1498 <!-- Handling of xrefs -->
1500 <xsl:template match="foil|foilgroup" mode="xref-to">
1501 <xsl:param name="referrer"/>
1502 <xsl:param name="xrefstyle"/>
1504 <xsl:apply-templates select="." mode="object.xref.markup">
1505 <xsl:with-param name="purpose" select="'xref'"/>
1506 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
1507 <xsl:with-param name="referrer" select="$referrer"/>
1508 </xsl:apply-templates>
1511 <!-- ====================================================================== -->
1513 <xsl:template match="@*" mode="copy">
1514 <xsl:attribute name="{local-name(.)}">
1515 <xsl:value-of select="."/>
1519 <xsl:template match="html:*" xmlns:html='http://www.w3.org/1999/xhtml'>
1520 <xsl:element name="{local-name(.)}" namespace="">
1521 <xsl:apply-templates select="@*" mode="copy"/>
1522 <xsl:apply-templates/>
1526 <!-- ====================================================================== -->
1528 <xsl:template name="foil.number">
1530 <xsl:when test="$show.foil.number != 0 and self::foil">
1531 <xsl:number count="foil" level="any"/>
1533 <xsl:value-of select="count(//foil)"/>