]> git.stg.codes - stg.git/blob - doc/xslt/html/biblio.xsl
Set output encoding to utf-8.
[stg.git] / doc / xslt / html / biblio.xsl
1 <?xml version='1.0'?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3                 version='1.0'>
4
5 <!-- ********************************************************************
6      $Id: biblio.xsl 8421 2009-05-04 07:49:49Z bobstayton $
7      ********************************************************************
8
9      This file is part of the XSL DocBook Stylesheet distribution.
10      See ../README or http://docbook.sf.net/release/xsl/current/ for
11      copyright and other information.
12
13      ******************************************************************** -->
14
15 <!-- ==================================================================== -->
16
17 <xsl:template match="bibliography">
18   <xsl:call-template name="id.warning"/>
19
20   <div>
21     <xsl:call-template name="common.html.attributes">
22       <xsl:with-param name="inherit" select="1"/>
23     </xsl:call-template>
24     <xsl:if test="$generate.id.attributes != 0">
25       <xsl:attribute name="id">
26         <xsl:call-template name="object.id"/>
27       </xsl:attribute>
28     </xsl:if>
29
30     <xsl:call-template name="bibliography.titlepage"/>
31
32     <xsl:apply-templates/>
33
34     <xsl:if test="not(parent::article)">
35       <xsl:call-template name="process.footnotes"/>
36     </xsl:if>
37   </div>
38 </xsl:template>
39
40 <xsl:template match="bibliography/bibliographyinfo"></xsl:template>
41 <xsl:template match="bibliography/info"></xsl:template>
42 <xsl:template match="bibliography/title"></xsl:template>
43 <xsl:template match="bibliography/subtitle"></xsl:template>
44 <xsl:template match="bibliography/titleabbrev"></xsl:template>
45
46 <!-- ==================================================================== -->
47
48 <xsl:template match="bibliodiv">
49   <xsl:call-template name="id.warning"/>
50
51   <div>
52     <xsl:call-template name="common.html.attributes">
53       <xsl:with-param name="inherit" select="0"/>
54     </xsl:call-template>
55     <xsl:apply-templates/>
56   </div>
57 </xsl:template>
58
59 <xsl:template match="bibliodiv/title">
60   <h3>
61     <xsl:call-template name="common.html.attributes"/>
62     <xsl:call-template name="anchor">
63       <xsl:with-param name="node" select=".."/>
64       <xsl:with-param name="conditional" select="0"/>
65     </xsl:call-template>
66     <xsl:apply-templates/>
67   </h3>
68 </xsl:template>
69
70 <!-- ==================================================================== -->
71
72 <xsl:template match="bibliolist">
73   <div>
74     <xsl:call-template name="common.html.attributes">
75       <xsl:with-param name="inherit" select="0"/>
76     </xsl:call-template>
77     <xsl:call-template name="anchor"/>
78     <xsl:if test="blockinfo/title|info/title|title">
79       <xsl:call-template name="formal.object.heading"/>
80     </xsl:if>
81     <xsl:apply-templates select="*[not(self::blockinfo)
82                                    and not(self::info)
83                                    and not(self::title)
84                                    and not(self::titleabbrev)
85                                    and not(self::biblioentry)
86                                    and not(self::bibliomixed)]"/>
87     <xsl:apply-templates select="biblioentry|bibliomixed"/>
88   </div>
89 </xsl:template>
90
91 <!-- ==================================================================== -->
92
93 <xsl:template match="biblioentry">
94   <xsl:param name="label">
95     <xsl:call-template name="biblioentry.label"/>
96   </xsl:param>
97
98   <xsl:variable name="id">
99     <xsl:call-template name="object.id"/>
100   </xsl:variable>
101
102   <xsl:choose>
103     <xsl:when test="string(.) = ''">
104       <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
105       <xsl:variable name="entry" select="$bib/bibliography//
106                                          *[@id=$id or @xml:id=$id][1]"/>
107       <xsl:choose>
108         <xsl:when test="$entry">
109           <xsl:choose>
110             <xsl:when test="$bibliography.numbered != 0">
111               <xsl:apply-templates select="$entry">
112                 <xsl:with-param name="label" select="$label"/>
113               </xsl:apply-templates>
114             </xsl:when>
115             <xsl:otherwise>
116               <xsl:apply-templates select="$entry"/>
117             </xsl:otherwise>
118           </xsl:choose>
119         </xsl:when>
120         <xsl:otherwise>
121           <xsl:message>
122             <xsl:text>No bibliography entry: </xsl:text>
123             <xsl:value-of select="$id"/>
124             <xsl:text> found in </xsl:text>
125             <xsl:value-of select="$bibliography.collection"/>
126           </xsl:message>
127           <div>
128             <xsl:call-template name="common.html.attributes"/>
129             <xsl:call-template name="anchor"/>
130             <p>
131               <xsl:copy-of select="$label"/>
132               <xsl:text>Error: no bibliography entry: </xsl:text>
133               <xsl:value-of select="$id"/>
134               <xsl:text> found in </xsl:text>
135               <xsl:value-of select="$bibliography.collection"/>
136             </p>
137           </div>
138         </xsl:otherwise>
139       </xsl:choose>
140     </xsl:when>
141     <xsl:otherwise>
142       <div>
143         <xsl:call-template name="common.html.attributes"/>
144         <xsl:call-template name="anchor">
145           <xsl:with-param name="conditional" select="0"/>
146         </xsl:call-template>
147         <p>
148           <xsl:copy-of select="$label"/>
149           <xsl:choose>
150             <xsl:when test="$bibliography.style = 'iso690'">
151               <xsl:call-template name="iso690.makecitation"/>
152             </xsl:when>
153             <xsl:otherwise>
154               <xsl:apply-templates mode="bibliography.mode"/>
155             </xsl:otherwise>
156           </xsl:choose>
157         </p>
158       </div>
159     </xsl:otherwise>
160   </xsl:choose>
161 </xsl:template>
162
163 <xsl:template match="bibliomixed">
164   <xsl:param name="label">
165     <xsl:call-template name="biblioentry.label"/>
166   </xsl:param>
167
168   <xsl:variable name="id">
169     <xsl:call-template name="object.id"/>
170   </xsl:variable>
171
172   <xsl:choose>
173     <xsl:when test="string(.) = ''">
174       <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
175       <xsl:variable name="entry" select="$bib/bibliography//
176                                          *[@id=$id or @xml:id=$id][1]"/>
177       <xsl:choose>
178         <xsl:when test="$entry">
179           <xsl:choose>
180             <xsl:when test="$bibliography.numbered != 0">
181               <xsl:apply-templates select="$entry">
182                 <xsl:with-param name="label" select="$label"/>
183               </xsl:apply-templates>
184             </xsl:when>
185             <xsl:otherwise>
186               <xsl:apply-templates select="$entry"/>
187             </xsl:otherwise>
188           </xsl:choose>
189         </xsl:when>
190         <xsl:otherwise>
191           <xsl:message>
192             <xsl:text>No bibliography entry: </xsl:text>
193             <xsl:value-of select="$id"/>
194             <xsl:text> found in </xsl:text>
195             <xsl:value-of select="$bibliography.collection"/>
196           </xsl:message>
197           <div>
198             <xsl:call-template name="common.html.attributes"/>
199             <xsl:call-template name="anchor"/>
200             <p>
201               <xsl:copy-of select="$label"/>
202               <xsl:text>Error: no bibliography entry: </xsl:text>
203               <xsl:value-of select="$id"/>
204               <xsl:text> found in </xsl:text>
205               <xsl:value-of select="$bibliography.collection"/>
206             </p>
207           </div>
208         </xsl:otherwise>
209       </xsl:choose>
210     </xsl:when>
211     <xsl:otherwise>
212       <div>
213         <xsl:call-template name="common.html.attributes"/>
214         <xsl:call-template name="anchor">
215           <xsl:with-param name="conditional" select="0"/>
216         </xsl:call-template>
217         <p>
218           <xsl:call-template name="common.html.attributes"/>
219           <xsl:copy-of select="$label"/>
220           <xsl:apply-templates mode="bibliomixed.mode"/>
221         </p>
222       </div>
223     </xsl:otherwise>
224   </xsl:choose>
225 </xsl:template>
226
227 <xsl:template name="biblioentry.label">
228   <xsl:param name="node" select="."/>
229
230   <xsl:choose>
231     <xsl:when test="$bibliography.numbered != 0">
232       <xsl:text>[</xsl:text>
233       <xsl:number from="bibliography" count="biblioentry|bibliomixed"
234                   level="any" format="1"/>
235       <xsl:text>] </xsl:text>
236     </xsl:when>
237     <xsl:when test="local-name($node/child::*[1]) = 'abbrev'">
238       <xsl:text>[</xsl:text>
239       <xsl:apply-templates select="$node/abbrev[1]"/>
240       <xsl:text>] </xsl:text>
241     </xsl:when>
242     <xsl:when test="$node/@xreflabel">
243       <xsl:text>[</xsl:text>
244       <xsl:value-of select="$node/@xreflabel"/>
245       <xsl:text>] </xsl:text>
246     </xsl:when>
247     <xsl:when test="$node/@id">
248       <xsl:text>[</xsl:text>
249       <xsl:value-of select="$node/@id"/>
250       <xsl:text>] </xsl:text>
251     </xsl:when>
252     <xsl:when test="$node/@xml:id">
253       <xsl:text>[</xsl:text>
254       <xsl:value-of select="$node/@xml:id"/>
255       <xsl:text>] </xsl:text>
256     </xsl:when>
257     <xsl:otherwise><!-- nop --></xsl:otherwise>
258   </xsl:choose>
259 </xsl:template>
260
261 <!-- ==================================================================== -->
262
263 <xsl:template match="*" mode="bibliography.mode">
264   <xsl:apply-templates select="."/><!-- try the default mode -->
265 </xsl:template>
266
267 <xsl:template match="abbrev" mode="bibliography.mode">
268   <xsl:if test="preceding-sibling::*">
269     <xsl:apply-templates mode="bibliography.mode"/>
270   </xsl:if>
271 </xsl:template>
272
273 <xsl:template match="abstract" mode="bibliography.mode">
274   <!-- suppressed -->
275 </xsl:template>
276
277 <xsl:template match="address" mode="bibliography.mode">
278   <span>
279     <xsl:call-template name="common.html.attributes"/>
280     <xsl:apply-templates mode="bibliography.mode"/>
281     <xsl:copy-of select="$biblioentry.item.separator"/>
282   </span>
283 </xsl:template>
284
285 <xsl:template match="affiliation" mode="bibliography.mode">
286   <span>
287     <xsl:call-template name="common.html.attributes"/>
288     <xsl:apply-templates mode="bibliography.mode"/>
289     <xsl:copy-of select="$biblioentry.item.separator"/>
290   </span>
291 </xsl:template>
292
293 <xsl:template match="shortaffil" mode="bibliography.mode">
294   <span>
295     <xsl:call-template name="common.html.attributes"/>
296     <xsl:apply-templates mode="bibliography.mode"/>
297     <xsl:copy-of select="$biblioentry.item.separator"/>
298   </span>
299 </xsl:template>
300
301 <xsl:template match="jobtitle" mode="bibliography.mode">
302   <span>
303     <xsl:call-template name="common.html.attributes"/>
304     <xsl:apply-templates mode="bibliography.mode"/>
305     <xsl:copy-of select="$biblioentry.item.separator"/>
306   </span>
307 </xsl:template>
308
309 <xsl:template match="artheader|articleinfo|info" mode="bibliography.mode">
310   <span>
311     <xsl:call-template name="common.html.attributes"/>
312     <xsl:apply-templates mode="bibliography.mode"/>
313     <xsl:copy-of select="$biblioentry.item.separator"/>
314   </span>
315 </xsl:template>
316
317 <xsl:template match="artpagenums" mode="bibliography.mode">
318   <span>
319     <xsl:call-template name="common.html.attributes"/>
320     <xsl:apply-templates mode="bibliography.mode"/>
321     <xsl:copy-of select="$biblioentry.item.separator"/>
322   </span>
323 </xsl:template>
324
325 <xsl:template match="author" mode="bibliography.mode">
326   <span>
327     <xsl:call-template name="common.html.attributes"/>
328     <xsl:call-template name="person.name"/>
329     <xsl:copy-of select="$biblioentry.item.separator"/>
330   </span>
331 </xsl:template>
332
333 <xsl:template match="authorblurb|personblurb" mode="bibliography.mode">
334   <!-- suppressed -->
335 </xsl:template>
336
337 <xsl:template match="authorgroup" mode="bibliography.mode">
338   <span>
339     <xsl:call-template name="common.html.attributes"/>
340     <xsl:call-template name="person.name.list"/>
341     <xsl:copy-of select="$biblioentry.item.separator"/>
342   </span>
343 </xsl:template>
344
345 <xsl:template match="authorinitials" mode="bibliography.mode">
346   <span>
347     <xsl:call-template name="common.html.attributes"/>
348     <xsl:apply-templates mode="bibliography.mode"/>
349     <xsl:copy-of select="$biblioentry.item.separator"/>
350   </span>
351 </xsl:template>
352
353 <xsl:template match="bibliomisc" mode="bibliography.mode">
354   <span>
355     <xsl:call-template name="common.html.attributes"/>
356     <xsl:apply-templates mode="bibliography.mode"/>
357     <xsl:copy-of select="$biblioentry.item.separator"/>
358   </span>
359 </xsl:template>
360
361 <xsl:template match="bibliomset" mode="bibliography.mode">
362   <span>
363     <xsl:call-template name="common.html.attributes"/>
364     <xsl:apply-templates mode="bibliography.mode"/>
365     <xsl:copy-of select="$biblioentry.item.separator"/>
366   </span>
367 </xsl:template>
368
369 <!-- ================================================== -->
370
371 <xsl:template match="biblioset" mode="bibliography.mode">
372   <span>
373     <xsl:call-template name="common.html.attributes"/>
374     <xsl:apply-templates mode="bibliography.mode"/>
375   </span>
376 </xsl:template>
377
378 <xsl:template match="biblioset/title|biblioset/citetitle" 
379               mode="bibliography.mode">
380   <xsl:variable name="relation" select="../@relation"/>
381   <xsl:choose>
382     <xsl:when test="$relation='article' or @pubwork='article'">
383       <xsl:call-template name="gentext.startquote"/>
384       <xsl:apply-templates/>
385       <xsl:call-template name="gentext.endquote"/>
386     </xsl:when>
387     <xsl:otherwise>
388       <i><xsl:apply-templates/></i>
389     </xsl:otherwise>
390   </xsl:choose>
391   <xsl:copy-of select="$biblioentry.item.separator"/>
392 </xsl:template>
393
394 <!-- ================================================== -->
395
396 <xsl:template match="bookbiblio" mode="bibliography.mode">
397   <span>
398     <xsl:call-template name="common.html.attributes"/>
399     <xsl:apply-templates mode="bibliography.mode"/>
400     <xsl:copy-of select="$biblioentry.item.separator"/>
401   </span>
402 </xsl:template>
403
404 <xsl:template match="citetitle" mode="bibliography.mode">
405   <span>
406     <xsl:call-template name="common.html.attributes"/>
407     <xsl:choose>
408       <xsl:when test="@pubwork = 'article'">
409         <xsl:call-template name="gentext.startquote"/>
410         <xsl:call-template name="inline.charseq"/>
411         <xsl:call-template name="gentext.endquote"/>
412       </xsl:when>
413       <xsl:otherwise>
414         <xsl:call-template name="inline.italicseq"/>
415       </xsl:otherwise>
416     </xsl:choose>
417     <xsl:copy-of select="$biblioentry.item.separator"/>
418   </span>
419 </xsl:template>
420
421 <xsl:template match="collab" mode="bibliography.mode">
422   <span>
423     <xsl:call-template name="common.html.attributes"/>
424     <xsl:apply-templates mode="bibliography.mode"/>
425     <xsl:copy-of select="$biblioentry.item.separator"/>
426   </span>
427 </xsl:template>
428
429 <xsl:template match="collabname" mode="bibliography.mode">
430   <span>
431     <xsl:call-template name="common.html.attributes"/>
432     <xsl:apply-templates mode="bibliography.mode"/>
433     <xsl:copy-of select="$biblioentry.item.separator"/>
434   </span>
435 </xsl:template>
436
437 <xsl:template match="confgroup" mode="bibliography.mode">
438   <span>
439     <xsl:call-template name="common.html.attributes"/>
440     <xsl:apply-templates mode="bibliography.mode"/>
441     <xsl:copy-of select="$biblioentry.item.separator"/>
442   </span>
443 </xsl:template>
444
445 <xsl:template match="confdates" mode="bibliography.mode">
446   <span>
447     <xsl:call-template name="common.html.attributes"/>
448     <xsl:apply-templates mode="bibliography.mode"/>
449     <xsl:copy-of select="$biblioentry.item.separator"/>
450   </span>
451 </xsl:template>
452
453 <xsl:template match="conftitle" mode="bibliography.mode">
454   <span>
455     <xsl:call-template name="common.html.attributes"/>
456     <xsl:apply-templates mode="bibliography.mode"/>
457     <xsl:copy-of select="$biblioentry.item.separator"/>
458   </span>
459 </xsl:template>
460
461 <xsl:template match="confnum" mode="bibliography.mode">
462   <span>
463     <xsl:call-template name="common.html.attributes"/>
464     <xsl:apply-templates mode="bibliography.mode"/>
465     <xsl:copy-of select="$biblioentry.item.separator"/>
466   </span>
467 </xsl:template>
468
469 <xsl:template match="confsponsor" mode="bibliography.mode">
470   <span>
471     <xsl:call-template name="common.html.attributes"/>
472     <xsl:apply-templates mode="bibliography.mode"/>
473     <xsl:copy-of select="$biblioentry.item.separator"/>
474   </span>
475 </xsl:template>
476
477 <xsl:template match="contractnum" mode="bibliography.mode">
478   <span>
479     <xsl:call-template name="common.html.attributes"/>
480     <xsl:apply-templates mode="bibliography.mode"/>
481     <xsl:copy-of select="$biblioentry.item.separator"/>
482   </span>
483 </xsl:template>
484
485 <xsl:template match="contractsponsor" mode="bibliography.mode">
486   <span>
487     <xsl:call-template name="common.html.attributes"/>
488     <xsl:apply-templates mode="bibliography.mode"/>
489     <xsl:copy-of select="$biblioentry.item.separator"/>
490   </span>
491 </xsl:template>
492
493 <xsl:template match="contrib" mode="bibliography.mode">
494   <span>
495     <xsl:call-template name="common.html.attributes"/>
496     <xsl:apply-templates mode="bibliography.mode"/>
497     <xsl:copy-of select="$biblioentry.item.separator"/>
498   </span>
499 </xsl:template>
500
501 <!-- ================================================== -->
502
503 <xsl:template match="copyright" mode="bibliography.mode">
504   <span>
505     <xsl:call-template name="common.html.attributes"/>
506     <xsl:call-template name="gentext">
507       <xsl:with-param name="key" select="'Copyright'"/>
508     </xsl:call-template>
509     <xsl:call-template name="gentext.space"/>
510     <xsl:call-template name="dingbat">
511       <xsl:with-param name="dingbat">copyright</xsl:with-param>
512     </xsl:call-template>
513     <xsl:call-template name="gentext.space"/>
514     <xsl:apply-templates select="year" mode="bibliography.mode"/>
515     <xsl:if test="holder">
516       <xsl:call-template name="gentext.space"/>
517       <xsl:apply-templates select="holder" mode="bibliography.mode"/>
518     </xsl:if>
519     <xsl:copy-of select="$biblioentry.item.separator"/>
520   </span>
521 </xsl:template>
522
523 <xsl:template match="year" mode="bibliography.mode">
524   <xsl:apply-templates/><xsl:text>, </xsl:text>
525 </xsl:template>
526
527 <xsl:template match="year[position()=last()]" mode="bibliography.mode">
528   <xsl:apply-templates/>
529 </xsl:template>
530
531 <xsl:template match="holder" mode="bibliography.mode">
532   <xsl:apply-templates/>
533 </xsl:template>
534
535 <!-- ================================================== -->
536
537 <xsl:template match="corpauthor" mode="bibliography.mode">
538   <span>
539     <xsl:call-template name="common.html.attributes"/>
540     <xsl:apply-templates mode="bibliography.mode"/>
541     <xsl:copy-of select="$biblioentry.item.separator"/>
542   </span>
543 </xsl:template>
544
545 <xsl:template match="corpcredit" mode="bibliography.mode">
546   <span>
547     <xsl:call-template name="common.html.attributes"/>
548     <xsl:apply-templates mode="bibliography.mode"/>
549     <xsl:copy-of select="$biblioentry.item.separator"/>
550   </span>
551 </xsl:template>
552
553 <xsl:template match="corpname" mode="bibliography.mode">
554   <span>
555     <xsl:call-template name="common.html.attributes"/>
556     <xsl:apply-templates mode="bibliography.mode"/>
557     <xsl:copy-of select="$biblioentry.item.separator"/>
558   </span>
559 </xsl:template>
560
561 <xsl:template match="date" mode="bibliography.mode">
562   <span>
563     <xsl:call-template name="common.html.attributes"/>
564     <xsl:apply-templates mode="bibliography.mode"/>
565     <xsl:copy-of select="$biblioentry.item.separator"/>
566   </span>
567 </xsl:template>
568
569 <xsl:template match="edition" mode="bibliography.mode">
570   <span>
571     <xsl:call-template name="common.html.attributes"/>
572     <xsl:apply-templates mode="bibliography.mode"/>
573     <xsl:copy-of select="$biblioentry.item.separator"/>
574   </span>
575 </xsl:template>
576
577 <xsl:template match="editor" mode="bibliography.mode">
578   <span>
579     <xsl:call-template name="common.html.attributes"/>
580     <xsl:call-template name="person.name"/>
581     <xsl:copy-of select="$biblioentry.item.separator"/>
582   </span>
583 </xsl:template>
584
585 <xsl:template match="firstname" mode="bibliography.mode">
586   <span>
587     <xsl:call-template name="common.html.attributes"/>
588     <xsl:apply-templates mode="bibliography.mode"/>
589     <xsl:copy-of select="$biblioentry.item.separator"/>
590   </span>
591 </xsl:template>
592
593 <xsl:template match="honorific" mode="bibliography.mode">
594   <span>
595     <xsl:call-template name="common.html.attributes"/>
596     <xsl:apply-templates mode="bibliography.mode"/>
597     <xsl:copy-of select="$biblioentry.item.separator"/>
598   </span>
599 </xsl:template>
600
601 <xsl:template match="indexterm" mode="bibliography.mode">
602   <span>
603     <xsl:call-template name="common.html.attributes"/>
604     <xsl:apply-templates mode="bibliography.mode"/>
605     <xsl:copy-of select="$biblioentry.item.separator"/>
606   </span>
607 </xsl:template>
608
609 <xsl:template match="invpartnumber" mode="bibliography.mode">
610   <span>
611     <xsl:call-template name="common.html.attributes"/>
612     <xsl:apply-templates mode="bibliography.mode"/>
613     <xsl:copy-of select="$biblioentry.item.separator"/>
614   </span>
615 </xsl:template>
616
617 <xsl:template match="isbn" mode="bibliography.mode">
618   <span>
619     <xsl:call-template name="common.html.attributes"/>
620     <xsl:apply-templates mode="bibliography.mode"/>
621     <xsl:copy-of select="$biblioentry.item.separator"/>
622   </span>
623 </xsl:template>
624
625 <xsl:template match="issn" mode="bibliography.mode">
626   <span>
627     <xsl:call-template name="common.html.attributes"/>
628     <xsl:apply-templates mode="bibliography.mode"/>
629     <xsl:copy-of select="$biblioentry.item.separator"/>
630   </span>
631 </xsl:template>
632
633 <xsl:template match="issuenum" mode="bibliography.mode">
634   <span>
635     <xsl:call-template name="common.html.attributes"/>
636     <xsl:apply-templates mode="bibliography.mode"/>
637     <xsl:copy-of select="$biblioentry.item.separator"/>
638   </span>
639 </xsl:template>
640
641 <xsl:template match="lineage" mode="bibliography.mode">
642   <span>
643     <xsl:call-template name="common.html.attributes"/>
644     <xsl:apply-templates mode="bibliography.mode"/>
645     <xsl:copy-of select="$biblioentry.item.separator"/>
646   </span>
647 </xsl:template>
648
649 <xsl:template match="orgname" mode="bibliography.mode">
650   <span>
651     <xsl:call-template name="common.html.attributes"/>
652     <xsl:apply-templates mode="bibliography.mode"/>
653     <xsl:copy-of select="$biblioentry.item.separator"/>
654   </span>
655 </xsl:template>
656
657 <xsl:template match="orgdiv" mode="bibliography.mode">
658   <span>
659     <xsl:call-template name="common.html.attributes"/>
660     <xsl:apply-templates mode="bibliography.mode"/>
661     <xsl:copy-of select="$biblioentry.item.separator"/>
662   </span>
663 </xsl:template>
664
665 <xsl:template match="othercredit" mode="bibliography.mode">
666   <span>
667     <xsl:call-template name="common.html.attributes"/>
668     <xsl:apply-templates mode="bibliography.mode"/>
669     <xsl:copy-of select="$biblioentry.item.separator"/>
670   </span>
671 </xsl:template>
672
673 <xsl:template match="othername" mode="bibliography.mode">
674   <span>
675     <xsl:call-template name="common.html.attributes"/>
676     <xsl:apply-templates mode="bibliography.mode"/>
677     <xsl:copy-of select="$biblioentry.item.separator"/>
678   </span>
679 </xsl:template>
680
681 <xsl:template match="pagenums" mode="bibliography.mode">
682   <span>
683     <xsl:call-template name="common.html.attributes"/>
684     <xsl:apply-templates mode="bibliography.mode"/>
685     <xsl:copy-of select="$biblioentry.item.separator"/>
686   </span>
687 </xsl:template>
688
689 <xsl:template match="printhistory" mode="bibliography.mode">
690   <!-- suppressed -->
691 </xsl:template>
692
693 <xsl:template match="productname" mode="bibliography.mode">
694   <span>
695     <xsl:call-template name="common.html.attributes"/>
696     <xsl:apply-templates mode="bibliography.mode"/>
697     <xsl:copy-of select="$biblioentry.item.separator"/>
698   </span>
699 </xsl:template>
700
701 <xsl:template match="productnumber" mode="bibliography.mode">
702   <span>
703     <xsl:call-template name="common.html.attributes"/>
704     <xsl:apply-templates mode="bibliography.mode"/>
705     <xsl:copy-of select="$biblioentry.item.separator"/>
706   </span>
707 </xsl:template>
708
709 <xsl:template match="pubdate" mode="bibliography.mode">
710   <span>
711     <xsl:call-template name="common.html.attributes"/>
712     <xsl:apply-templates mode="bibliography.mode"/>
713     <xsl:copy-of select="$biblioentry.item.separator"/>
714   </span>
715 </xsl:template>
716
717 <xsl:template match="publisher" mode="bibliography.mode">
718   <span>
719     <xsl:call-template name="common.html.attributes"/>
720     <xsl:apply-templates mode="bibliography.mode"/>
721   </span>
722 </xsl:template>
723
724 <xsl:template match="publishername" mode="bibliography.mode">
725   <span>
726     <xsl:call-template name="common.html.attributes"/>
727     <xsl:apply-templates mode="bibliography.mode"/>
728     <xsl:copy-of select="$biblioentry.item.separator"/>
729   </span>
730 </xsl:template>
731
732 <xsl:template match="pubsnumber" mode="bibliography.mode">
733   <span>
734     <xsl:call-template name="common.html.attributes"/>
735     <xsl:apply-templates mode="bibliography.mode"/>
736     <xsl:copy-of select="$biblioentry.item.separator"/>
737   </span>
738 </xsl:template>
739
740 <xsl:template match="releaseinfo" mode="bibliography.mode">
741   <span>
742     <xsl:call-template name="common.html.attributes"/>
743     <xsl:apply-templates mode="bibliography.mode"/>
744     <xsl:copy-of select="$biblioentry.item.separator"/>
745   </span>
746 </xsl:template>
747
748 <xsl:template match="revhistory" mode="bibliography.mode">
749   <!-- suppressed; how could this be represented? -->
750 </xsl:template>
751
752 <xsl:template match="seriesinfo" mode="bibliography.mode">
753   <span>
754     <xsl:call-template name="common.html.attributes"/>
755     <xsl:apply-templates mode="bibliography.mode"/>
756   </span>
757 </xsl:template>
758
759 <xsl:template match="seriesvolnums" mode="bibliography.mode">
760   <span>
761     <xsl:call-template name="common.html.attributes"/>
762     <xsl:apply-templates mode="bibliography.mode"/>
763     <xsl:copy-of select="$biblioentry.item.separator"/>
764   </span>
765 </xsl:template>
766
767 <xsl:template match="subtitle" mode="bibliography.mode">
768   <span>
769     <xsl:call-template name="common.html.attributes"/>
770     <xsl:apply-templates mode="bibliography.mode"/>
771     <xsl:copy-of select="$biblioentry.item.separator"/>
772   </span>
773 </xsl:template>
774
775 <xsl:template match="surname" mode="bibliography.mode">
776   <span>
777     <xsl:call-template name="common.html.attributes"/>
778     <xsl:apply-templates mode="bibliography.mode"/>
779     <xsl:copy-of select="$biblioentry.item.separator"/>
780   </span>
781 </xsl:template>
782
783 <xsl:template match="title" mode="bibliography.mode">
784   <span>
785     <xsl:call-template name="common.html.attributes"/>
786     <i><xsl:apply-templates mode="bibliography.mode"/></i>
787     <xsl:copy-of select="$biblioentry.item.separator"/>
788   </span>
789 </xsl:template>
790
791 <xsl:template match="titleabbrev" mode="bibliography.mode">
792   <span>
793     <xsl:call-template name="common.html.attributes"/>
794     <xsl:apply-templates mode="bibliography.mode"/>
795     <xsl:copy-of select="$biblioentry.item.separator"/>
796   </span>
797 </xsl:template>
798
799 <xsl:template match="volumenum" mode="bibliography.mode">
800   <span>
801     <xsl:call-template name="common.html.attributes"/>
802     <xsl:apply-templates mode="bibliography.mode"/>
803     <xsl:copy-of select="$biblioentry.item.separator"/>
804   </span>
805 </xsl:template>
806
807 <xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
808               mode="bibliography.mode">
809   <span>
810     <xsl:call-template name="common.html.attributes"/>
811     <xsl:apply-templates mode="bibliography.mode"/>
812     <xsl:copy-of select="$biblioentry.item.separator"/>
813   </span>
814 </xsl:template>
815
816 <!-- See FR #1934434 and http://doi.org -->
817 <xsl:template match="biblioid[@class='doi']"
818               mode="bibliography.mode">
819   <span>
820     <xsl:call-template name="common.html.attributes"/>
821     <a href="{concat('http://dx.doi.org/', .)}">doi:<xsl:value-of select="."/></a>
822   </span>
823 </xsl:template>
824
825 <!-- ==================================================================== -->
826
827 <xsl:template match="*" mode="bibliomixed.mode">
828   <xsl:apply-templates select="."/><!-- try the default mode -->
829 </xsl:template>
830
831 <xsl:template match="abbrev" mode="bibliomixed.mode">
832   <xsl:if test="preceding-sibling::*">
833     <xsl:apply-templates mode="bibliomixed.mode"/>
834   </xsl:if>
835 </xsl:template>
836
837 <xsl:template match="abstract" mode="bibliomixed.mode">
838   <span>
839     <xsl:call-template name="common.html.attributes"/>
840     <xsl:apply-templates mode="bibliomixed.mode"/>
841   </span>
842 </xsl:template>
843
844 <xsl:template match="address" mode="bibliomixed.mode">
845   <span>
846     <xsl:call-template name="common.html.attributes"/>
847     <xsl:apply-templates mode="bibliomixed.mode"/>
848   </span>
849 </xsl:template>
850
851 <xsl:template match="affiliation" mode="bibliomixed.mode">
852   <span>
853     <xsl:call-template name="common.html.attributes"/>
854     <xsl:apply-templates mode="bibliomixed.mode"/>
855   </span>
856 </xsl:template>
857
858 <xsl:template match="shortaffil" mode="bibliomixed.mode">
859   <span>
860     <xsl:call-template name="common.html.attributes"/>
861     <xsl:apply-templates mode="bibliomixed.mode"/>
862   </span>
863 </xsl:template>
864
865 <xsl:template match="jobtitle" mode="bibliomixed.mode">
866   <span>
867     <xsl:call-template name="common.html.attributes"/>
868     <xsl:apply-templates mode="bibliomixed.mode"/>
869   </span>
870 </xsl:template>
871
872 <xsl:template match="artpagenums" mode="bibliomixed.mode">
873   <span>
874     <xsl:call-template name="common.html.attributes"/>
875     <xsl:apply-templates mode="bibliomixed.mode"/>
876   </span>
877 </xsl:template>
878
879 <xsl:template match="author" mode="bibliomixed.mode">
880   <span>
881     <xsl:call-template name="common.html.attributes"/>
882     <xsl:apply-templates mode="bibliomixed.mode"/>
883   </span>
884 </xsl:template>
885
886 <xsl:template match="authorblurb|personblurb" mode="bibliomixed.mode">
887   <span>
888     <xsl:call-template name="common.html.attributes"/>
889     <xsl:apply-templates mode="bibliomixed.mode"/>
890   </span>
891 </xsl:template>
892
893 <xsl:template match="authorgroup" mode="bibliomixed.mode">
894   <span>
895     <xsl:call-template name="common.html.attributes"/>
896     <xsl:apply-templates mode="bibliomixed.mode"/>
897   </span>
898 </xsl:template>
899
900 <xsl:template match="authorinitials" mode="bibliomixed.mode">
901   <span>
902     <xsl:call-template name="common.html.attributes"/>
903     <xsl:apply-templates mode="bibliomixed.mode"/>
904   </span>
905 </xsl:template>
906
907 <xsl:template match="bibliomisc" mode="bibliomixed.mode">
908   <span>
909     <xsl:call-template name="common.html.attributes"/>
910     <xsl:apply-templates mode="bibliomixed.mode"/>
911   </span>
912 </xsl:template>
913
914 <!-- ================================================== -->
915
916 <xsl:template match="bibliomset" mode="bibliomixed.mode">
917   <span>
918     <xsl:call-template name="common.html.attributes"/>
919     <xsl:apply-templates mode="bibliomixed.mode"/>
920   </span>
921 </xsl:template>
922
923 <xsl:template match="bibliomset/title|bibliomset/citetitle" 
924               mode="bibliomixed.mode">
925   <xsl:variable name="relation" select="../@relation"/>
926   <xsl:choose>
927     <xsl:when test="$relation='article' or @pubwork='article'">
928       <xsl:call-template name="gentext.startquote"/>
929       <xsl:apply-templates/>
930       <xsl:call-template name="gentext.endquote"/>
931     </xsl:when>
932     <xsl:otherwise>
933       <i><xsl:apply-templates/></i>
934     </xsl:otherwise>
935   </xsl:choose>
936 </xsl:template>
937
938 <!-- ================================================== -->
939
940 <xsl:template match="biblioset" mode="bibliomixed.mode">
941   <span>
942     <xsl:call-template name="common.html.attributes"/>
943     <xsl:apply-templates mode="bibliomixed.mode"/>
944   </span>
945 </xsl:template>
946
947 <xsl:template match="citetitle" mode="bibliomixed.mode">
948   <span>
949     <xsl:call-template name="common.html.attributes"/>
950     <xsl:choose>
951       <xsl:when test="@pubwork = 'article'">
952         <xsl:call-template name="gentext.startquote"/>
953         <xsl:call-template name="inline.charseq"/>
954         <xsl:call-template name="gentext.endquote"/>
955       </xsl:when>
956       <xsl:otherwise>
957         <xsl:call-template name="inline.italicseq"/>
958       </xsl:otherwise>
959     </xsl:choose>
960   </span>
961 </xsl:template>
962
963
964 <xsl:template match="collab" mode="bibliomixed.mode">
965   <span>
966     <xsl:call-template name="common.html.attributes"/>
967     <xsl:apply-templates mode="bibliomixed.mode"/>
968   </span>
969 </xsl:template>
970
971 <xsl:template match="confgroup" mode="bibliomixed.mode">
972   <span>
973     <xsl:call-template name="common.html.attributes"/>
974     <xsl:apply-templates mode="bibliomixed.mode"/>
975   </span>
976 </xsl:template>
977
978 <xsl:template match="contractnum" mode="bibliomixed.mode">
979   <span>
980     <xsl:call-template name="common.html.attributes"/>
981     <xsl:apply-templates mode="bibliomixed.mode"/>
982   </span>
983 </xsl:template>
984
985 <xsl:template match="contractsponsor" mode="bibliomixed.mode">
986   <span>
987     <xsl:call-template name="common.html.attributes"/>
988     <xsl:apply-templates mode="bibliomixed.mode"/>
989   </span>
990 </xsl:template>
991
992 <xsl:template match="contrib" mode="bibliomixed.mode">
993   <span>
994     <xsl:call-template name="common.html.attributes"/>
995     <xsl:apply-templates mode="bibliomixed.mode"/>
996   </span>
997 </xsl:template>
998
999 <xsl:template match="copyright" mode="bibliomixed.mode">
1000   <span>
1001     <xsl:call-template name="common.html.attributes"/>
1002     <xsl:apply-templates mode="bibliomixed.mode"/>
1003   </span>
1004 </xsl:template>
1005
1006 <xsl:template match="corpauthor" mode="bibliomixed.mode">
1007   <span>
1008     <xsl:call-template name="common.html.attributes"/>
1009     <xsl:apply-templates mode="bibliomixed.mode"/>
1010   </span>
1011 </xsl:template>
1012
1013 <xsl:template match="corpcredit" mode="bibliomixed.mode">
1014   <span>
1015     <xsl:call-template name="common.html.attributes"/>
1016     <xsl:apply-templates mode="bibliomixed.mode"/>
1017   </span>
1018 </xsl:template>
1019
1020 <xsl:template match="corpname" mode="bibliomixed.mode">
1021   <span>
1022     <xsl:call-template name="common.html.attributes"/>
1023     <xsl:apply-templates mode="bibliomixed.mode"/>
1024   </span>
1025 </xsl:template>
1026
1027 <xsl:template match="date" mode="bibliomixed.mode">
1028   <span>
1029     <xsl:call-template name="common.html.attributes"/>
1030     <xsl:apply-templates mode="bibliomixed.mode"/>
1031   </span>
1032 </xsl:template>
1033
1034 <xsl:template match="edition" mode="bibliomixed.mode">
1035   <span>
1036     <xsl:call-template name="common.html.attributes"/>
1037     <xsl:apply-templates mode="bibliomixed.mode"/>
1038   </span>
1039 </xsl:template>
1040
1041 <xsl:template match="editor" mode="bibliomixed.mode">
1042   <span>
1043     <xsl:call-template name="common.html.attributes"/>
1044     <xsl:apply-templates mode="bibliomixed.mode"/>
1045   </span>
1046 </xsl:template>
1047
1048 <xsl:template match="firstname" mode="bibliomixed.mode">
1049   <span>
1050     <xsl:call-template name="common.html.attributes"/>
1051     <xsl:apply-templates mode="bibliomixed.mode"/>
1052   </span>
1053 </xsl:template>
1054
1055 <xsl:template match="honorific" mode="bibliomixed.mode">
1056   <span>
1057     <xsl:call-template name="common.html.attributes"/>
1058     <xsl:apply-templates mode="bibliomixed.mode"/>
1059   </span>
1060 </xsl:template>
1061
1062 <xsl:template match="indexterm" mode="bibliomixed.mode">
1063   <span>
1064     <xsl:call-template name="common.html.attributes"/>
1065     <xsl:apply-templates mode="bibliomixed.mode"/>
1066   </span>
1067 </xsl:template>
1068
1069 <xsl:template match="invpartnumber" mode="bibliomixed.mode">
1070   <span>
1071     <xsl:call-template name="common.html.attributes"/>
1072     <xsl:apply-templates mode="bibliomixed.mode"/>
1073   </span>
1074 </xsl:template>
1075
1076 <xsl:template match="isbn" mode="bibliomixed.mode">
1077   <span>
1078     <xsl:call-template name="common.html.attributes"/>
1079     <xsl:apply-templates mode="bibliomixed.mode"/>
1080   </span>
1081 </xsl:template>
1082
1083 <xsl:template match="issn" mode="bibliomixed.mode">
1084   <span>
1085     <xsl:call-template name="common.html.attributes"/>
1086     <xsl:apply-templates mode="bibliomixed.mode"/>
1087   </span>
1088 </xsl:template>
1089
1090 <xsl:template match="issuenum" mode="bibliomixed.mode">
1091   <span>
1092     <xsl:call-template name="common.html.attributes"/>
1093     <xsl:apply-templates mode="bibliomixed.mode"/>
1094   </span>
1095 </xsl:template>
1096
1097 <xsl:template match="lineage" mode="bibliomixed.mode">
1098   <span>
1099     <xsl:call-template name="common.html.attributes"/>
1100     <xsl:apply-templates mode="bibliomixed.mode"/>
1101   </span>
1102 </xsl:template>
1103
1104 <xsl:template match="orgname" mode="bibliomixed.mode">
1105   <span>
1106     <xsl:call-template name="common.html.attributes"/>
1107     <xsl:apply-templates mode="bibliomixed.mode"/>
1108   </span>
1109 </xsl:template>
1110
1111 <xsl:template match="othercredit" mode="bibliomixed.mode">
1112   <span>
1113     <xsl:call-template name="common.html.attributes"/>
1114     <xsl:apply-templates mode="bibliomixed.mode"/>
1115   </span>
1116 </xsl:template>
1117
1118 <xsl:template match="othername" mode="bibliomixed.mode">
1119   <span>
1120     <xsl:call-template name="common.html.attributes"/>
1121     <xsl:apply-templates mode="bibliomixed.mode"/>
1122   </span>
1123 </xsl:template>
1124
1125 <xsl:template match="pagenums" mode="bibliomixed.mode">
1126   <span>
1127     <xsl:call-template name="common.html.attributes"/>
1128     <xsl:apply-templates mode="bibliomixed.mode"/>
1129   </span>
1130 </xsl:template>
1131
1132 <xsl:template match="printhistory" mode="bibliomixed.mode">
1133   <span>
1134     <xsl:call-template name="common.html.attributes"/>
1135     <xsl:apply-templates mode="bibliomixed.mode"/>
1136   </span>
1137 </xsl:template>
1138
1139 <xsl:template match="productname" mode="bibliomixed.mode">
1140   <span>
1141     <xsl:call-template name="common.html.attributes"/>
1142     <xsl:apply-templates mode="bibliomixed.mode"/>
1143   </span>
1144 </xsl:template>
1145
1146 <xsl:template match="productnumber" mode="bibliomixed.mode">
1147   <span>
1148     <xsl:call-template name="common.html.attributes"/>
1149     <xsl:apply-templates mode="bibliomixed.mode"/>
1150   </span>
1151 </xsl:template>
1152
1153 <xsl:template match="pubdate" mode="bibliomixed.mode">
1154   <span>
1155     <xsl:call-template name="common.html.attributes"/>
1156     <xsl:apply-templates mode="bibliomixed.mode"/>
1157   </span>
1158 </xsl:template>
1159
1160 <xsl:template match="publisher" mode="bibliomixed.mode">
1161   <span>
1162     <xsl:call-template name="common.html.attributes"/>
1163     <xsl:apply-templates mode="bibliomixed.mode"/>
1164   </span>
1165 </xsl:template>
1166
1167 <xsl:template match="publishername" mode="bibliomixed.mode">
1168   <span>
1169     <xsl:call-template name="common.html.attributes"/>
1170     <xsl:apply-templates mode="bibliomixed.mode"/>
1171   </span>
1172 </xsl:template>
1173
1174 <xsl:template match="pubsnumber" mode="bibliomixed.mode">
1175   <span>
1176     <xsl:call-template name="common.html.attributes"/>
1177     <xsl:apply-templates mode="bibliomixed.mode"/>
1178   </span>
1179 </xsl:template>
1180
1181 <xsl:template match="releaseinfo" mode="bibliomixed.mode">
1182   <span>
1183     <xsl:call-template name="common.html.attributes"/>
1184     <xsl:apply-templates mode="bibliomixed.mode"/>
1185   </span>
1186 </xsl:template>
1187
1188 <xsl:template match="revhistory" mode="bibliomixed.mode">
1189   <!-- suppressed; how could this be represented? -->
1190 </xsl:template>
1191
1192 <xsl:template match="seriesvolnums" mode="bibliomixed.mode">
1193   <span>
1194     <xsl:call-template name="common.html.attributes"/>
1195     <xsl:apply-templates mode="bibliomixed.mode"/>
1196   </span>
1197 </xsl:template>
1198
1199 <xsl:template match="subtitle" mode="bibliomixed.mode">
1200   <span>
1201     <xsl:call-template name="common.html.attributes"/>
1202     <xsl:apply-templates mode="bibliomixed.mode"/>
1203   </span>
1204 </xsl:template>
1205
1206 <xsl:template match="surname" mode="bibliomixed.mode">
1207   <span>
1208     <xsl:call-template name="common.html.attributes"/>
1209     <xsl:apply-templates mode="bibliomixed.mode"/>
1210   </span>
1211 </xsl:template>
1212
1213 <xsl:template match="title" mode="bibliomixed.mode">
1214   <span>
1215     <xsl:call-template name="common.html.attributes"/>
1216     <xsl:apply-templates mode="bibliomixed.mode"/>
1217   </span>
1218 </xsl:template>
1219
1220 <xsl:template match="titleabbrev" mode="bibliomixed.mode">
1221   <span>
1222     <xsl:call-template name="common.html.attributes"/>
1223     <xsl:apply-templates mode="bibliomixed.mode"/>
1224   </span>
1225 </xsl:template>
1226
1227 <xsl:template match="volumenum" mode="bibliomixed.mode">
1228   <span>
1229     <xsl:call-template name="common.html.attributes"/>
1230     <xsl:apply-templates mode="bibliomixed.mode"/>
1231   </span>
1232 </xsl:template>
1233
1234 <xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
1235               mode="bibliomixed.mode">
1236   <span>
1237     <xsl:call-template name="common.html.attributes"/>
1238     <xsl:apply-templates mode="bibliomixed.mode"/>
1239   </span>
1240 </xsl:template>
1241
1242 <!-- See FR #1934434 and http://doi.org -->
1243 <xsl:template match="biblioid[@class='doi']"
1244               mode="bibliomixed.mode">
1245   <span>
1246     <xsl:call-template name="common.html.attributes"/>
1247     <a href="{concat('http://dx.doi.org/', .)}">doi:<xsl:value-of select="."/></a>
1248   </span>
1249 </xsl:template>
1250
1251 <!-- ==================================================================== -->
1252
1253 </xsl:stylesheet>