1 <?xml version="1.0" encoding="US-ASCII"?>
2 <!--This file was created automatically by html2xhtml-->
3 <!--from the HTML stylesheets. Do not edit this file.-->
4 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
6 <!-- ********************************************************************
8 ********************************************************************
10 This file is part of the XSL DocBook Stylesheet distribution.
11 See ../README or http://nwalsh.com/docbook/xsl/ for copyright
12 and other information.
14 ******************************************************************** -->
16 <!-- ==================================================================== -->
18 <xsl:template match="reference">
19 <div class="{name(.)}">
20 <xsl:call-template name="language.attribute"/>
21 <xsl:if test="$generate.id.attributes != 0">
22 <xsl:attribute name="id">
23 <xsl:call-template name="object.id"/>
27 <xsl:call-template name="reference.titlepage"/>
29 <xsl:variable name="toc.params">
30 <xsl:call-template name="find.path.params">
31 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
35 <xsl:if test="not(partintro) and contains($toc.params, 'toc')">
36 <xsl:call-template name="division.toc"/>
38 <xsl:apply-templates/>
42 <xsl:template match="reference" mode="division.number">
43 <xsl:number from="book" count="reference" format="I."/>
46 <xsl:template match="reference/docinfo"/>
47 <xsl:template match="reference/referenceinfo"/>
48 <xsl:template match="reference/title"/>
49 <xsl:template match="reference/subtitle"/>
50 <xsl:template match="reference/titleabbrev"/>
52 <!-- ==================================================================== -->
54 <xsl:template name="refentry.title">
55 <xsl:param name="node" select="."/>
56 <xsl:variable name="refmeta" select="$node//refmeta"/>
57 <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/>
58 <xsl:variable name="refnamediv" select="$node//refnamediv"/>
59 <xsl:variable name="refname" select="$refnamediv//refname"/>
60 <xsl:variable name="refdesc" select="$refnamediv//refdescriptor"/>
61 <xsl:variable name="title">
63 <xsl:when test="$refentrytitle">
64 <xsl:apply-templates select="$refentrytitle[1]" mode="title"/>
66 <xsl:when test="$refdesc">
67 <xsl:apply-templates select="$refdesc[1]" mode="title"/>
69 <xsl:when test="$refname">
70 <xsl:apply-templates select="$refname[1]" mode="title"/>
77 <xsl:copy-of select="$title"/>
81 <xsl:template match="refentry">
82 <div class="{name(.)}">
83 <xsl:call-template name="language.attribute"/>
84 <xsl:if test="$refentry.separator != 0 and preceding-sibling::refentry">
85 <div class="refentry.separator">
89 <xsl:call-template name="anchor">
90 <xsl:with-param name="conditional" select="0"/>
92 <xsl:call-template name="refentry.titlepage"/>
93 <xsl:apply-templates/>
94 <xsl:call-template name="process.footnotes"/>
98 <xsl:template match="refentry/docinfo|refentry/refentryinfo"/>
100 <xsl:template match="refentrytitle|refname|refdescriptor" mode="title">
101 <xsl:apply-templates/>
104 <xsl:template match="refmeta">
107 <xsl:template match="manvolnum">
108 <xsl:if test="$refentry.xref.manvolnum != 0">
109 <xsl:text>(</xsl:text>
110 <xsl:apply-templates/>
111 <xsl:text>)</xsl:text>
115 <xsl:template match="refmiscinfo">
118 <xsl:template match="refentrytitle">
119 <xsl:call-template name="inline.charseq"/>
122 <xsl:template match="refnamediv">
123 <div class="{name(.)}">
124 <xsl:call-template name="anchor"/>
127 <xsl:when test="preceding-sibling::refnamediv">
128 <!-- no title on secondary refnamedivs! -->
130 <xsl:when test="$refentry.generate.name != 0">
132 <xsl:call-template name="gentext">
133 <xsl:with-param name="key" select="'RefName'"/>
137 <xsl:when test="$refentry.generate.title != 0">
140 <xsl:when test="../refmeta/refentrytitle">
141 <xsl:apply-templates select="../refmeta/refentrytitle"/>
144 <xsl:apply-templates select="refname[1]"/>
152 <xsl:apply-templates/>
157 <xsl:template match="refname">
158 <xsl:if test="not(preceding-sibling::refdescriptor)">
159 <xsl:apply-templates/>
160 <xsl:if test="following-sibling::refname">
161 <xsl:text>, </xsl:text>
166 <xsl:template match="refpurpose">
167 <xsl:text> </xsl:text>
168 <xsl:call-template name="dingbat">
169 <xsl:with-param name="dingbat">em-dash</xsl:with-param>
171 <xsl:text> </xsl:text>
172 <xsl:apply-templates/>
175 <xsl:template match="refdescriptor">
176 <xsl:apply-templates/>
179 <xsl:template match="refclass">
182 <xsl:if test="@role">
183 <xsl:value-of select="@role"/>
184 <xsl:text>: </xsl:text>
186 <xsl:apply-templates/>
191 <xsl:template match="refsynopsisdiv">
192 <div class="{name(.)}">
193 <xsl:call-template name="anchor"/>
196 <xsl:when test="refsynopsisdiv/title|title">
197 <xsl:apply-templates select="(refsynopsisdiv/title|title)[1]" mode="titlepage.mode"/>
200 <xsl:call-template name="gentext">
201 <xsl:with-param name="key" select="'RefSynopsisDiv'"/>
206 <xsl:apply-templates/>
210 <xsl:template match="refsynopsisdivinfo"/>
212 <xsl:template match="refsynopsisdiv/title">
215 <xsl:template match="refsynopsisdiv/title" mode="titlepage.mode">
216 <xsl:apply-templates/>
219 <xsl:template match="refsection|refsect1|refsect2|refsect3">
220 <div class="{name(.)}">
221 <xsl:call-template name="language.attribute"/>
222 <xsl:call-template name="anchor">
223 <xsl:with-param name="conditional" select="0"/>
225 <xsl:apply-templates/>
229 <xsl:template match="refsection/title">
230 <!-- the ID is output in the block.object call for refsect1 -->
231 <xsl:variable name="level" select="count(ancestor-or-self::refsection)"/>
232 <xsl:variable name="refsynopsisdiv">
233 <xsl:text>0</xsl:text>
234 <xsl:if test="ancestor::refsynopsisdiv">1</xsl:if>
236 <xsl:variable name="hlevel">
238 <xsl:when test="$level+$refsynopsisdiv > 5">6</xsl:when>
240 <xsl:value-of select="$level+1+$refsynopsisdiv"/>
244 <xsl:element name="h{$hlevel}" namespace="http://www.w3.org/1999/xhtml">
245 <xsl:apply-templates/>
249 <xsl:template match="refsect1/title">
250 <!-- the ID is output in the block.object call for refsect1 -->
252 <xsl:apply-templates/>
256 <xsl:template match="refsect2/title">
257 <!-- the ID is output in the block.object call for refsect2 -->
259 <xsl:apply-templates/>
263 <xsl:template match="refsect3/title">
264 <!-- the ID is output in the block.object call for refsect3 -->
266 <xsl:apply-templates/>
270 <xsl:template match="refsect1info"/>
271 <xsl:template match="refsect2info"/>
272 <xsl:template match="refsect3info"/>
274 <!-- ==================================================================== -->