1
<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
3
This program is free software; you can redistribute it and/or modify it under
4
the terms of the GNU Lesser General Public License as published by the Free
5
Software Foundation; either version 2 of the License, or (at your option) any
8
This program is distributed in the hope that it will be useful, but WITHOUT
9
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13
You should have received a copy of the GNU Lesser General Public License
14
along with this program; see the file COPYING.LGPL. If not, write to the
15
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
20
xmlns:doc="http://www.gnome.org/~shaunm/xsldoc"
21
xmlns="http://www.w3.org/1999/xhtml"
22
exclude-result-prefixes="doc"
25
<doc:title>Bibliographies</doc:title>
28
<!-- == db2html.bibliography.css =============================================== -->
30
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
31
<name>db2html.bibliography.css</name>
33
Create CSS for the bibliography elements
37
<xsl:template name="db2html.bibliography.css">
39
* + div[class~="biblioentry"] { margin-top: 1.2em; }
40
* + div[class~="bibliomixed"] { margin-top: 1.2em; }
45
<!-- = bibliography = -->
46
<xsl:template match="bibliography">
47
<xsl:param name="depth_in_chunk">
48
<xsl:call-template name="db.chunk.depth-in-chunk"/>
50
<xsl:param name="depth_of_chunk">
51
<xsl:call-template name="db.chunk.depth-of-chunk"/>
54
<xsl:call-template name="db2html.division.div">
55
<xsl:with-param name="divisions" select="bibliodiv"/>
56
<xsl:with-param name="title_content">
57
<xsl:if test="not(title) and not(bibliographyinfo/title)">
58
<xsl:call-template name="l10n.gettext">
59
<xsl:with-param name="msgid" select="'Bibliography'"/>
63
<xsl:with-param name="info" select="glossaryinfo"/>
64
<xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
65
<xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
66
<xsl:with-param name="chunk_divisions" select="false()"/>
70
<!-- = bibliodiv = -->
71
<xsl:template match="bibliodiv">
72
<xsl:param name="depth_in_chunk">
73
<xsl:call-template name="db.chunk.depth-in-chunk"/>
75
<xsl:param name="depth_of_chunk">
76
<xsl:call-template name="db.chunk.depth-of-chunk"/>
78
<xsl:call-template name="db2html.division.div">
79
<xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
80
<xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
84
<!-- = bibliomixed = -->
85
<xsl:template match="bibliomixed">
86
<div class="bibliomixed block-indent">
87
<xsl:call-template name="db2html.anchor"/>
89
<xsl:when test="*[1]/self::abbrev">
90
<xsl:call-template name="db.label">
91
<xsl:with-param name="node" select="."/>
93
<xsl:text> </xsl:text>
94
<xsl:apply-templates select="abbrev[1]/following-sibling::*"/>
97
<xsl:if test="@xreflabel | @id">
98
<xsl:call-template name="db.label">
99
<xsl:with-param name="node" select="."/>
101
<xsl:text> </xsl:text>
103
<xsl:apply-templates/>
109
<!-- = bibliomset = -->
110
<xsl:template match="bibliomset">
111
<xsl:call-template name="db2html.block"/>
114
<!-- = bibliomisc = -->
115
<xsl:template match="bibliomisc">
116
<xsl:call-template name="db2html.inline"/>
121
Cooked bibliography entries allow certain otherwise block-level
122
elemets to be inline elements, so we special-case them here.
125
<!-- = biblio*/abstract = -->
126
<xsl:template match="bibliomixed/abstract | bibliomset/abstract">
127
<xsl:call-template name="db2html.inline"/>
130
<!-- = biblio*/address = -->
131
<xsl:template match="bibliomixed/address | bibliomset/address">
132
<xsl:call-template name="db2html.inline"/>
135
<!-- = biblio*/affiliation = -->
136
<xsl:template match="bibliomixed/affiliation | bibliomset/affiliation">
137
<xsl:call-template name="db2html.inline"/>
140
<!-- = biblio*/author = -->
141
<xsl:template match="bibliomixed/author | bibliomset/author">
142
<xsl:call-template name="db2html.inline"/>
145
<!-- = biblio*/authorblurb = -->
146
<xsl:template match="bibliomixed/authorblurb | bibliomset/authorblurb">
147
<xsl:call-template name="db2html.inline"/>
150
<!-- = biblio*/authorgroup = -->
151
<xsl:template match="bibliomixed/authorgroup | bibliomset/authorgroup">
152
<xsl:call-template name="db2html.inline"/>
155
<!-- = biblio*/personblurb = -->
156
<xsl:template match="bibliomixed/personblurb | bibliomset/personblurb">
157
<xsl:call-template name="db2html.inline"/>
160
<!-- = biblio*/shortaffil = -->
161
<xsl:template match="bibliomixed/shortaffil | bibliomset/shortaffil">
162
<xsl:call-template name="db2html.inline"/>
165
<!-- = biblio*/title = -->
166
<xsl:template match="bibliomixed/title | bibliomset/title">
167
<xsl:call-template name="db2html.inline">
168
<xsl:with-param name="italic" select="true()"/>
174
<xsl:template match="refname">
175
<xsl:call-template name="db2html.inline"/>
179
<!-- = refnamediv = -->
181
<xsl:template match="refnamediv">
182
<div class="refnamediv">
183
<xsl:call-template name="db2html.anchor"/>
184
<xsl:for-each select="refname">
185
<xsl:if test="position() != 1">
186
<xsl:text>, </xsl:text>
188
<xsl:apply-templates select="."/>
190
<xsl:text> — </xsl:text>
191
<xsl:apply-templates select="refpurpose"/>
196
<!-- = refsection = -->
198
<xsl:template match="refsection">
199
<xsl:param name="depth_in_chunk">
200
<xsl:call-template name="db.chunk.depth-in-chunk"/>
202
<xsl:param name="depth_of_chunk">
203
<xsl:call-template name="db.chunk.depth-of-chunk"/>
205
<xsl:call-template name="db2html.division.div">
206
<xsl:with-param name="divisions" select="refsection"/>
207
<xsl:with-param name="info" select="refsectioninfo"/>
208
<xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
209
<xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
210
<xsl:with-param name="chunk_divisions" select="false()"/>
215
<!-- = refsynopsisdiv = -->
217
<xsl:template match="refsynopsisdiv">
218
<xsl:param name="depth_in_chunk">
219
<xsl:call-template name="db.chunk.depth-in-chunk"/>
221
<xsl:param name="depth_of_chunk">
222
<xsl:call-template name="db.chunk.depth-of-chunk"/>
224
<div class="refsynopsisdiv">
225
<xsl:call-template name="db2html.anchor"/>
226
<xsl:if test="not(title)">
227
<xsl:call-template name="db2html.title.header">
228
<xsl:with-param name="node" select="."/>
229
<xsl:with-param name="referent" select="."/>
230
<xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/>
231
<xsl:with-param name="referent_depth_in_chunk" select="$depth_in_chunk"/>
232
<xsl:with-param name="generate_label" select="false()"/>
233
<xsl:with-param name="title_content">
234
<xsl:call-template name="l10n.gettext">
235
<xsl:with-param name="msgid" select="'Synopsis'"/>
240
<xsl:apply-templates>
241
<xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/>
242
</xsl:apply-templates>
249
<xsl:template match="refsect1/title | refsect2/title |
250
refsect3/title | refsection/title ">
251
<xsl:param name="referent" select=".."/>
252
<xsl:param name="depth_in_chunk">
253
<xsl:call-template name="db.chunk.depth-in-chunk"/>
255
<xsl:param name="referent_depth_in_chunk">
257
<xsl:when test="$referent = .">
258
<xsl:value-of select="$depth_in_chunk"/>
260
<xsl:when test="ancestor::* = $referent">
261
<xsl:value-of select="$depth_in_chunk -
262
(count(ancestor::*) - count($referent/ancestor::*)) "/>
265
<xsl:call-template name="db.chunk.depth-in-chunk">
266
<xsl:with-param name="node" select="$referent"/>
271
<xsl:param name="depth_of_chunk">
272
<xsl:call-template name="db.chunk.depth-of-chunk"/>
274
<xsl:call-template name="db2html.title.header">
275
<xsl:with-param name="referent" select="$referent"/>
276
<xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
277
<xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
278
<xsl:with-param name="generate_label" select="false()"/>