2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 <xsl:import href="slides-common.xsl"/>
7 <xsl:param name="blank.image" select="'blank.png'"/>
8 <xsl:param name="arrow.image" select="'pointer.png'"/>
10 <xsl:param name="toc.bg.color">#6A719C</xsl:param>
11 <xsl:param name="toc.width">220</xsl:param>
13 <xsl:param name="css.stylesheet" select="'slides-table.css'"/>
15 <!-- ============================================================ -->
17 <xsl:template name="foilgroup-body">
18 <table border="0" width="100%" summary="Navigation and body table"
19 cellpadding="0" cellspacing="0">
21 <td width="{$toc.width}" valign="top" align="left">
22 <xsl:if test="$toc.bg.color != ''">
23 <xsl:attribute name="bgcolor">
24 <xsl:value-of select="$toc.bg.color"/>
28 <xsl:apply-templates select="." mode="t-toc"/>
32 <td valign="top" align="left">
33 <xsl:if test="$body.bg.color != ''">
34 <xsl:attribute name="bgcolor">
35 <xsl:value-of select="$body.bg.color"/>
38 <div class="{name(.)}">
39 <xsl:apply-templates select="*[name(.) != 'foil'
40 and name(.) != 'foilgroup']"/>
43 <xsl:if test="$foilgroup.toc != 0">
45 <xsl:apply-templates select="foil" mode="toc"/>
53 <xsl:template name="foil-body">
54 <table border="0" width="100%" summary="Navigation and body table"
55 cellpadding="0" cellspacing="0">
57 <td width="{$toc.width}" valign="top" align="left">
58 <xsl:if test="$toc.bg.color != ''">
59 <xsl:attribute name="bgcolor">
60 <xsl:value-of select="$toc.bg.color"/>
64 <xsl:apply-templates select="." mode="t-toc"/>
68 <td valign="top" align="left">
69 <xsl:if test="$body.bg.color != ''">
70 <xsl:attribute name="bgcolor">
71 <xsl:value-of select="$body.bg.color"/>
74 <div class="{name(.)}">
75 <xsl:apply-templates/>
82 <!-- ============================================================ -->
84 <xsl:template match="foilgroup" mode="t-toc">
85 <xsl:variable name="thisfoilgroup" select="."/>
87 <xsl:for-each select="/slides/foil|/slides/foilgroup">
89 <xsl:when test="name(.) = 'foilgroup'">
91 <xsl:when test="$thisfoilgroup = .">
93 <xsl:attribute name="src">
94 <xsl:call-template name="graphics-file">
95 <xsl:with-param name="image" select="$arrow.image"/>
102 <xsl:attribute name="src">
103 <xsl:call-template name="graphics-file">
104 <xsl:with-param name="image" select="$blank.image"/>
111 <span class="ttoc-foilgroup">
113 <xsl:attribute name="href">
114 <xsl:apply-templates select="." mode="filename"/>
116 <xsl:apply-templates select="." mode="toc-title"/>
121 <xsl:if test="$thisfoilgroup = .">
122 <xsl:for-each select="foil">
124 <xsl:attribute name="src">
125 <xsl:call-template name="graphics-file">
126 <xsl:with-param name="image" select="$blank.image"/>
131 <xsl:attribute name="src">
132 <xsl:call-template name="graphics-file">
133 <xsl:with-param name="image" select="$blank.image"/>
138 <span class="ttoc-foil">
140 <xsl:attribute name="href">
141 <xsl:apply-templates select="." mode="filename"/>
143 <xsl:apply-templates select="." mode="toc-title"/>
152 <xsl:attribute name="src">
153 <xsl:call-template name="graphics-file">
154 <xsl:with-param name="image" select="$blank.image"/>
158 <span class="ttoc-foil">
160 <xsl:attribute name="href">
161 <xsl:apply-templates select="." mode="filename"/>
163 <xsl:apply-templates select="." mode="toc-title"/>
172 <xsl:template match="foil" mode="t-toc">
173 <xsl:variable name="thisfoil" select="."/>
175 <xsl:for-each select="/slides/foil|/slides/foilgroup">
177 <xsl:when test="name(.) = 'foilgroup'">
179 <xsl:attribute name="src">
180 <xsl:call-template name="graphics-file">
181 <xsl:with-param name="image" select="$blank.image"/>
185 <span class="ttoc-foilgroup">
187 <xsl:attribute name="href">
188 <xsl:apply-templates select="." mode="filename"/>
190 <xsl:apply-templates select="." mode="toc-title"/>
195 <xsl:if test="$thisfoil/ancestor::foilgroup = .">
196 <xsl:for-each select="foil">
198 <xsl:attribute name="src">
199 <xsl:call-template name="graphics-file">
200 <xsl:with-param name="image" select="$blank.image"/>
206 <xsl:when test="$thisfoil = .">
208 <xsl:attribute name="src">
209 <xsl:call-template name="graphics-file">
210 <xsl:with-param name="image" select="$arrow.image"/>
217 <xsl:attribute name="src">
218 <xsl:call-template name="graphics-file">
219 <xsl:with-param name="image" select="$blank.image"/>
226 <span class="ttoc-foil">
228 <xsl:attribute name="href">
229 <xsl:apply-templates select="." mode="filename"/>
231 <xsl:apply-templates select="." mode="toc-title"/>
240 <xsl:for-each select="/slides/foil">
242 <xsl:when test="$thisfoil = .">
244 <xsl:attribute name="src">
245 <xsl:call-template name="graphics-file">
246 <xsl:with-param name="image" select="$arrow.image"/>
253 <xsl:attribute name="src">
254 <xsl:call-template name="graphics-file">
255 <xsl:with-param name="image" select="$blank.image"/>
261 <span class="ttoc-foil">
262 <xsl:apply-templates select="." mode="toc-title"/>
271 <!-- ============================================================ -->
273 <xsl:template match="slides" mode="toc-title">
274 <xsl:call-template name="nobreak">
275 <xsl:with-param name="string">
277 <xsl:when test="slidesinfo/titleabbrev">
278 <xsl:value-of select="slidesinfo/titleabbrev"/>
281 <xsl:value-of select="slidesinfo/title"/>
288 <xsl:template match="foilgroup" mode="toc-title">
289 <xsl:call-template name="nobreak">
290 <xsl:with-param name="string">
292 <xsl:when test="titleabbrev">
293 <xsl:value-of select="titleabbrev"/>
296 <xsl:value-of select="title"/>
303 <xsl:template match="foil" mode="toc-title">
304 <xsl:call-template name="nobreak">
305 <xsl:with-param name="string">
307 <xsl:when test="titleabbrev">
308 <xsl:value-of select="titleabbrev"/>
311 <xsl:value-of select="title"/>
318 <xsl:template name="nobreak">
319 <xsl:param name="string" select="''"/>
321 <xsl:when test="contains($string, ' ')">
322 <xsl:value-of select="substring-before($string, ' ')"/>
323 <xsl:text> </xsl:text>
324 <xsl:call-template name="nobreak">
325 <xsl:with-param name="string" select="substring-after($string, ' ')"/>
329 <xsl:value-of select="$string"/>
334 <!-- ============================================================ -->