revert patch for 2388
[ardour2.git] / manual / xsl / html.xsl
blobf8ddf14e342d6db4eaa2820b25eb25ca1382fae2
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:exsl="http://exslt.org/common"
4 version="1.0"
5 exclude-result-prefixes="exsl">
7 <xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl"/>
8 <xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets/xhtml/chunk-common.xsl"/>
9 <xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets/xhtml/chunk-code.xsl"/>
10 <xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets/xhtml/manifest.xsl"/>
12 <xsl:param name="html.stylesheet" select="'ardour_manual.css'"/>
13 <xsl:param name="html.stylesheet.type" select="'text/css'"/>
14 <xsl:param name="html.cleanup" select="1"/>
15 <xsl:param name="html.ext" select="'.html'"/>
16 <xsl:output method="html" indent="yes"/>
18 <!-- Admonition Graphics -->
19 <xsl:param name="admon.graphics" select="1"/>
20 <xsl:param name="admon.graphics.path">./images/tango-icons/</xsl:param>
21 <xsl:param name="callout.graphics.path">./images/tango-icons/</xsl:param>
23 <!-- Remove table and inline style from admonitions -->
25 <xsl:template name="graphical.admonition">
26 <xsl:variable name="admon.type">
27 <xsl:choose>
28 <xsl:when test="local-name(.)='note'">Note</xsl:when>
29 <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
30 <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
31 <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
32 <xsl:when test="local-name(.)='important'">Important</xsl:when>
33 <xsl:otherwise>Note</xsl:otherwise>
34 </xsl:choose>
35 </xsl:variable>
36 <div xmlns="http://www.w3.org/1999/xhtml" class="{name(.)}">
37 <xsl:call-template name="anchor"/>
38 <xsl:if test="$admon.textlabel != 0 or title">
39 <h2 class="title">
40 <xsl:apply-templates select="." mode="object.title.markup"/>
41 </h2>
42 </xsl:if>
43 <xsl:apply-templates/>
44 </div>
45 </xsl:template>
47 <!--
48 I'm not using draft mode because with at least the version
49 of the stylesheets I have it inserts inline css. I'm not aware
50 of a non-hacky way around that so until I find a better
51 solution I'm using custom status fields:
53 ardour-draft
55 ardour-beta?
56 ardour-rc (release candidate)?
58 -->
60 <!-- Add css class for status -->
61 <xsl:template name="body.attributes">
62 <xsl:if test="(ancestor-or-self::*[@status][1]/@status != '')">
63 <xsl:attribute name="class">
64 <xsl:value-of select="ancestor-or-self::*[@status][1]/@status"/>
65 </xsl:attribute>
66 </xsl:if>
67 </xsl:template>
69 <!-- titles after all elements -->
70 <xsl:param name="formal.title.placement">
71 figure after
72 example after
73 equation after
74 table after
75 procedure before
76 </xsl:param>
78 <!-- This sets the filename based on the ID. -->
79 <xsl:param name="use.id.as.filename" select="'1'"/>
81 <xsl:template match="command">
82 <xsl:call-template name="inline.monoseq"/>
83 </xsl:template>
85 <xsl:template match="application">
86 <xsl:call-template name="inline.boldseq"/>
87 </xsl:template>
89 <xsl:template match="guibutton">
90 <xsl:call-template name="inline.boldseq"/>
91 </xsl:template>
93 <xsl:template match="guiicon">
94 <xsl:call-template name="inline.boldseq"/>
95 </xsl:template>
97 <xsl:template match="guilabel">
98 <xsl:call-template name="inline.boldseq"/>
99 </xsl:template>
101 <xsl:template match="guimenu">
102 <xsl:call-template name="inline.boldseq"/>
103 </xsl:template>
105 <xsl:template match="guimenuitem">
106 <xsl:call-template name="inline.boldseq"/>
107 </xsl:template>
109 <xsl:template match="guisubmenu">
110 <xsl:call-template name="inline.boldseq"/>
111 </xsl:template>
113 <xsl:template match="mousebutton">
114 <xsl:call-template name="inline.boldseq"/>
115 </xsl:template>
117 <xsl:template match="filename">
118 <xsl:call-template name="inline.monoseq"/>
119 </xsl:template>
121 <!-- TOC -->
122 <xsl:param name="section.autolabel" select="1"/>
123 <xsl:param name="section.label.includes.component.label" select="1"/>
124 <xsl:param name="generate.legalnotice.link" select="1"/>
125 <xsl:param name="generate.revhistory.link" select="1"/>
126 <xsl:param name="generate.toc">
127 set toc
128 book toc
129 article toc
130 chapter toc
131 qandadiv toc
132 qandaset toc
133 sect1 nop
134 sect2 nop
135 sect3 nop
136 sect4 nop
137 sect5 nop
138 section toc
139 part toc
140 </xsl:param>
142 <!-- Limit TOC depth to 1 level -->
143 <xsl:param name="toc.section.depth">1</xsl:param>
145 <!--
146 <xsl:template name="nongraphical.admonition">
147 <div class="{name(.)}">
148 <h2 class="title">
149 <xsl:call-template name="anchor"/>
150 <xsl:if test="$admon.textlabel != 0 or title">
151 <xsl:apply-templates select="." mode="object.title.markup"/>
152 </xsl:if>
153 </h2>
154 <xsl:apply-templates/>
155 </div>
156 </xsl:template>
158 </xsl:stylesheet>