]> git.stg.codes - stg.git/blob - doc/xslt/slides/html/plain.xsl
Add rules count in STG-MIB
[stg.git] / doc / xslt / slides / html / plain.xsl
1 <?xml version="1.0"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3                 version="1.0">
4
5 <xsl:import href="slides-common.xsl"/>
6
7 <xsl:param name="prev.image"    select="'active/nav-prev.png'"/>
8 <xsl:param name="next.image"    select="'active/nav-next.png'"/>
9 <xsl:param name="up.image"      select="'active/nav-up.png'"/>
10 <xsl:param name="toc.image"     select="'active/nav-toc.png'"/>
11 <xsl:param name="home.image"    select="'active/nav-home.png'"/>
12
13 <xsl:param name="no.prev.image" select="'inactive/nav-prev.png'"/>
14 <xsl:param name="no.next.image" select="'inactive/nav-next.png'"/>
15 <xsl:param name="no.up.image"   select="'inactive/nav-up.png'"/>
16 <xsl:param name="no.toc.image"  select="'inactive/nav-toc.png'"/>
17 <xsl:param name="no.home.image" select="'inactive/nav-home.png'"/>
18
19 <xsl:param name="css.stylesheet" select="'slides-plain.css'"/>
20
21 <!-- ====================================================================== -->
22
23 <xsl:template name="top-nav">
24   <xsl:param name="prev"/>
25   <xsl:param name="next"/>
26   <xsl:param name="up"/>
27   <xsl:param name="home"/>
28   <xsl:param name="toc" select="$toc.html"/>
29
30   <div class="navhead">
31     <table width="100%" border="0" cellpadding="0" cellspacing="0"
32            summary="Navigation">
33       <tr>
34         <td align="left" width="45%">
35           <span class="slidestitle">
36             <xsl:value-of select="(/slides/slidesinfo/title)[1]"/>
37           </span>
38           <xsl:text>&#160;</xsl:text>
39         </td>
40         <td width="10%" align="center" valign="bottom">
41           <xsl:call-template name="foil.number"/>
42         </td>
43         <td align="right" width="45%">
44           <xsl:choose>
45             <xsl:when test="$home">
46               <a>
47                 <xsl:attribute name="href">
48                   <xsl:apply-templates select="$home" mode="filename"/>
49                 </xsl:attribute>
50                 <xsl:attribute name="title">
51                   <xsl:value-of select="$home/slidesinfo/title"/>
52                 </xsl:attribute>
53                 <img alt="Home" border="0">
54                   <xsl:attribute name="src">
55                     <xsl:call-template name="home.image"/>
56                   </xsl:attribute>
57                 </img>
58               </a>
59             </xsl:when>
60             <xsl:otherwise>
61               <img alt="Home" border="0">
62                 <xsl:attribute name="src">
63                   <xsl:call-template name="no.home.image"/>
64                 </xsl:attribute>
65               </img>
66             </xsl:otherwise>
67           </xsl:choose>
68           <xsl:text>&#160;</xsl:text>
69
70           <xsl:choose>
71             <xsl:when test="$toc != ''">
72               <a title="ToC" href="{$toc}">
73                 <img alt="ToC" border="0">
74                   <xsl:attribute name="src">
75                     <xsl:call-template name="toc.image"/>
76                   </xsl:attribute>
77                 </img>
78               </a>
79             </xsl:when>
80             <xsl:otherwise>
81               <img alt="ToC" border="0">
82                 <xsl:attribute name="src">
83                   <xsl:call-template name="no.toc.image"/>
84                 </xsl:attribute>
85               </img>
86             </xsl:otherwise>
87           </xsl:choose>
88           <xsl:text>&#160;</xsl:text>
89
90           <xsl:choose>
91             <xsl:when test="$prev">
92               <a>
93                 <xsl:attribute name="href">
94                   <xsl:apply-templates select="$prev" mode="filename"/>
95                 </xsl:attribute>
96                 <xsl:attribute name="title">
97                   <xsl:value-of select="$prev/title"/>
98                 </xsl:attribute>
99                 <img alt="Prev" border="0">
100                   <xsl:attribute name="src">
101                     <xsl:call-template name="prev.image"/>
102                   </xsl:attribute>
103                 </img>
104               </a>
105             </xsl:when>
106             <xsl:otherwise>
107               <img alt="Prev" border="0">
108                 <xsl:attribute name="src">
109                   <xsl:call-template name="no.prev.image"/>
110                 </xsl:attribute>
111               </img>
112             </xsl:otherwise>
113           </xsl:choose>
114           <xsl:text>&#160;</xsl:text>
115
116           <xsl:choose>
117             <xsl:when test="$up">
118               <a>
119                 <xsl:attribute name="href">
120                   <xsl:apply-templates select="$up" mode="filename"/>
121                 </xsl:attribute>
122                 <xsl:attribute name="title">
123                   <xsl:value-of select="$up/title"/>
124                 </xsl:attribute>
125                 <img alt="Up" border="0">
126                   <xsl:attribute name="src">
127                     <xsl:call-template name="up.image"/>
128                   </xsl:attribute>
129                 </img>
130               </a>
131             </xsl:when>
132             <xsl:otherwise>
133               <img alt="Up" border="0">
134                 <xsl:attribute name="src">
135                   <xsl:call-template name="no.up.image"/>
136                 </xsl:attribute>
137               </img>
138             </xsl:otherwise>
139           </xsl:choose>
140           <xsl:text>&#160;</xsl:text>
141
142           <xsl:choose>
143             <xsl:when test="$next">
144               <a>
145                 <xsl:attribute name="href">
146                   <xsl:apply-templates select="$next" mode="filename"/>
147                 </xsl:attribute>
148                 <xsl:attribute name="title">
149                   <xsl:value-of select="$next/title"/>
150                 </xsl:attribute>
151                 <img alt="Next" border="0">
152                   <xsl:attribute name="src">
153                     <xsl:call-template name="next.image"/>
154                   </xsl:attribute>
155                 </img>
156               </a>
157             </xsl:when>
158             <xsl:otherwise>
159               <img alt="Next" border="0">
160                 <xsl:attribute name="src">
161                   <xsl:call-template name="no.next.image"/>
162                 </xsl:attribute>
163               </img>
164             </xsl:otherwise>
165           </xsl:choose>
166           <xsl:text>&#160;</xsl:text>
167         </td>
168       </tr>
169     </table>
170     <hr class="top-nav-sep"/>
171   </div>
172 </xsl:template>
173
174 <!-- ============================================================ -->
175
176 <xsl:template name="titlepage-top-nav">
177   <xsl:param name="home"/>
178   <xsl:param name="up"/>
179   <xsl:param name="prev"/>
180   <xsl:param name="next"/>
181   <xsl:param name="toc" select="$toc.html"/>
182
183   <div class="navhead">
184     <table width="100%" border="0" cellpadding="0" cellspacing="0"
185            summary="Navigation">
186       <tr>
187         <td align="left" width="50%">
188           <xsl:text>&#160;</xsl:text>
189         </td>
190         <td align="right" width="50%">
191           <xsl:choose>
192             <xsl:when test="$home">
193               <a>
194                 <xsl:attribute name="href">
195                   <xsl:apply-templates select="$home" mode="filename"/>
196                 </xsl:attribute>
197                 <xsl:attribute name="title">
198                   <xsl:value-of select="$home/slidesinfo/title"/>
199                 </xsl:attribute>
200                 <img alt="Home" border="0">
201                   <xsl:attribute name="src">
202                     <xsl:call-template name="home.image"/>
203                   </xsl:attribute>
204                 </img>
205               </a>
206             </xsl:when>
207             <xsl:otherwise>
208               <img alt="Home" border="0">
209                 <xsl:attribute name="src">
210                   <xsl:call-template name="no.home.image"/>
211                 </xsl:attribute>
212               </img>
213             </xsl:otherwise>
214           </xsl:choose>
215           <xsl:text>&#160;</xsl:text>
216
217           <xsl:choose>
218             <xsl:when test="$toc.html != ''">
219               <a title="ToC" href="{$toc.html}">
220                 <img alt="ToC" border="0">
221                   <xsl:attribute name="src">
222                     <xsl:call-template name="toc.image"/>
223                   </xsl:attribute>
224                 </img>
225               </a>
226             </xsl:when>
227             <xsl:otherwise>
228               <img alt="ToC" border="0">
229                 <xsl:attribute name="src">
230                   <xsl:call-template name="no.toc.image"/>
231                 </xsl:attribute>
232               </img>
233             </xsl:otherwise>
234           </xsl:choose>
235           <xsl:text>&#160;</xsl:text>
236
237           <xsl:choose>
238             <xsl:when test="$prev">
239               <a>
240                 <xsl:attribute name="href">
241                   <xsl:apply-templates select="$prev" mode="filename"/>
242                 </xsl:attribute>
243                 <xsl:attribute name="title">
244                   <xsl:value-of select="$prev/title"/>
245                 </xsl:attribute>
246                 <img alt="Prev" border="0">
247                   <xsl:attribute name="src">
248                     <xsl:call-template name="prev.image"/>
249                   </xsl:attribute>
250                 </img>
251               </a>
252             </xsl:when>
253             <xsl:otherwise>
254               <img alt="Prev" border="0">
255                 <xsl:attribute name="src">
256                   <xsl:call-template name="no.prev.image"/>
257                 </xsl:attribute>
258               </img>
259             </xsl:otherwise>
260           </xsl:choose>
261           <xsl:text>&#160;</xsl:text>
262
263           <xsl:choose>
264             <xsl:when test="$up">
265               <a>
266                 <xsl:attribute name="href">
267                   <xsl:apply-templates select="$up" mode="filename"/>
268                 </xsl:attribute>
269                 <xsl:attribute name="title">
270                   <xsl:value-of select="$up/title"/>
271                 </xsl:attribute>
272                 <img alt="Up" border="0">
273                   <xsl:attribute name="src">
274                     <xsl:call-template name="up.image"/>
275                   </xsl:attribute>
276                 </img>
277               </a>
278             </xsl:when>
279             <xsl:otherwise>
280               <img alt="Up" border="0">
281                 <xsl:attribute name="src">
282                   <xsl:call-template name="no.up.image"/>
283                 </xsl:attribute>
284               </img>
285             </xsl:otherwise>
286           </xsl:choose>
287           <xsl:text>&#160;</xsl:text>
288
289           <xsl:choose>
290             <xsl:when test="$next">
291               <a>
292                 <xsl:attribute name="href">
293                   <xsl:apply-templates select="$next" mode="filename"/>
294                 </xsl:attribute>
295                 <xsl:attribute name="title">
296                   <xsl:value-of select="$next/title"/>
297                 </xsl:attribute>
298                 <img alt="Next" border="0">
299                   <xsl:attribute name="src">
300                     <xsl:call-template name="next.image"/>
301                   </xsl:attribute>
302                 </img>
303               </a>
304             </xsl:when>
305             <xsl:otherwise>
306               <img alt="Next" border="0">
307                 <xsl:attribute name="src">
308                   <xsl:call-template name="no.next.image"/>
309                 </xsl:attribute>
310               </img>
311             </xsl:otherwise>
312           </xsl:choose>
313           <xsl:text>&#160;</xsl:text>
314         </td>
315       </tr>
316     </table>
317     <hr class="top-nav-sep"/>
318   </div>
319 </xsl:template>
320
321 <!-- ============================================================ -->
322
323 <xsl:template name="toc-top-nav">
324   <xsl:param name="home" select="/slides"/>
325   <xsl:param name="up"/>
326   <xsl:param name="prev"/>
327   <xsl:param name="next" select="(foil|foilgroup)[1]"/>
328   <xsl:param name="toc"/>
329
330   <div class="navhead">
331     <table width="100%" border="0" cellpadding="0" cellspacing="0"
332            summary="Navigation">
333       <tr>
334         <td align="left" width="50%">
335           <xsl:text>&#160;</xsl:text>
336         </td>
337         <td align="right" width="50%">
338           <xsl:choose>
339             <xsl:when test="$home">
340               <a>
341                 <xsl:attribute name="href">
342                   <xsl:apply-templates select="$home" mode="filename"/>
343                 </xsl:attribute>
344                 <xsl:attribute name="title">
345                   <xsl:value-of select="$home/slidesinfo/title"/>
346                 </xsl:attribute>
347                 <img alt="Home" border="0">
348                   <xsl:attribute name="src">
349                     <xsl:call-template name="home.image"/>
350                   </xsl:attribute>
351                 </img>
352               </a>
353             </xsl:when>
354             <xsl:otherwise>
355               <img alt="Home" border="0">
356                 <xsl:attribute name="src">
357                   <xsl:call-template name="no.home.image"/>
358                 </xsl:attribute>
359               </img>
360             </xsl:otherwise>
361           </xsl:choose>
362           <xsl:text>&#160;</xsl:text>
363
364           <xsl:choose>
365             <xsl:when test="$toc != ''">
366               <a title="ToC" href="{$toc}">
367                 <img alt="ToC" border="0">
368                   <xsl:attribute name="src">
369                     <xsl:call-template name="toc.image"/>
370                   </xsl:attribute>
371                 </img>
372               </a>
373             </xsl:when>
374             <xsl:otherwise>
375               <img alt="ToC" border="0">
376                 <xsl:attribute name="src">
377                   <xsl:call-template name="no.toc.image"/>
378                 </xsl:attribute>
379               </img>
380             </xsl:otherwise>
381           </xsl:choose>
382           <xsl:text>&#160;</xsl:text>
383
384           <xsl:choose>
385             <xsl:when test="$prev">
386               <a>
387                 <xsl:attribute name="href">
388                   <xsl:apply-templates select="$prev" mode="filename"/>
389                 </xsl:attribute>
390                 <xsl:attribute name="title">
391                   <xsl:value-of select="$prev/title"/>
392                 </xsl:attribute>
393                 <img alt="Prev" border="0">
394                   <xsl:attribute name="src">
395                     <xsl:call-template name="prev.image"/>
396                   </xsl:attribute>
397                 </img>
398               </a>
399             </xsl:when>
400             <xsl:otherwise>
401               <img alt="Prev" border="0">
402                 <xsl:attribute name="src">
403                   <xsl:call-template name="no.prev.image"/>
404                 </xsl:attribute>
405               </img>
406             </xsl:otherwise>
407           </xsl:choose>
408           <xsl:text>&#160;</xsl:text>
409
410           <xsl:choose>
411             <xsl:when test="$up">
412               <a>
413                 <xsl:attribute name="href">
414                   <xsl:apply-templates select="$up" mode="filename"/>
415                 </xsl:attribute>
416                 <xsl:attribute name="title">
417                   <xsl:value-of select="$up/title"/>
418                 </xsl:attribute>
419                 <img alt="Up" border="0">
420                   <xsl:attribute name="src">
421                     <xsl:call-template name="up.image"/>
422                   </xsl:attribute>
423                 </img>
424               </a>
425             </xsl:when>
426             <xsl:otherwise>
427               <img alt="Up" border="0">
428                 <xsl:attribute name="src">
429                   <xsl:call-template name="no.up.image"/>
430                 </xsl:attribute>
431               </img>
432             </xsl:otherwise>
433           </xsl:choose>
434           <xsl:text>&#160;</xsl:text>
435
436           <xsl:choose>
437             <xsl:when test="$next">
438               <a>
439                 <xsl:attribute name="href">
440                   <xsl:apply-templates select="$next" mode="filename"/>
441                 </xsl:attribute>
442                 <xsl:attribute name="title">
443                   <xsl:value-of select="$next/title"/>
444                 </xsl:attribute>
445                 <img alt="Next" border="0">
446                   <xsl:attribute name="src">
447                     <xsl:call-template name="next.image"/>
448                   </xsl:attribute>
449                 </img>
450               </a>
451             </xsl:when>
452             <xsl:otherwise>
453               <img alt="Next" border="0">
454                 <xsl:attribute name="src">
455                   <xsl:call-template name="no.next.image"/>
456                 </xsl:attribute>
457               </img>
458             </xsl:otherwise>
459           </xsl:choose>
460           <xsl:text>&#160;</xsl:text>
461         </td>
462       </tr>
463     </table>
464     <hr class="top-nav-sep"/>
465   </div>
466 </xsl:template>
467
468 <!-- ====================================================================== -->
469
470 <xsl:template name="bottom-nav"/>
471
472 </xsl:stylesheet>