]> git.stg.codes - stg.git/blob - doc/xslt/slides/htmlhelp/htmlhelp.xsl
Set output encoding to utf-8.
[stg.git] / doc / xslt / slides / htmlhelp / htmlhelp.xsl
1 <?xml version="1.0"?>
2 <!DOCTYPE xsl:stylesheet [
3 <!ENTITY lf '<xsl:text xmlns:xsl="http://www.w3.org/1999/XSL/Transform">&#xA;</xsl:text>'>
4 ]>
5 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6                 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
7                 xmlns:exsl="http://exslt.org/common"
8                 xmlns:set="http://exslt.org/sets"
9                 version="1.0"
10                 exclude-result-prefixes="doc exsl set">
11
12 <!-- ********************************************************************
13      $Id: htmlhelp.xsl 6569 2007-01-30 07:03:13Z xmldoc $
14      ******************************************************************** 
15
16      This stylesheet can convert DocBook Slides document type into HTML Help.
17
18      ******************************************************************** -->
19
20 <xsl:import href="../html/plain.xsl"/>
21 <xsl:include href="../../htmlhelp/htmlhelp-common.xsl"/>
22
23 <xsl:param name="keyboard.nav" select="0"/>
24 <xsl:param name="htmlhelp.default.topic" select="'index.html'"/>
25
26 <xsl:template match="slides" mode="title.markup">
27   <xsl:param name="allow-anchors" select="0"/>
28   <xsl:apply-templates select="(slidesinfo/title|title)[1]"
29                        mode="title.markup">
30     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
31   </xsl:apply-templates>
32 </xsl:template>
33
34 <xsl:template match="slides|foilgroup" mode="hhc">
35   <xsl:variable name="title">
36     <xsl:if test="$htmlhelp.autolabel=1">
37       <xsl:variable name="label.markup">
38         <xsl:apply-templates select="." mode="label.markup"/>
39       </xsl:variable>
40       <xsl:if test="normalize-space($label.markup)">
41         <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
42       </xsl:if>
43     </xsl:if>
44     <xsl:apply-templates select="." mode="title.markup"/>
45   </xsl:variable>
46
47   <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
48     <LI><OBJECT type="text/sitemap">&lf;
49       <param name="Name" value="{normalize-space($title)}"/>&lf;
50       <param name="Local">
51         <xsl:attribute name="value">
52           <xsl:apply-templates select="." mode="filename"/>
53         </xsl:attribute>
54       </param>
55     </OBJECT></LI>&lf;
56   </xsl:if>
57   <xsl:if test="foil|foilgroup">
58     <UL>&lf;
59       <xsl:apply-templates select="foil|foilgroup" mode="hhc"/>
60     </UL>&lf;
61   </xsl:if>
62 </xsl:template>
63
64 <xsl:template match="foil" mode="hhc">
65   <xsl:variable name="title">
66     <xsl:if test="$htmlhelp.autolabel=1">
67       <xsl:variable name="label.markup">
68         <xsl:apply-templates select="." mode="label.markup"/>
69       </xsl:variable>
70       <xsl:if test="normalize-space($label.markup)">
71         <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
72       </xsl:if>
73     </xsl:if>
74     <xsl:apply-templates select="." mode="title.markup"/>
75   </xsl:variable>
76
77   <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
78     <LI><OBJECT type="text/sitemap">&lf;
79       <param name="Name" value="{normalize-space($title)}"/>&lf;
80       <param name="Local">
81         <xsl:attribute name="value">
82           <xsl:apply-templates select="." mode="filename"/>
83         </xsl:attribute>
84       </param>
85     </OBJECT></LI>&lf;
86   </xsl:if>
87 </xsl:template>
88
89 </xsl:stylesheet>