1 <?xml version="1.0" encoding="ASCII"?><!--This file was created automatically by html2xhtml--><!--from the HTML stylesheets.--><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="d" version="1.0">
3 <!-- ********************************************************************
5 This file is part of the XSL DocBook Stylesheet distribution.
6 See ../README or http://cdn.docbook.org/release/xsl/current/ for
7 copyright and other information.
9 ******************************************************************** -->
11 <!-- ==================================================================== -->
13 <xsl:template match="d:reference">
14 <xsl:call-template name="id.warning"/>
17 <xsl:call-template name="common.html.attributes">
18 <xsl:with-param name="inherit" select="1"/>
20 <xsl:call-template name="id.attribute">
21 <xsl:with-param name="conditional" select="0"/>
24 <xsl:call-template name="reference.titlepage"/>
26 <xsl:variable name="toc.params">
27 <xsl:call-template name="find.path.params">
28 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
32 <xsl:if test="not(d:partintro) and contains($toc.params, 'toc')">
33 <xsl:call-template name="division.toc"/>
35 <xsl:apply-templates/>
39 <xsl:template match="d:reference" mode="division.number">
40 <xsl:number from="d:book" count="d:reference" format="I."/>
43 <xsl:template match="d:reference/d:docinfo"/>
44 <xsl:template match="d:reference/d:referenceinfo"/>
45 <xsl:template match="d:reference/d:title"/>
46 <xsl:template match="d:reference/d:subtitle"/>
47 <xsl:template match="d:reference/d:titleabbrev"/>
49 <!-- ==================================================================== -->
51 <xsl:template name="refentry.title">
52 <xsl:param name="node" select="."/>
53 <xsl:variable name="refmeta" select="$node//d:refmeta"/>
54 <xsl:variable name="refentrytitle" select="$refmeta//d:refentrytitle"/>
55 <xsl:variable name="refnamediv" select="$node//d:refnamediv"/>
56 <xsl:variable name="refname" select="$refnamediv//d:refname"/>
57 <xsl:variable name="refdesc" select="$refnamediv//d:refdescriptor"/>
58 <xsl:variable name="title">
60 <xsl:when test="$refentrytitle">
61 <xsl:apply-templates select="$refentrytitle[1]" mode="title"/>
63 <xsl:when test="$refdesc">
64 <xsl:apply-templates select="$refdesc[1]" mode="title"/>
66 <xsl:when test="$refname">
67 <xsl:apply-templates select="$refname[1]" mode="title"/>
74 <xsl:copy-of select="$title"/>
78 <xsl:template match="d:refentry">
79 <xsl:call-template name="id.warning"/>
82 <xsl:call-template name="common.html.attributes">
83 <xsl:with-param name="inherit" select="1"/>
85 <xsl:call-template name="id.attribute">
86 <xsl:with-param name="conditional" select="0"/>
88 <xsl:if test="$refentry.separator != 0 and preceding-sibling::d:refentry">
89 <div class="refentry.separator">
93 <xsl:call-template name="anchor">
94 <xsl:with-param name="conditional" select="0"/>
96 <xsl:call-template name="refentry.titlepage"/>
97 <xsl:apply-templates/>
98 <xsl:call-template name="process.footnotes"/>
102 <xsl:template match="d:refentry/d:docinfo|d:refentry/d:refentryinfo"/>
103 <xsl:template match="d:refentry/d:info"/>
105 <xsl:template match="d:refentrytitle|d:refname|d:refdescriptor" mode="title">
106 <xsl:apply-templates/>
109 <xsl:template match="d:refmeta">
112 <xsl:template match="d:manvolnum">
113 <xsl:if test="$refentry.xref.manvolnum != 0">
114 <xsl:text>(</xsl:text>
115 <xsl:apply-templates/>
116 <xsl:text>)</xsl:text>
120 <xsl:template match="d:refmiscinfo">
123 <xsl:template match="d:refentrytitle">
124 <xsl:call-template name="inline.charseq"/>
127 <xsl:template match="d:refnamediv">
129 <xsl:call-template name="common.html.attributes">
130 <xsl:with-param name="inherit" select="1"/>
132 <xsl:call-template name="id.attribute"/>
133 <xsl:call-template name="anchor"/>
136 <xsl:when test="preceding-sibling::d:refnamediv">
137 <!-- no title on secondary refnamedivs! -->
139 <xsl:when test="$refentry.generate.name != 0">
141 <xsl:call-template name="gentext">
142 <xsl:with-param name="key" select="'RefName'"/>
146 <xsl:when test="$refentry.generate.title != 0">
149 <xsl:when test="../d:refmeta/d:refentrytitle">
150 <xsl:apply-templates select="../d:refmeta/d:refentrytitle"/>
153 <xsl:apply-templates select="d:refname[1]"/>
161 <xsl:apply-templates/>
166 <xsl:template match="d:refname">
167 <xsl:if test="not(preceding-sibling::d:refdescriptor)">
168 <xsl:apply-templates/>
169 <xsl:if test="following-sibling::d:refname">
170 <xsl:text>, </xsl:text>
175 <xsl:template match="d:refpurpose">
176 <xsl:if test="node()">
177 <xsl:text> </xsl:text>
178 <xsl:call-template name="dingbat">
179 <xsl:with-param name="dingbat">em-dash</xsl:with-param>
181 <xsl:text> </xsl:text>
182 <xsl:apply-templates/>
186 <!-- This handles repurpose in TOC line to turn off any nested links -->
187 <xsl:template match="d:refpurpose" mode="no.anchor.mode">
188 <xsl:if test="node()">
189 <xsl:text> </xsl:text>
190 <xsl:call-template name="dingbat">
191 <xsl:with-param name="dingbat">em-dash</xsl:with-param>
193 <xsl:text> </xsl:text>
194 <xsl:apply-templates mode="no.anchor.mode"/>
198 <xsl:template match="d:refdescriptor">
199 <xsl:apply-templates/>
202 <xsl:template match="d:refclass">
203 <xsl:if test="$refclass.suppress = 0">
205 <xsl:if test="@role">
206 <xsl:value-of select="@role"/>
207 <xsl:text>: </xsl:text>
209 <xsl:apply-templates/>
214 <xsl:template match="d:refsynopsisdiv">
216 <xsl:call-template name="common.html.attributes">
217 <xsl:with-param name="inherit" select="1"/>
219 <xsl:call-template name="id.attribute"/>
220 <xsl:call-template name="anchor"/>
223 <xsl:when test="d:refsynopsisdiv/d:title|d:title">
224 <xsl:apply-templates select="(d:refsynopsisdiv/d:title|d:title)[1]" mode="titlepage.mode"/>
227 <xsl:call-template name="gentext">
228 <xsl:with-param name="key" select="'RefSynopsisDiv'"/>
233 <xsl:apply-templates/>
237 <xsl:template match="d:refsynopsisdivinfo"/>
239 <xsl:template match="d:refsynopsisdiv/d:title">
242 <xsl:template match="d:refsynopsisdiv/d:title" mode="titlepage.mode">
243 <xsl:apply-templates/>
246 <xsl:template match="d:refsection|d:refsect1|d:refsect2|d:refsect3">
248 <xsl:call-template name="common.html.attributes">
249 <xsl:with-param name="inherit" select="1"/>
251 <xsl:call-template name="id.attribute">
252 <xsl:with-param name="conditional" select="0"/>
254 <xsl:call-template name="anchor">
255 <xsl:with-param name="conditional" select="0"/>
257 <!-- pick up info title -->
258 <xsl:apply-templates select="(d:title|d:info/d:title)[1]"/>
259 <xsl:apply-templates select="node()[not(self::d:title) and not(self::d:info)]"/>
263 <xsl:template match="d:refsection/d:title|d:refsection/d:info/d:title">
264 <!-- the ID is output in the block.object call for refsect1 -->
265 <xsl:variable name="level" select="count(ancestor-or-self::d:refsection)"/>
266 <xsl:variable name="refsynopsisdiv">
267 <xsl:text>0</xsl:text>
268 <xsl:if test="ancestor::d:refsynopsisdiv">1</xsl:if>
270 <xsl:variable name="hlevel">
272 <xsl:when test="$level+$refsynopsisdiv > 5">6</xsl:when>
274 <xsl:value-of select="$level+1+$refsynopsisdiv"/>
278 <xsl:element name="h{$hlevel}" namespace="http://www.w3.org/1999/xhtml">
279 <xsl:apply-templates/>
283 <xsl:template match="d:refsect1/d:title|d:refsect1/d:info/d:title">
284 <!-- the ID is output in the block.object call for refsect1 -->
286 <xsl:apply-templates/>
290 <xsl:template match="d:refsect2/d:title|d:refsect2/d:info/d:title">
291 <!-- the ID is output in the block.object call for refsect2 -->
293 <xsl:apply-templates/>
297 <xsl:template match="d:refsect3/d:title|d:refsect3/d:info/d:title">
298 <!-- the ID is output in the block.object call for refsect3 -->
300 <xsl:apply-templates/>
304 <xsl:template match="d:refsectioninfo|d:refsection/d:info"/>
305 <xsl:template match="d:refsect1info|d:refsect1/d:info"/>
306 <xsl:template match="d:refsect2info|d:refsect2/d:info"/>
307 <xsl:template match="d:refsect3info|d:refsect3/d:info"/>
310 <!-- ==================================================================== -->