~ubuntu-branches/ubuntu/utopic/yelp-xsl/utopic

« back to all changes in this revision

Viewing changes to xslt/docbook/html/db2html-bibliography.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2010-11-29 10:00:13 UTC
  • Revision ID: james.westby@ubuntu.com-20101129100013-1fxze8fm1fegxl8w
Tags: upstream-2.31.6
ImportĀ upstreamĀ versionĀ 2.31.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
 
2
<!--
 
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
 
6
later version.
 
7
 
 
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
 
11
details.
 
12
 
 
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
 
16
02111-1307, USA.
 
17
-->
 
18
 
 
19
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 
20
                                                                xmlns:msg="http://projects.gnome.org/yelp/gettext/"
 
21
                xmlns:set="http://exslt.org/sets"
 
22
                xmlns:db="http://docbook.org/ns/docbook"
 
23
                xmlns="http://www.w3.org/1999/xhtml"
 
24
                exclude-result-prefixes="db msg set"
 
25
                version="1.0">
 
26
 
 
27
<!--!!==========================================================================
 
28
DocBook to HTML - Bibliographies
 
29
:Requires: db-chunk db-common db2html-block db2html-inline db2html-division db2html-xref gettext
 
30
 
 
31
This module provides templates to process DocBook bibliograpies.
 
32
-->
 
33
 
 
34
 
 
35
<!--** =========================================================================
 
36
db2html.biblioentry.label
 
37
Outputs the label for a bibliography entry
 
38
$node: The #{biblioentry} or #{bibliomixed} element to generate a label for
 
39
 
 
40
This outputs a label to be placed inline at the beginning of a bibliography
 
41
entry.  Labels are created for both #{biblioentry} and #{bibliomixed} elements.
 
42
The label is typically an abbreviation of the authors' names an the year of
 
43
publication.  In DocBook, it is usually provides with a leading #{abbrev}
 
44
element.  Without a leading #{abbrev} element, this template will instead
 
45
use the #{xreflabel} or #{id} attribute.
 
46
-->
 
47
<xsl:template name="db2html.biblioentry.label">
 
48
  <xsl:param name="node" select="."/>
 
49
  <xsl:if test="$node/*[1]/self::abbrev or $node/@xreflabel or $node/@id or
 
50
                $node/*[1]/self::db:abbrev or $node/@xml:id">
 
51
    <span class="bibliolabel">
 
52
      <xsl:call-template name="l10n.gettext">
 
53
        <xsl:with-param name="msgid" select="'bibliolabel.format'"/>
 
54
        <xsl:with-param name="node" select="."/>
 
55
        <xsl:with-param name="format" select="true()"/>
 
56
      </xsl:call-template>
 
57
    </span>
 
58
    <xsl:text> </xsl:text>
 
59
  </xsl:if>
 
60
</xsl:template>
 
61
 
 
62
<!--#% l10n.format.mode -->
 
63
<xsl:template mode="l10n.format.mode" match="msg:bibliolabel">
 
64
  <xsl:param name="node"/>
 
65
  <xsl:choose>
 
66
    <xsl:when test="$node/*[1]/self::abbrev">
 
67
      <xsl:apply-templates select="$node/abbrev[1]"/>
 
68
    </xsl:when>
 
69
    <xsl:when test="$node/*[1]/self::db:abbrev">
 
70
      <xsl:apply-templates select="$node/db:abbrev[1]"/>
 
71
    </xsl:when>
 
72
    <xsl:when test="$node/@xreflabel">
 
73
      <xsl:value-of select="$node/@xreflabel"/>
 
74
    </xsl:when>
 
75
    <xsl:when test="$node/@id">
 
76
      <xsl:value-of select="$node/@id"/>
 
77
    </xsl:when>
 
78
    <xsl:when test="$node/@xml:id">
 
79
      <xsl:value-of select="$node/@xml:id"/>
 
80
    </xsl:when>
 
81
  </xsl:choose>
 
82
</xsl:template>
 
83
 
 
84
 
 
85
<!--%%==========================================================================
 
86
db2html.biblioentry.mode
 
87
Formats elements inside a #{biblioentry} element
 
88
 
 
89
This mode is used when processing the child elements of a #{biblioentry}
 
90
element.  Many elements are treated differently when they appear inside
 
91
a bibliography entry.
 
92
-->
 
93
<xsl:template mode="db2html.biblioentry.mode" match="*">
 
94
  <xsl:apply-templates select="."/>
 
95
</xsl:template>
 
96
 
 
97
<!-- = abstract % db2html.biblioentry.mode = -->
 
98
<xsl:template mode="db2html.biblioentry.mode" match="abstract | db:abstract"/>
 
99
 
 
100
<!-- = address % db2html.biblioentry.mode = -->
 
101
<xsl:template mode="db2html.biblioentry.mode" match="address | db:address">
 
102
  <xsl:call-template name="db2html.inline"/>
 
103
  <xsl:text>. </xsl:text>
 
104
</xsl:template>
 
105
 
 
106
<!-- = affiliation % db2html.biblioentry.mode = -->
 
107
<xsl:template mode="db2html.biblioentry.mode" match="affiliation |
 
108
                                                     db:affiliation">
 
109
  <xsl:call-template name="db2html.inline"/>
 
110
  <xsl:text>. </xsl:text>
 
111
</xsl:template>
 
112
 
 
113
<!-- = artheader % db2html.biblioentry.mode = -->
 
114
<xsl:template mode="db2html.biblioentry.mode" match="artheader">
 
115
  <xsl:call-template name="db2html.inline"/>
 
116
  <xsl:text>. </xsl:text>
 
117
</xsl:template>
 
118
 
 
119
<!-- = articleinfo % db2html.biblioentry.mode = -->
 
120
<xsl:template mode="db2html.biblioentry.mode" match="articleinfo |
 
121
                                                     db:article/db:info">
 
122
  <xsl:call-template name="db2html.inline"/>
 
123
  <xsl:text>. </xsl:text>
 
124
</xsl:template>
 
125
 
 
126
<!-- = author % db2html.biblioentry.mode = -->
 
127
<xsl:template mode="db2html.biblioentry.mode" match="author | db:author">
 
128
  <xsl:call-template name="db.personname"/>
 
129
  <xsl:text>. </xsl:text>
 
130
</xsl:template>
 
131
 
 
132
<!-- = authorblurb % db2html.biblioentry.mode = -->
 
133
<xsl:template mode="db2html.biblioentry.mode" match="authorblurb"/>
 
134
 
 
135
<!-- = authorgroup % db2html.biblioentry.mode = -->
 
136
<xsl:template mode="db2html.biblioentry.mode" match="authorgroup |
 
137
                                                     db:authorgroup">
 
138
  <xsl:call-template name="db.personname.list">
 
139
    <xsl:with-param name="nodes" select="*"/>
 
140
  </xsl:call-template>
 
141
  <xsl:text>. </xsl:text>
 
142
</xsl:template>
 
143
 
 
144
<!-- = authorinitials % db2html.biblioentry.mode = -->
 
145
<xsl:template mode="db2html.biblioentry.mode" match="authorinitials |
 
146
                                                     db:authorinitials">
 
147
  <xsl:call-template name="db2html.inline"/>
 
148
  <xsl:text>. </xsl:text>
 
149
</xsl:template>
 
150
 
 
151
<!-- = bibliocoverage % db2html.biblioentry.mode = -->
 
152
<xsl:template mode="db2html.biblioentry.mode" match="bibliocoverage |
 
153
                                                     db:bibliocoverage">
 
154
  <xsl:call-template name="db2html.inline"/>
 
155
  <xsl:text>. </xsl:text>
 
156
</xsl:template>
 
157
 
 
158
<!-- = biblioid % db2html.biblioentry.mode = -->
 
159
<xsl:template mode="db2html.biblioentry.mode" match="biblioid | db:biblioid">
 
160
  <xsl:call-template name="db2html.inline"/>
 
161
  <xsl:text>. </xsl:text>
 
162
</xsl:template>
 
163
 
 
164
<!-- = bibliomisc % db2html.biblioentry.mode = -->
 
165
<xsl:template mode="db2html.biblioentry.mode" match="bibliomisc |
 
166
                                                     db:bibliomisc">
 
167
  <xsl:call-template name="db2html.inline"/>
 
168
  <xsl:text>. </xsl:text>
 
169
</xsl:template>
 
170
 
 
171
<!-- = bibliorelation % db2html.biblioentry.mode = -->
 
172
<xsl:template mode="db2html.biblioentry.mode" match="bibliorelation |
 
173
                                                     db:bibliorelation">
 
174
  <xsl:call-template name="db2html.inline"/>
 
175
  <xsl:text>. </xsl:text>
 
176
</xsl:template>
 
177
 
 
178
<!-- = biblioset % db2html.biblioentry.mode = -->
 
179
<xsl:template mode="db2html.biblioentry.mode" match="biblioset | db:biblioset">
 
180
  <xsl:apply-templates mode="db2html.biblioentry.mode"/>
 
181
</xsl:template>
 
182
 
 
183
<!-- = bibliosource % db2html.biblioentry.mode = -->
 
184
<xsl:template mode="db2html.biblioentry.mode" match="bibliosource |
 
185
                                                     db:bibliosource">
 
186
  <xsl:call-template name="db2html.inline"/>
 
187
  <xsl:text>. </xsl:text>
 
188
</xsl:template>
 
189
 
 
190
<!-- = citetitle % db2html.biblioentry.mode = -->
 
191
<xsl:template mode="db2html.biblioentry.mode" match="citetitle | db:citetitle">
 
192
  <xsl:call-template name="db2html.inline">
 
193
    <xsl:with-param name="class" select="'bibliotitle'"/>
 
194
  </xsl:call-template>
 
195
  <xsl:text>. </xsl:text>
 
196
</xsl:template>
 
197
 
 
198
<!-- = collab % db2html.biblioentry.mode = -->
 
199
<xsl:template mode="db2html.biblioentry.mode" match="collab | db:collab">
 
200
  <xsl:call-template name="db2html.inline"/>
 
201
  <xsl:text>. </xsl:text>
 
202
</xsl:template>
 
203
 
 
204
<!-- = collabname % db2html.biblioentry.mode = -->
 
205
<xsl:template mode="db2html.biblioentry.mode" match="collabname">
 
206
  <xsl:call-template name="db2html.inline"/>
 
207
  <xsl:text>. </xsl:text>
 
208
</xsl:template>
 
209
 
 
210
<!-- = confgroup % db2html.biblioentry.mode = -->
 
211
<xsl:template mode="db2html.biblioentry.mode" match="confgroup | db:confgroup">
 
212
  <xsl:call-template name="db2html.inline"/>
 
213
  <xsl:text>. </xsl:text>
 
214
</xsl:template>
 
215
 
 
216
<!-- = confdates % db2html.biblioentry.mode = -->
 
217
<xsl:template mode="db2html.biblioentry.mode" match="confdates | db:confdates">
 
218
  <xsl:call-template name="db2html.inline"/>
 
219
  <xsl:text>. </xsl:text>
 
220
</xsl:template>
 
221
 
 
222
<!-- = conftitle % db2html.biblioentry.mode = -->
 
223
<xsl:template mode="db2html.biblioentry.mode" match="conftitle | db:conftitle">
 
224
  <xsl:call-template name="db2html.inline"/>
 
225
  <xsl:text>. </xsl:text>
 
226
</xsl:template>
 
227
 
 
228
<!-- = confnum % db2html.biblioentry.mode = -->
 
229
<xsl:template mode="db2html.biblioentry.mode" match="confnum | db:confnum">
 
230
  <xsl:call-template name="db2html.inline"/>
 
231
  <xsl:text>. </xsl:text>
 
232
</xsl:template>
 
233
 
 
234
<!-- = confsponsor % db2html.biblioentry.mode = -->
 
235
<xsl:template mode="db2html.biblioentry.mode" match="confsponsor |
 
236
                                                     db:confsponsor">
 
237
  <xsl:call-template name="db2html.inline"/>
 
238
  <xsl:text>. </xsl:text>
 
239
</xsl:template>
 
240
 
 
241
<!-- = contractnum % db2html.biblioentry.mode = -->
 
242
<xsl:template mode="db2html.biblioentry.mode" match="contractnum |
 
243
                                                     db:contractnum">
 
244
  <xsl:call-template name="db2html.inline"/>
 
245
  <xsl:text>. </xsl:text>
 
246
</xsl:template>
 
247
 
 
248
<!-- = contractsponsor % db2html.biblioentry.mode = -->
 
249
<xsl:template mode="db2html.biblioentry.mode" match="contractsponsor |
 
250
                                                     db:contractsponsor">
 
251
  <xsl:call-template name="db2html.inline"/>
 
252
  <xsl:text>. </xsl:text>
 
253
</xsl:template>
 
254
 
 
255
<!-- = contrib % db2html.biblioentry.mode = -->
 
256
<xsl:template mode="db2html.biblioentry.mode" match="contrib | db:contrib">
 
257
  <xsl:call-template name="db2html.inline"/>
 
258
  <xsl:text>. </xsl:text>
 
259
</xsl:template>
 
260
 
 
261
<!-- = corpauthor % db2html.biblioentry.mode = -->
 
262
<xsl:template mode="db2html.biblioentry.mode" match="corpauthor">
 
263
  <xsl:call-template name="db2html.inline"/>
 
264
  <xsl:text>. </xsl:text>
 
265
</xsl:template>
 
266
 
 
267
<!-- = corpcredit % db2html.biblioentry.mode = -->
 
268
<xsl:template mode="db2html.biblioentry.mode" match="corpcredit">
 
269
  <xsl:call-template name="db2html.inline"/>
 
270
  <xsl:text>. </xsl:text>
 
271
</xsl:template>
 
272
 
 
273
<!-- = corpname % db2html.biblioentry.mode = -->
 
274
<xsl:template mode="db2html.biblioentry.mode" match="corpname">
 
275
  <xsl:call-template name="db2html.inline"/>
 
276
  <xsl:text>. </xsl:text>
 
277
</xsl:template>
 
278
 
 
279
<!-- = copyright % db2html.biblioentry.mode = -->
 
280
<xsl:template mode="db2html.biblioentry.mode" match="copyright | db:copyright">
 
281
  <xsl:call-template name="db.copyright"/>
 
282
  <xsl:text>. </xsl:text>
 
283
</xsl:template>
 
284
 
 
285
<!-- = date % db2html.biblioentry.mode = -->
 
286
<xsl:template mode="db2html.biblioentry.mode" match="date | db:date">
 
287
  <xsl:call-template name="db.copyright"/>
 
288
  <xsl:text>. </xsl:text>
 
289
</xsl:template>
 
290
 
 
291
<!-- = edition % db2html.biblioentry.mode = -->
 
292
<xsl:template mode="db2html.biblioentry.mode" match="edition | db:edition">
 
293
  <xsl:call-template name="db.copyright"/>
 
294
  <xsl:text>. </xsl:text>
 
295
</xsl:template>
 
296
 
 
297
<!-- = editor % db2html.biblioentry.mode = -->
 
298
<xsl:template mode="db2html.biblioentry.mode" match="editor | db:editor">
 
299
  <xsl:call-template name="db.personname"/>
 
300
  <xsl:text>. </xsl:text>
 
301
</xsl:template>
 
302
 
 
303
<!-- = firstname % db2html.biblioentry.mode = -->
 
304
<xsl:template mode="db2html.biblioentry.mode" match="firstname | db:firstname">
 
305
  <xsl:call-template name="db2html.inline"/>
 
306
  <xsl:text>. </xsl:text>
 
307
</xsl:template>
 
308
 
 
309
<!-- = honorific % db2html.biblioentry.mode = -->
 
310
<xsl:template mode="db2html.biblioentry.mode" match="honorific | db:honorific">
 
311
  <xsl:call-template name="db2html.inline"/>
 
312
  <xsl:text>. </xsl:text>
 
313
</xsl:template>
 
314
 
 
315
<!-- = indexterm % db2html.biblioentry.mode = -->
 
316
<xsl:template mode="db2html.biblioentry.mode" match="indexterm | db:indexterm">
 
317
  <xsl:call-template name="db2html.inline"/>
 
318
  <xsl:text>. </xsl:text>
 
319
</xsl:template>
 
320
 
 
321
<!-- = invpartnumber % db2html.biblioentry.mode = -->
 
322
<xsl:template mode="db2html.biblioentry.mode" match="invpartnumber">
 
323
  <xsl:call-template name="db2html.inline"/>
 
324
  <xsl:text>. </xsl:text>
 
325
</xsl:template>
 
326
 
 
327
<!-- = isbn % db2html.biblioentry.mode = -->
 
328
<xsl:template mode="db2html.biblioentry.mode"
 
329
              match="isbn | db:biblioid[@class = 'isbn']">
 
330
  <xsl:call-template name="db2html.inline">
 
331
    <xsl:with-param name="name-class" select="'isbn'"/>
 
332
  </xsl:call-template>
 
333
  <xsl:text>. </xsl:text>
 
334
</xsl:template>
 
335
 
 
336
<!-- = issn % db2html.biblioentry.mode = -->
 
337
<xsl:template mode="db2html.biblioentry.mode"
 
338
              match="issn | db:biblioid[@class = 'issn']">
 
339
  <xsl:call-template name="db2html.inline">
 
340
    <xsl:with-param name="name-class" select="'issn'"/>
 
341
  </xsl:call-template>
 
342
  <xsl:text>. </xsl:text>
 
343
</xsl:template>
 
344
 
 
345
<!-- = issuenum % db2html.biblioentry.mode = -->
 
346
<xsl:template mode="db2html.biblioentry.mode" match="issuenum | db:issuenum">
 
347
  <xsl:call-template name="db2html.inline"/>
 
348
  <xsl:text>. </xsl:text>
 
349
</xsl:template>
 
350
 
 
351
<!-- = jobtitle % db2html.biblioentry.mode = -->
 
352
<xsl:template mode="db2html.biblioentry.mode" match="jobtitle | db:jobtitle">
 
353
  <xsl:call-template name="db2html.inline"/>
 
354
  <xsl:text>. </xsl:text>
 
355
</xsl:template>
 
356
 
 
357
<!-- = lineage % db2html.biblioentry.mode = -->
 
358
<xsl:template mode="db2html.biblioentry.mode" match="lineage | db:lineage">
 
359
  <xsl:call-template name="db2html.inline"/>
 
360
  <xsl:text>. </xsl:text>
 
361
</xsl:template>
 
362
 
 
363
<!-- = orgname % db2html.biblioentry.mode = -->
 
364
<xsl:template mode="db2html.biblioentry.mode" match="orgname | db:orgname">
 
365
  <xsl:call-template name="db2html.inline"/>
 
366
  <xsl:text>. </xsl:text>
 
367
</xsl:template>
 
368
 
 
369
<!-- = orgdiv % db2html.biblioentry.mode = -->
 
370
<xsl:template mode="db2html.biblioentry.mode" match="orgdiv | db:orgdiv">
 
371
  <xsl:call-template name="db2html.inline"/>
 
372
  <xsl:text>. </xsl:text>
 
373
</xsl:template>
 
374
 
 
375
<!-- = othercredit % db2html.biblioentry.mode = -->
 
376
<xsl:template mode="db2html.biblioentry.mode" match="othercredit |
 
377
                                                     db:othercredit">
 
378
  <xsl:call-template name="db2html.inline"/>
 
379
  <xsl:text>. </xsl:text>
 
380
</xsl:template>
 
381
 
 
382
<!-- = othername % db2html.biblioentry.mode = -->
 
383
<xsl:template mode="db2html.biblioentry.mode" match="othername | db:othername">
 
384
  <xsl:call-template name="db2html.inline"/>
 
385
  <xsl:text>. </xsl:text>
 
386
</xsl:template>
 
387
 
 
388
<!-- = pagenums % db2html.biblioentry.mode = -->
 
389
<xsl:template mode="db2html.biblioentry.mode" match="pagenums | db:pagenums">
 
390
  <xsl:call-template name="db2html.inline"/>
 
391
  <xsl:text>. </xsl:text>
 
392
</xsl:template>
 
393
 
 
394
<!-- = personblurb % db2html.biblioentry.mode = -->
 
395
<xsl:template mode="db2html.biblioentry.mode" match="personblurb |
 
396
                                                     db:personblurb"/>
 
397
 
 
398
<!-- = printhistory % db2html.biblioentry.mode = -->
 
399
<xsl:template mode="db2html.biblioentry.mode" match="printhistory |
 
400
                                                     db:printhistory"/>
 
401
 
 
402
<!-- = productname % db2html.biblioentry.mode = -->
 
403
<xsl:template mode="db2html.biblioentry.mode" match="productname |
 
404
                                                     db:productname">
 
405
  <xsl:call-template name="db2html.inline"/>
 
406
  <xsl:text>. </xsl:text>
 
407
</xsl:template>
 
408
 
 
409
<!-- = productnumber % db2html.biblioentry.mode = -->
 
410
<xsl:template mode="db2html.biblioentry.mode" match="productnumber |
 
411
                                                     db:productnumber">
 
412
  <xsl:call-template name="db2html.inline"/>
 
413
  <xsl:text>. </xsl:text>
 
414
</xsl:template>
 
415
 
 
416
<!-- = pubdate % db2html.biblioentry.mode = -->
 
417
<xsl:template mode="db2html.biblioentry.mode" match="pubdate | db:pubdate">
 
418
  <xsl:call-template name="db2html.inline"/>
 
419
  <xsl:text>. </xsl:text>
 
420
</xsl:template>
 
421
 
 
422
<!-- = publisher % db2html.biblioentry.mode = -->
 
423
<xsl:template mode="db2html.biblioentry.mode" match="publisher | db:publisher">
 
424
  <xsl:call-template name="db2html.inline"/>
 
425
</xsl:template>
 
426
 
 
427
<!-- = publishername % db2html.biblioentry.mode = -->
 
428
<xsl:template mode="db2html.biblioentry.mode" match="publishername |
 
429
                                                     db:publishername">
 
430
  <xsl:call-template name="db2html.inline"/>
 
431
  <xsl:text>. </xsl:text>
 
432
</xsl:template>
 
433
 
 
434
<!-- = pubsnumber % db2html.biblioentry.mode = -->
 
435
<xsl:template mode="db2html.biblioentry.mode"
 
436
              match="pubsnumber | db:biblioid[@class = 'pubsnumber']">
 
437
  <xsl:call-template name="db2html.inline">
 
438
    <xsl:with-param name="name-class" select="'pubsnumber'"/>
 
439
  </xsl:call-template>
 
440
  <xsl:text>. </xsl:text>
 
441
</xsl:template>
 
442
 
 
443
<!-- = releaseinfo % db2html.biblioentry.mode = -->
 
444
<xsl:template mode="db2html.biblioentry.mode" match="releaseinfo |
 
445
                                                     db:releaseinfo">
 
446
  <xsl:call-template name="db2html.inline"/>
 
447
  <xsl:text>. </xsl:text>
 
448
</xsl:template>
 
449
 
 
450
<!-- = revhistory % db2html.biblioentry.mode = -->
 
451
<xsl:template mode="db2html.biblioentry.mode" match="revhistory | db:revhistory"/>
 
452
 
 
453
<!-- = seriesvolnums % db2html.biblioentry.mode = -->
 
454
<xsl:template mode="db2html.biblioentry.mode" match="seriesvolnums |
 
455
                                                     db:seriesvolnums">
 
456
  <xsl:call-template name="db2html.inline"/>
 
457
  <xsl:text>. </xsl:text>
 
458
</xsl:template>
 
459
 
 
460
<!-- = shortaffil % db2html.biblioentry.mode = -->
 
461
<xsl:template mode="db2html.biblioentry.mode" match="shortaffil | db:shortaffil">
 
462
  <xsl:call-template name="db2html.inline"/>
 
463
  <xsl:text>. </xsl:text>
 
464
</xsl:template>
 
465
 
 
466
<!-- = subtitle % db2html.biblioentry.mode = -->
 
467
<xsl:template mode="db2html.biblioentry.mode" match="subtitle | db:subtitle">
 
468
  <xsl:call-template name="db2html.inline"/>
 
469
  <xsl:text>. </xsl:text>
 
470
</xsl:template>
 
471
 
 
472
<!-- = surname % db2html.biblioentry.mode = -->
 
473
<xsl:template mode="db2html.biblioentry.mode" match="surname | db:surname">
 
474
  <xsl:call-template name="db2html.inline"/>
 
475
  <xsl:text>. </xsl:text>
 
476
</xsl:template>
 
477
 
 
478
<!-- = title % db2html.biblioentry.mode = -->
 
479
<xsl:template mode="db2html.biblioentry.mode" match="title | db:title">
 
480
  <span class="bibliotitle">
 
481
    <xsl:call-template name="l10n.gettext">
 
482
      <xsl:with-param name="msgid" select="'citetitle.format'"/>
 
483
      <xsl:with-param name="role" select="../self::biblioset/@relation |
 
484
                                          ../self::db:biblioset/@relation"/>
 
485
      <xsl:with-param name="node" select="."/>
 
486
      <xsl:with-param name="format" select="true()"/>
 
487
    </xsl:call-template>
 
488
  </span>
 
489
  <xsl:text>. </xsl:text>
 
490
</xsl:template>
 
491
 
 
492
<!-- = titleabbrev % db2html.biblioentry.mode = -->
 
493
<xsl:template mode="db2html.biblioentry.mode" match="titleabbrev |
 
494
                                                     db:titleabbrev">
 
495
  <xsl:call-template name="db2html.inline"/>
 
496
  <xsl:text>. </xsl:text>
 
497
</xsl:template>
 
498
 
 
499
<!-- = volumenum % db2html.biblioentry.mode = -->
 
500
<xsl:template mode="db2html.biblioentry.mode" match="volumenum | db:volumenum">
 
501
  <xsl:call-template name="db2html.inline"/>
 
502
  <xsl:text>. </xsl:text>
 
503
</xsl:template>
 
504
 
 
505
 
 
506
<!--%%==========================================================================
 
507
db2html.bibliomixed.mode
 
508
Formats elements inside a #{bibliomixed} element
 
509
 
 
510
This mode is used when processing the child elements of a #{bibliomixed}
 
511
element.  Many elements are treated differently when they appear inside
 
512
a bibliography entry.
 
513
-->
 
514
<xsl:template mode="db2html.bibliomixed.mode" match="*">
 
515
  <xsl:apply-templates select="."/>
 
516
</xsl:template>
 
517
 
 
518
<!-- = absract % db2html.bibliomixed.mode = -->
 
519
<xsl:template mode="db2html.bibliomixed.mode" match="abstract | db:abstract">
 
520
  <xsl:call-template name="db2html.inline"/>
 
521
</xsl:template>
 
522
 
 
523
<!-- = address % db2html.bibliomixed.mode = -->
 
524
<xsl:template mode="db2html.bibliomixed.mode" match="address | db:address">
 
525
  <xsl:call-template name="db2html.inline"/>
 
526
</xsl:template>
 
527
 
 
528
<!-- = affiliation % db2html.bibliomixed.mode = -->
 
529
<xsl:template mode="db2html.bibliomixed.mode" match="affiliation |
 
530
                                                     db:affiliation">
 
531
  <xsl:call-template name="db2html.inline"/>
 
532
</xsl:template>
 
533
 
 
534
<!-- = author % db2html.bibliomixed.mode = -->
 
535
<xsl:template mode="db2html.bibliomixed.mode" match="author | db:author">
 
536
  <xsl:call-template name="db.personname"/>
 
537
</xsl:template>
 
538
 
 
539
<!-- = authorblurb % db2html.bibliomixed.mode = -->
 
540
<xsl:template mode="db2html.bibliomixed.mode" match="authorblurb">
 
541
  <xsl:call-template name="db2html.inline"/>
 
542
</xsl:template>
 
543
 
 
544
<!-- = authorgroup % db2html.bibliomixed.mode = -->
 
545
<xsl:template mode="db2html.bibliomixed.mode" match="authorgroup |
 
546
                                                     db:authorgroup">
 
547
  <xsl:call-template name="db.personname.list">
 
548
    <xsl:with-param name="nodes" select="*"/>
 
549
  </xsl:call-template>
 
550
</xsl:template>
 
551
 
 
552
<!-- = bibliomset % db2html.bibliomixed.mode = -->
 
553
<xsl:template mode="db2html.bibliomixed.mode" match="bibliomset |
 
554
                                                     db:bibliomset">
 
555
  <xsl:apply-templates mode="db2html.bibliomixed.mode"/>
 
556
</xsl:template>
 
557
 
 
558
<!-- = bibliomisc % db2html.bibliomixed.mode = -->
 
559
<xsl:template mode="db2html.bibliomixed.mode" match="bibliomisc |
 
560
                                                     db:bibliomisc">
 
561
  <xsl:call-template name="db2html.inline"/>
 
562
  <xsl:text>. </xsl:text>
 
563
</xsl:template>
 
564
 
 
565
<!-- = editor % db2html.bibliomixed.mode = -->
 
566
<xsl:template mode="db2html.bibliomixed.mode" match="editor | db:editor">
 
567
  <xsl:call-template name="db.personname"/>
 
568
</xsl:template>
 
569
 
 
570
<!-- = personblurb % db2html.bibliomixed.mode = -->
 
571
<xsl:template mode="db2html.bibliomixed.mode" match="personblurb |
 
572
                                                     db:personblurb">
 
573
  <xsl:call-template name="db2html.inline"/>
 
574
</xsl:template>
 
575
 
 
576
<!-- = shortaffil % db2html.bibliomixed.mode = -->
 
577
<xsl:template mode="db2html.bibliomixed.mode" match="shortaffil | db:shortaffil">
 
578
  <xsl:call-template name="db2html.inline"/>
 
579
</xsl:template>
 
580
 
 
581
<!-- = title % db2html.bibliomixed.mode = -->
 
582
<xsl:template mode="db2html.bibliomixed.mode" match="title | db:title">
 
583
  <span class="bibliotitle">
 
584
    <xsl:call-template name="l10n.gettext">
 
585
      <xsl:with-param name="msgid" select="'citetitle.format'"/>
 
586
      <xsl:with-param name="role" select="../self::bibliomset/@relation"/>
 
587
      <xsl:with-param name="node" select="."/>
 
588
      <xsl:with-param name="format" select="true()"/>
 
589
    </xsl:call-template>
 
590
  </span>
 
591
</xsl:template>
 
592
 
 
593
 
 
594
<!-- == Matched Templates == -->
 
595
 
 
596
<!-- = bibliography = -->
 
597
<xsl:template match="bibliography | db:bibliography">
 
598
  <xsl:param name="depth_in_chunk">
 
599
    <xsl:call-template name="db.chunk.depth-in-chunk"/>
 
600
  </xsl:param>
 
601
  <xsl:param name="depth_of_chunk">
 
602
    <xsl:call-template name="db.chunk.depth-of-chunk"/>
 
603
  </xsl:param>
 
604
  <xsl:choose>
 
605
    <xsl:when test="not(title) and not(bibliographyinfo/title) and
 
606
                    not(db:title) and not(db:info/db:title)">
 
607
      <xsl:call-template name="db2html.division.div">
 
608
        <xsl:with-param name="info" select="bibliographyinfo | db:info"/>
 
609
        <xsl:with-param name="divisions" select="bibliodiv | db:bibliodiv"/>
 
610
        <xsl:with-param name="title_content">
 
611
          <xsl:call-template name="l10n.gettext">
 
612
            <xsl:with-param name="msgid" select="'Bibliography'"/>
 
613
          </xsl:call-template>
 
614
        </xsl:with-param>
 
615
        <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
 
616
        <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
 
617
      </xsl:call-template>
 
618
    </xsl:when>
 
619
    <xsl:otherwise>
 
620
      <xsl:call-template name="db2html.division.div">
 
621
        <xsl:with-param name="info" select="bibliographyinfo | db:info"/>
 
622
        <xsl:with-param name="divisions" select="bibliodiv | db:bibliodiv"/>
 
623
        <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
 
624
        <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
 
625
      </xsl:call-template>
 
626
    </xsl:otherwise>
 
627
  </xsl:choose>
 
628
</xsl:template>
 
629
 
 
630
<!-- = bibliodiv = -->
 
631
<xsl:template match="bibliodiv | db:bibliodiv">
 
632
  <xsl:param name="depth_in_chunk">
 
633
    <xsl:call-template name="db.chunk.depth-in-chunk"/>
 
634
  </xsl:param>
 
635
  <xsl:param name="depth_of_chunk">
 
636
    <xsl:call-template name="db.chunk.depth-of-chunk"/>
 
637
  </xsl:param>
 
638
  <xsl:call-template name="db2html.division.div">
 
639
    <xsl:with-param name="info" select="db:info"/>
 
640
    <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
 
641
    <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
 
642
  </xsl:call-template>
 
643
</xsl:template>
 
644
 
 
645
<!-- = biblioentry = -->
 
646
<xsl:template match="biblioentry | db:biblioentry">
 
647
  <xsl:variable name="node" select="."/>
 
648
  <div>
 
649
    <xsl:attribute name="class">
 
650
      <xsl:text>bibliomixed block</xsl:text>
 
651
    </xsl:attribute>
 
652
    <xsl:call-template name="db2html.anchor"/>
 
653
    <xsl:call-template name="db2html.biblioentry.label"/>
 
654
    <xsl:apply-templates mode="db2html.biblioentry.mode"
 
655
                         select="*[not(set:has-same-node(., $node/*[1]/self::abbrev | $node/*[1]/self::db:abbrev))]"/>
 
656
  </div>
 
657
</xsl:template>
 
658
 
 
659
<!-- = bibliomixed = -->
 
660
<xsl:template match="bibliomixed | db:bibliomixed">
 
661
  <xsl:variable name="node" select="."/>
 
662
  <div>
 
663
    <xsl:attribute name="class">
 
664
      <xsl:text>bibliomixed block</xsl:text>
 
665
    </xsl:attribute>
 
666
    <xsl:call-template name="db2html.anchor"/>
 
667
    <xsl:call-template name="db2html.biblioentry.label"/>
 
668
    <xsl:apply-templates mode="db2html.bibliomixed.mode"
 
669
                         select="node()[not(set:has-same-node(., $node/*[1]/self::abbrev | $node/*[1]/self::db:abbrev))]"/>
 
670
  </div>
 
671
</xsl:template>
 
672
 
 
673
<!-- = bibliolist = -->
 
674
<xsl:template match="bibliolist | db:bibliolist">
 
675
  <xsl:call-template name="db2html.block">
 
676
    <xsl:with-param name="class" select="'list'"/>
 
677
    <xsl:with-param name="indent" select="true()"/>
 
678
    <xsl:with-param name="formal" select="true()"/>
 
679
  </xsl:call-template>
 
680
</xsl:template>
 
681
 
 
682
</xsl:stylesheet>