]> git.evergreen-ils.org Git - working/Evergreen.git/blob - stylesheets/styleguide/docbook-xsl-1.75.2/xhtml-1_1/titlepage.xsl
stylesheet changes.
[working/Evergreen.git] / stylesheets / styleguide / docbook-xsl-1.75.2 / xhtml-1_1 / titlepage.xsl
1 <?xml version="1.0" encoding="ASCII"?>
2 <!--This file was created automatically by html2xhtml-->
3 <!--from the HTML stylesheets.-->
4 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
5
6 <!-- ********************************************************************
7      $Id: titlepage.xsl 8491 2009-07-19 10:02:57Z mzjn $
8      ********************************************************************
9
10      This file is part of the XSL DocBook Stylesheet distribution.
11      See ../README or http://docbook.sf.net/release/xsl/current/ for
12      copyright and other information.
13
14      ******************************************************************** -->
15
16 <!-- ==================================================================== -->
17
18 <xsl:attribute-set name="book.titlepage.recto.style"/>
19 <xsl:attribute-set name="book.titlepage.verso.style"/>
20
21 <xsl:attribute-set name="article.titlepage.recto.style"/>
22 <xsl:attribute-set name="article.titlepage.verso.style"/>
23
24 <xsl:attribute-set name="set.titlepage.recto.style"/>
25 <xsl:attribute-set name="set.titlepage.verso.style"/>
26
27 <xsl:attribute-set name="part.titlepage.recto.style"/>
28 <xsl:attribute-set name="part.titlepage.verso.style"/>
29
30 <xsl:attribute-set name="partintro.titlepage.recto.style"/>
31 <xsl:attribute-set name="partintro.titlepage.verso.style"/>
32
33 <xsl:attribute-set name="reference.titlepage.recto.style"/>
34 <xsl:attribute-set name="reference.titlepage.verso.style"/>
35
36 <xsl:attribute-set name="refentry.titlepage.recto.style"/>
37 <xsl:attribute-set name="refentry.titlepage.verso.style"/>
38
39 <xsl:attribute-set name="dedication.titlepage.recto.style"/>
40 <xsl:attribute-set name="dedication.titlepage.verso.style"/>
41
42 <xsl:attribute-set name="acknowledgements.titlepage.recto.style"/>
43 <xsl:attribute-set name="acknowledgements.titlepage.verso.style"/>
44
45 <xsl:attribute-set name="preface.titlepage.recto.style"/>
46 <xsl:attribute-set name="preface.titlepage.verso.style"/>
47
48 <xsl:attribute-set name="chapter.titlepage.recto.style"/>
49 <xsl:attribute-set name="chapter.titlepage.verso.style"/>
50
51 <xsl:attribute-set name="appendix.titlepage.recto.style"/>
52 <xsl:attribute-set name="appendix.titlepage.verso.style"/>
53
54 <xsl:attribute-set name="bibliography.titlepage.recto.style"/>
55 <xsl:attribute-set name="bibliography.titlepage.verso.style"/>
56
57 <xsl:attribute-set name="glossary.titlepage.recto.style"/>
58 <xsl:attribute-set name="glossary.titlepage.verso.style"/>
59
60 <xsl:attribute-set name="index.titlepage.recto.style"/>
61 <xsl:attribute-set name="index.titlepage.verso.style"/>
62
63 <xsl:attribute-set name="setindex.titlepage.recto.style"/>
64 <xsl:attribute-set name="setindex.titlepage.verso.style"/>
65
66 <xsl:attribute-set name="section.titlepage.recto.style"/>
67 <xsl:attribute-set name="section.titlepage.verso.style"/>
68
69 <xsl:attribute-set name="sect1.titlepage.recto.style" use-attribute-sets="section.titlepage.recto.style"/>
70 <xsl:attribute-set name="sect1.titlepage.verso.style" use-attribute-sets="section.titlepage.verso.style"/>
71
72 <xsl:attribute-set name="sect2.titlepage.recto.style" use-attribute-sets="section.titlepage.recto.style"/>
73 <xsl:attribute-set name="sect2.titlepage.verso.style" use-attribute-sets="section.titlepage.verso.style"/>
74
75 <xsl:attribute-set name="sect3.titlepage.recto.style" use-attribute-sets="section.titlepage.recto.style"/>
76 <xsl:attribute-set name="sect3.titlepage.verso.style" use-attribute-sets="section.titlepage.verso.style"/>
77
78 <xsl:attribute-set name="sect4.titlepage.recto.style" use-attribute-sets="section.titlepage.recto.style"/>
79 <xsl:attribute-set name="sect4.titlepage.verso.style" use-attribute-sets="section.titlepage.verso.style"/>
80
81 <xsl:attribute-set name="sect5.titlepage.recto.style" use-attribute-sets="section.titlepage.recto.style"/>
82 <xsl:attribute-set name="sect5.titlepage.verso.style" use-attribute-sets="section.titlepage.verso.style"/>
83
84 <xsl:attribute-set name="simplesect.titlepage.recto.style" use-attribute-sets="section.titlepage.recto.style"/>
85 <xsl:attribute-set name="simplesect.titlepage.verso.style" use-attribute-sets="section.titlepage.verso.style"/>
86
87 <xsl:attribute-set name="table.of.contents.titlepage.recto.style"/>
88 <xsl:attribute-set name="table.of.contents.titlepage.verso.style"/>
89
90 <xsl:attribute-set name="list.of.tables.titlepage.recto.style"/>
91 <xsl:attribute-set name="list.of.tables.contents.titlepage.verso.style"/>
92
93 <xsl:attribute-set name="list.of.figures.titlepage.recto.style"/>
94 <xsl:attribute-set name="list.of.figures.contents.titlepage.verso.style"/>
95
96 <xsl:attribute-set name="list.of.equations.titlepage.recto.style"/>
97 <xsl:attribute-set name="list.of.equations.contents.titlepage.verso.style"/>
98
99 <xsl:attribute-set name="list.of.examples.titlepage.recto.style"/>
100 <xsl:attribute-set name="list.of.examples.contents.titlepage.verso.style"/>
101
102 <xsl:attribute-set name="list.of.unknowns.titlepage.recto.style"/>
103 <xsl:attribute-set name="list.of.unknowns.contents.titlepage.verso.style"/>
104
105 <!-- ==================================================================== -->
106
107 <xsl:template match="*" mode="titlepage.mode">
108   <!-- if an element isn't found in this mode, try the default mode -->
109   <xsl:apply-templates select="."/>
110 </xsl:template>
111
112 <xsl:template match="abbrev" mode="titlepage.mode">
113   <span>
114     <xsl:apply-templates select="." mode="common.html.attributes"/>
115     <xsl:apply-templates mode="titlepage.mode"/>
116     <br/>
117   </span>
118 </xsl:template>
119
120 <xsl:template match="abstract" mode="titlepage.mode">
121   <div>
122     <xsl:apply-templates select="." mode="common.html.attributes"/>
123     <xsl:call-template name="anchor"/>
124     <xsl:if test="$abstract.notitle.enabled = 0">
125       <xsl:call-template name="formal.object.heading">
126         <xsl:with-param name="title">
127           <xsl:apply-templates select="." mode="title.markup"/>
128         </xsl:with-param>
129       </xsl:call-template>
130     </xsl:if>
131     <xsl:apply-templates mode="titlepage.mode"/>
132     <xsl:call-template name="process.footnotes"/>
133   </div>
134 </xsl:template>
135
136 <xsl:template match="abstract/title" mode="titlepage.mode">
137 </xsl:template>
138
139 <xsl:template match="address" mode="titlepage.mode">
140   <xsl:param name="suppress-numbers" select="'0'"/>
141
142   <xsl:variable name="rtf">
143     <xsl:apply-templates mode="titlepage.mode"/>
144   </xsl:variable>
145
146   <xsl:choose>
147     <xsl:when test="$suppress-numbers = '0'                     and @linenumbering = 'numbered'                     and $use.extensions != '0'                     and $linenumbering.extension != '0'">
148       <div>
149         <xsl:apply-templates select="." mode="common.html.attributes"/>
150         <xsl:call-template name="paragraph">
151           <xsl:with-param name="content">
152             <xsl:call-template name="number.rtf.lines">
153               <xsl:with-param name="rtf" select="$rtf"/>
154             </xsl:call-template>
155           </xsl:with-param>
156         </xsl:call-template>
157       </div>
158     </xsl:when>
159
160     <xsl:otherwise>
161       <div>
162         <xsl:apply-templates select="." mode="common.html.attributes"/>
163         <xsl:call-template name="paragraph">
164           <xsl:with-param name="content">
165             <xsl:call-template name="make-verbatim">
166               <xsl:with-param name="rtf" select="$rtf"/>
167             </xsl:call-template>
168           </xsl:with-param>
169         </xsl:call-template>
170       </div>
171     </xsl:otherwise>
172   </xsl:choose>
173 </xsl:template>
174
175 <xsl:template match="affiliation" mode="titlepage.mode">
176   <div>
177     <xsl:apply-templates select="." mode="common.html.attributes"/>
178     <xsl:apply-templates mode="titlepage.mode"/>
179   </div>
180 </xsl:template>
181
182 <xsl:template match="artpagenums" mode="titlepage.mode">
183   <span>
184     <xsl:apply-templates select="." mode="common.html.attributes"/>
185     <xsl:apply-templates mode="titlepage.mode"/>
186     <br/>
187   </span>
188 </xsl:template>
189
190 <xsl:template match="author|editor" mode="titlepage.mode">
191   <xsl:call-template name="credits.div"/>
192 </xsl:template>
193
194 <xsl:template name="credits.div">
195   <div>
196     <xsl:apply-templates select="." mode="common.html.attributes"/>
197     <xsl:if test="self::editor[position()=1] and not($editedby.enabled = 0)">
198       <h4 class="editedby"><xsl:call-template name="gentext.edited.by"/></h4>
199     </xsl:if>
200     <h3>
201       <xsl:apply-templates select="." mode="common.html.attributes"/>
202       <xsl:choose>
203         <xsl:when test="orgname">
204           <xsl:apply-templates/>
205         </xsl:when>
206         <xsl:otherwise>
207           <xsl:call-template name="person.name"/>
208         </xsl:otherwise>
209       </xsl:choose>
210     </h3>
211     <xsl:if test="not($contrib.inline.enabled = 0)">
212       <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
213     </xsl:if>
214     <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
215     <xsl:apply-templates mode="titlepage.mode" select="email"/>
216     <xsl:if test="not($blurb.on.titlepage.enabled = 0)">
217       <xsl:choose>
218         <xsl:when test="$contrib.inline.enabled = 0">
219           <xsl:apply-templates mode="titlepage.mode" select="contrib|authorblurb|personblurb"/>
220         </xsl:when>
221         <xsl:otherwise>
222           <xsl:apply-templates mode="titlepage.mode" select="authorblurb|personblurb"/>
223         </xsl:otherwise>
224       </xsl:choose>
225     </xsl:if>
226   </div>
227 </xsl:template>
228
229 <xsl:template match="authorblurb|personblurb" mode="titlepage.mode">
230   <div>
231     <xsl:apply-templates select="." mode="common.html.attributes"/>
232     <xsl:apply-templates mode="titlepage.mode"/>
233   </div>
234 </xsl:template>
235
236 <xsl:template match="authorgroup" mode="titlepage.mode">
237   <div>
238     <xsl:apply-templates select="." mode="common.html.attributes"/>
239     <xsl:if test="parent::refentryinfo">
240       <h2>Authors</h2>
241     </xsl:if>
242       
243     <xsl:call-template name="anchor"/>
244     <xsl:apply-templates mode="titlepage.mode"/>
245   </div>
246 </xsl:template>
247
248 <xsl:template match="authorinitials" mode="titlepage.mode">
249   <span>
250     <xsl:apply-templates select="." mode="common.html.attributes"/>
251     <xsl:apply-templates mode="titlepage.mode"/>
252     <br/>
253   </span>
254 </xsl:template>
255
256 <xsl:template match="bibliomisc" mode="titlepage.mode">
257   <xsl:apply-templates mode="titlepage.mode"/>
258 </xsl:template>
259
260 <xsl:template match="bibliomset" mode="titlepage.mode">
261   <xsl:apply-templates mode="titlepage.mode"/>
262 </xsl:template>
263
264 <xsl:template match="collab" mode="titlepage.mode">
265   <span>
266     <xsl:apply-templates select="." mode="common.html.attributes"/>
267     <xsl:apply-templates mode="titlepage.mode"/>
268     <br/>
269   </span>
270 </xsl:template>
271
272 <xsl:template match="collabname" mode="titlepage.mode">
273   <span>
274     <xsl:apply-templates select="." mode="common.html.attributes"/>
275     <xsl:apply-templates mode="titlepage.mode"/>
276   </span>
277 </xsl:template>
278
279 <xsl:template match="confgroup" mode="titlepage.mode">
280   <div>
281     <xsl:apply-templates select="." mode="common.html.attributes"/>
282     <xsl:apply-templates mode="titlepage.mode"/>
283   </div>
284 </xsl:template>
285
286 <xsl:template match="confdates" mode="titlepage.mode">
287   <span>
288     <xsl:apply-templates select="." mode="common.html.attributes"/>
289     <xsl:apply-templates mode="titlepage.mode"/>
290     <br/>
291   </span>
292 </xsl:template>
293
294 <xsl:template match="confsponsor" mode="titlepage.mode">
295   <span>
296     <xsl:apply-templates select="." mode="common.html.attributes"/>
297     <xsl:apply-templates mode="titlepage.mode"/>
298     <br/>
299   </span>
300 </xsl:template>
301
302 <xsl:template match="conftitle" mode="titlepage.mode">
303   <span>
304     <xsl:apply-templates select="." mode="common.html.attributes"/>
305     <xsl:apply-templates mode="titlepage.mode"/>
306     <br/>
307   </span>
308 </xsl:template>
309
310 <xsl:template match="confnum" mode="titlepage.mode">
311   <!-- suppress -->
312 </xsl:template>
313
314 <xsl:template match="contractnum" mode="titlepage.mode">
315   <span>
316     <xsl:apply-templates select="." mode="common.html.attributes"/>
317     <xsl:apply-templates mode="titlepage.mode"/>
318     <br/>
319   </span>
320 </xsl:template>
321
322 <xsl:template match="contractsponsor" mode="titlepage.mode">
323   <span>
324     <xsl:apply-templates select="." mode="common.html.attributes"/>
325     <xsl:apply-templates mode="titlepage.mode"/>
326     <br/>
327   </span>
328 </xsl:template>
329
330 <xsl:template match="contrib" mode="titlepage.mode">
331   <xsl:choose>
332     <xsl:when test="not($contrib.inline.enabled = 0)">
333       <span>
334         <xsl:apply-templates select="." mode="common.html.attributes"/>
335         <xsl:apply-templates mode="titlepage.mode"/>
336       </span><xsl:text>&#160;</xsl:text>
337     </xsl:when>
338     <xsl:otherwise>
339       <div>
340         <xsl:apply-templates select="." mode="common.html.attributes"/>
341         <p><xsl:apply-templates mode="titlepage.mode"/></p>
342       </div>
343     </xsl:otherwise>
344   </xsl:choose>
345 </xsl:template>
346
347 <xsl:template match="copyright" mode="titlepage.mode">
348
349   <xsl:if test="generate-id() = generate-id(//refentryinfo/copyright[1])       and ($stylesheet.result.type = 'html' or $stylesheet.result.type = 'xhtml')">
350     <h2>Copyright</h2>
351   </xsl:if>
352
353   <p>
354     <xsl:apply-templates select="." mode="common.html.attributes"/>
355     <xsl:call-template name="gentext">
356       <xsl:with-param name="key" select="'Copyright'"/>
357     </xsl:call-template>
358     <xsl:call-template name="gentext.space"/>
359     <xsl:call-template name="dingbat">
360       <xsl:with-param name="dingbat">copyright</xsl:with-param>
361     </xsl:call-template>
362     <xsl:call-template name="gentext.space"/>
363     <xsl:call-template name="copyright.years">
364       <xsl:with-param name="years" select="year"/>
365       <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
366       <xsl:with-param name="single.year.ranges" select="$make.single.year.ranges"/>
367     </xsl:call-template>
368     <xsl:call-template name="gentext.space"/>
369     <xsl:apply-templates select="holder" mode="titlepage.mode"/>
370   </p>
371 </xsl:template>
372
373 <xsl:template match="year" mode="titlepage.mode">
374   <xsl:choose>
375     <xsl:when test="$show.revisionflag != 0 and @revisionflag">
376       <span class="{@revisionflag}">
377         <xsl:apply-templates mode="titlepage.mode"/>
378       </span>
379     </xsl:when>
380     <xsl:otherwise>
381       <xsl:apply-templates mode="titlepage.mode"/>
382     </xsl:otherwise>
383   </xsl:choose>
384 </xsl:template>
385
386 <xsl:template match="holder" mode="titlepage.mode">
387   <xsl:choose>
388     <xsl:when test="$show.revisionflag != 0 and @revisionflag">
389       <span class="{@revisionflag}">
390         <xsl:apply-templates mode="titlepage.mode"/>
391       </span>
392     </xsl:when>
393     <xsl:otherwise>
394       <xsl:apply-templates mode="titlepage.mode"/>
395     </xsl:otherwise>
396   </xsl:choose>
397   <xsl:if test="position() &lt; last()">
398     <xsl:text>, </xsl:text>
399   </xsl:if>
400 </xsl:template>
401
402 <xsl:template match="corpauthor" mode="titlepage.mode">
403   <h3>
404     <xsl:apply-templates select="." mode="common.html.attributes"/>
405     <xsl:apply-templates mode="titlepage.mode"/>
406   </h3>
407 </xsl:template>
408
409 <xsl:template match="corpcredit" mode="titlepage.mode">
410   <span>
411     <xsl:apply-templates select="." mode="common.html.attributes"/>
412     <xsl:apply-templates mode="titlepage.mode"/>
413     <br/>
414   </span>
415 </xsl:template>
416
417 <xsl:template match="corpname" mode="titlepage.mode">
418   <span>
419     <xsl:apply-templates select="." mode="common.html.attributes"/>
420     <xsl:apply-templates mode="titlepage.mode"/>
421     <br/>
422   </span>
423 </xsl:template>
424
425 <xsl:template match="date" mode="titlepage.mode">
426   <span>
427     <xsl:apply-templates select="." mode="common.html.attributes"/>
428     <xsl:apply-templates mode="titlepage.mode"/>
429     <br/>
430   </span>
431 </xsl:template>
432
433 <xsl:template match="edition" mode="titlepage.mode">
434   <p>
435     <xsl:apply-templates select="." mode="common.html.attributes"/>
436     <xsl:apply-templates mode="titlepage.mode"/>
437     <xsl:call-template name="gentext.space"/>
438     <xsl:call-template name="gentext">
439       <xsl:with-param name="key" select="'Edition'"/>
440     </xsl:call-template>
441   </p>
442 </xsl:template>
443
444 <xsl:template match="email" mode="titlepage.mode">
445   <!-- use the normal e-mail handling code -->
446   <xsl:apply-templates select="."/>
447 </xsl:template>
448
449 <xsl:template match="firstname" mode="titlepage.mode">
450   <span>
451     <xsl:apply-templates select="." mode="common.html.attributes"/>
452     <xsl:apply-templates mode="titlepage.mode"/>
453     <br/>
454   </span>
455 </xsl:template>
456
457 <xsl:template match="graphic" mode="titlepage.mode">
458   <!-- use the normal graphic handling code -->
459   <xsl:apply-templates select="."/>
460 </xsl:template>
461
462 <xsl:template match="honorific" mode="titlepage.mode">
463   <span>
464     <xsl:apply-templates select="." mode="common.html.attributes"/>
465     <xsl:apply-templates mode="titlepage.mode"/>
466     <br/>
467   </span>
468 </xsl:template>
469
470 <xsl:template match="isbn" mode="titlepage.mode">
471   <span>
472     <xsl:apply-templates select="." mode="common.html.attributes"/>
473     <xsl:apply-templates mode="titlepage.mode"/>
474     <br/>
475   </span>
476 </xsl:template>
477
478 <xsl:template match="issn" mode="titlepage.mode">
479   <span>
480     <xsl:apply-templates select="." mode="common.html.attributes"/>
481     <xsl:apply-templates mode="titlepage.mode"/>
482     <br/>
483   </span>
484 </xsl:template>
485
486 <xsl:template match="biblioid" mode="titlepage.mode">
487   <span>
488     <xsl:apply-templates select="." mode="common.html.attributes"/>
489     <xsl:apply-templates mode="titlepage.mode"/>
490     <br/>
491   </span>
492 </xsl:template>
493
494 <xsl:template match="itermset" mode="titlepage.mode">
495 </xsl:template>
496
497 <xsl:template match="invpartnumber" mode="titlepage.mode">
498   <span>
499     <xsl:apply-templates select="." mode="common.html.attributes"/>
500     <xsl:apply-templates mode="titlepage.mode"/>
501     <br/>
502   </span>
503 </xsl:template>
504
505 <xsl:template match="issuenum" mode="titlepage.mode">
506   <span>
507     <xsl:apply-templates select="." mode="common.html.attributes"/>
508     <xsl:apply-templates mode="titlepage.mode"/>
509     <br/>
510   </span>
511 </xsl:template>
512
513 <xsl:template match="jobtitle" mode="titlepage.mode">
514   <span>
515     <xsl:apply-templates select="." mode="common.html.attributes"/>
516     <xsl:apply-templates mode="titlepage.mode"/>
517     <br/>
518   </span>
519 </xsl:template>
520
521 <xsl:template match="keywordset" mode="titlepage.mode">
522 </xsl:template>
523
524 <xsl:template match="legalnotice" mode="titlepage.mode">
525   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
526
527   <xsl:choose>
528     <xsl:when test="$generate.legalnotice.link != 0">
529       
530       <!-- Compute name of legalnotice file -->
531       <xsl:variable name="file">
532         <xsl:call-template name="ln.or.rh.filename"/>
533       </xsl:variable>
534
535       <xsl:variable name="filename">
536         <xsl:call-template name="make-relative-filename">
537           <xsl:with-param name="base.dir" select="$base.dir"/>
538           <xsl:with-param name="base.name" select="$file"/>
539         </xsl:call-template>
540       </xsl:variable>
541
542       <xsl:variable name="title">
543         <xsl:apply-templates select="." mode="title.markup"/>
544       </xsl:variable>
545
546       <a href="{$file}">
547         <xsl:copy-of select="$title"/>
548       </a>
549
550       <xsl:call-template name="write.chunk">
551         <xsl:with-param name="filename" select="$filename"/>
552         <xsl:with-param name="quiet" select="$chunk.quietly"/>
553         <xsl:with-param name="content">
554         <xsl:call-template name="user.preroot"/>
555           <html>
556             <head>
557               <xsl:call-template name="system.head.content"/>
558               <xsl:call-template name="head.content"/>
559               <xsl:call-template name="user.head.content"/>
560             </head>
561             <body>
562               <xsl:call-template name="body.attributes"/>
563               <div>
564                 <xsl:apply-templates select="." mode="common.html.attributes"/>
565                 <xsl:apply-templates mode="titlepage.mode"/>
566               </div>
567             </body>
568           </html>
569           <xsl:value-of select="$chunk.append"/>
570         </xsl:with-param>
571       </xsl:call-template>
572     </xsl:when>
573     <xsl:otherwise>
574       <div>
575         <xsl:apply-templates select="." mode="common.html.attributes"/>
576         <a id="{$id}"/>
577         <xsl:apply-templates mode="titlepage.mode"/>
578       </div>
579     </xsl:otherwise>
580   </xsl:choose>
581 </xsl:template>
582
583 <xsl:template match="legalnotice/title" mode="titlepage.mode">
584   <p class="legalnotice-title"><b><xsl:apply-templates/></b></p>
585 </xsl:template>
586
587 <xsl:template match="lineage" mode="titlepage.mode">
588   <span>
589     <xsl:apply-templates select="." mode="common.html.attributes"/>
590     <xsl:apply-templates mode="titlepage.mode"/>
591     <br/>
592   </span>
593 </xsl:template>
594
595 <xsl:template match="modespec" mode="titlepage.mode">
596 </xsl:template>
597
598 <xsl:template match="orgdiv" mode="titlepage.mode">
599   <xsl:if test="preceding-sibling::*[1][self::orgname]">
600     <xsl:text> </xsl:text>
601   </xsl:if>
602   <span>
603     <xsl:apply-templates select="." mode="common.html.attributes"/>
604     <xsl:apply-templates mode="titlepage.mode"/>
605     <br/>
606   </span>
607 </xsl:template>
608
609 <xsl:template match="orgname" mode="titlepage.mode">
610   <span>
611     <xsl:apply-templates select="." mode="common.html.attributes"/>
612     <xsl:apply-templates mode="titlepage.mode"/>
613     <br/>
614   </span>
615 </xsl:template>
616
617 <xsl:template match="othercredit" mode="titlepage.mode">
618 <xsl:choose>
619   <xsl:when test="not($othercredit.like.author.enabled = 0)">
620   <xsl:variable name="contrib" select="string(contrib)"/>
621   <xsl:choose>
622     <xsl:when test="contrib">
623       <xsl:if test="not(preceding-sibling::othercredit[string(contrib)=$contrib])">
624         <xsl:call-template name="paragraph">
625           <xsl:with-param name="class" select="local-name(.)"/>
626           <xsl:with-param name="content">
627             <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
628             <xsl:text>: </xsl:text>
629             <xsl:call-template name="person.name"/>
630             <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
631             <xsl:apply-templates select="following-sibling::othercredit[string(contrib)=$contrib]" mode="titlepage.othercredits"/>
632           </xsl:with-param>
633         </xsl:call-template>
634       </xsl:if>
635     </xsl:when>
636     <xsl:otherwise>
637       <xsl:call-template name="paragraph">
638         <xsl:with-param name="class" select="local-name(.)"/>
639         <xsl:with-param name="content">
640           <xsl:call-template name="person.name"/>
641         </xsl:with-param>
642       </xsl:call-template>
643       <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
644     </xsl:otherwise>
645   </xsl:choose>
646   </xsl:when>
647   <xsl:otherwise>
648     <xsl:call-template name="credits.div"/>
649   </xsl:otherwise>
650 </xsl:choose>
651 </xsl:template>
652
653 <xsl:template match="othercredit" mode="titlepage.othercredits">
654   <xsl:text>, </xsl:text>
655   <xsl:call-template name="person.name"/>
656 </xsl:template>
657
658 <xsl:template match="othername" mode="titlepage.mode">
659   <span>
660     <xsl:apply-templates select="." mode="common.html.attributes"/>
661     <xsl:apply-templates mode="titlepage.mode"/>
662     <br/>
663   </span>
664 </xsl:template>
665
666 <xsl:template match="pagenums" mode="titlepage.mode">
667   <span>
668     <xsl:apply-templates select="." mode="common.html.attributes"/>
669     <xsl:apply-templates mode="titlepage.mode"/>
670     <br/>
671   </span>
672 </xsl:template>
673
674 <xsl:template match="printhistory" mode="titlepage.mode">
675   <div>
676     <xsl:apply-templates select="." mode="common.html.attributes"/>
677     <xsl:apply-templates mode="titlepage.mode"/>
678   </div>
679 </xsl:template>
680
681 <xsl:template match="productname" mode="titlepage.mode">
682   <span>
683     <xsl:apply-templates select="." mode="common.html.attributes"/>
684     <xsl:apply-templates mode="titlepage.mode"/>
685     <br/>
686   </span>
687 </xsl:template>
688
689 <xsl:template match="productnumber" mode="titlepage.mode">
690   <span>
691     <xsl:apply-templates select="." mode="common.html.attributes"/>
692     <xsl:apply-templates mode="titlepage.mode"/>
693     <br/>
694   </span>
695 </xsl:template>
696
697 <xsl:template match="pubdate" mode="titlepage.mode">
698   <xsl:call-template name="paragraph">
699     <xsl:with-param name="class" select="local-name(.)"/>
700     <xsl:with-param name="content">
701       <xsl:apply-templates mode="titlepage.mode"/>
702     </xsl:with-param>
703   </xsl:call-template>
704 </xsl:template>
705
706 <xsl:template match="publisher" mode="titlepage.mode">
707   <xsl:call-template name="paragraph">
708     <xsl:with-param name="class" select="local-name(.)"/>
709     <xsl:with-param name="content">
710       <xsl:apply-templates mode="titlepage.mode"/>
711     </xsl:with-param>
712   </xsl:call-template>
713 </xsl:template>
714
715 <xsl:template match="publishername" mode="titlepage.mode">
716   <span>
717     <xsl:apply-templates select="." mode="common.html.attributes"/>
718     <xsl:apply-templates mode="titlepage.mode"/>
719     <br/>
720   </span>
721 </xsl:template>
722
723 <xsl:template match="pubsnumber" mode="titlepage.mode">
724   <span>
725     <xsl:apply-templates select="." mode="common.html.attributes"/>
726     <xsl:apply-templates mode="titlepage.mode"/>
727     <br/>
728   </span>
729 </xsl:template>
730
731 <xsl:template match="releaseinfo" mode="titlepage.mode">
732   <xsl:call-template name="paragraph">
733     <xsl:with-param name="class" select="local-name(.)"/>
734     <xsl:with-param name="content">
735       <xsl:apply-templates mode="titlepage.mode"/>
736     </xsl:with-param>
737   </xsl:call-template>
738 </xsl:template>
739
740 <xsl:template match="revhistory" mode="titlepage.mode">
741   <xsl:variable name="numcols">
742     <xsl:choose>
743       <xsl:when test=".//authorinitials|.//author">3</xsl:when>
744       <xsl:otherwise>2</xsl:otherwise>
745     </xsl:choose>
746   </xsl:variable>
747
748   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
749
750   <xsl:variable name="title">
751     <xsl:call-template name="gentext">
752       <xsl:with-param name="key">RevHistory</xsl:with-param>
753     </xsl:call-template>
754   </xsl:variable>
755
756   <xsl:variable name="contents">
757     <div>
758       <xsl:apply-templates select="." mode="common.html.attributes"/>
759       <table border="1" width="100%" summary="Revision history">
760         <tr>
761           <th align="{$direction.align.start}" valign="top" colspan="{$numcols}">
762             <b>
763               <xsl:call-template name="gentext">
764                 <xsl:with-param name="key" select="'RevHistory'"/>
765               </xsl:call-template>
766             </b>
767           </th>
768         </tr>
769         <xsl:apply-templates mode="titlepage.mode">
770           <xsl:with-param name="numcols" select="$numcols"/>
771         </xsl:apply-templates>
772       </table>
773     </div>
774   </xsl:variable>
775   
776   <xsl:choose>
777     <xsl:when test="$generate.revhistory.link != 0">
778       
779       <!-- Compute name of revhistory file -->
780       <xsl:variable name="file">
781         <xsl:call-template name="ln.or.rh.filename">
782           <xsl:with-param name="is.ln" select="false()"/>
783         </xsl:call-template>
784       </xsl:variable>
785
786       <xsl:variable name="filename">
787         <xsl:call-template name="make-relative-filename">
788           <xsl:with-param name="base.dir" select="$base.dir"/>
789           <xsl:with-param name="base.name" select="$file"/>
790         </xsl:call-template>
791       </xsl:variable>
792
793       <a href="{$file}">
794         <xsl:copy-of select="$title"/>
795       </a>
796
797       <xsl:call-template name="write.chunk">
798         <xsl:with-param name="filename" select="$filename"/>
799         <xsl:with-param name="quiet" select="$chunk.quietly"/>
800         <xsl:with-param name="content">
801         <xsl:call-template name="user.preroot"/>
802           <html>
803             <head>
804               <xsl:call-template name="system.head.content"/>
805               <xsl:call-template name="head.content">
806                 <xsl:with-param name="title">
807                     <xsl:value-of select="$title"/>
808                     <xsl:if test="../../title">
809                         <xsl:value-of select="concat(' (', ../../title, ')')"/>
810                     </xsl:if>
811                 </xsl:with-param>
812               </xsl:call-template>
813               <xsl:call-template name="user.head.content"/>
814             </head>
815             <body>
816               <xsl:call-template name="body.attributes"/>
817               <xsl:copy-of select="$contents"/>
818             </body>
819           </html>
820           <xsl:text>
821 </xsl:text>
822         </xsl:with-param>
823       </xsl:call-template>
824     </xsl:when>
825     <xsl:otherwise>
826       <xsl:copy-of select="$contents"/>
827     </xsl:otherwise>
828   </xsl:choose>
829 </xsl:template>
830
831 <xsl:template match="revhistory/revision" mode="titlepage.mode">
832   <xsl:param name="numcols" select="'3'"/>
833   <xsl:variable name="revnumber" select="revnumber"/>
834   <xsl:variable name="revdate" select="date"/>
835   <xsl:variable name="revauthor" select="authorinitials|author"/>
836   <xsl:variable name="revremark" select="revremark|revdescription"/>
837   <tr>
838     <td align="{$direction.align.start}">
839       <xsl:if test="$revnumber">
840         <xsl:call-template name="gentext">
841           <xsl:with-param name="key" select="'Revision'"/>
842         </xsl:call-template>
843         <xsl:call-template name="gentext.space"/>
844         <xsl:apply-templates select="$revnumber[1]" mode="titlepage.mode"/>
845       </xsl:if>
846     </td>
847     <td align="{$direction.align.start}">
848       <xsl:apply-templates select="$revdate[1]" mode="titlepage.mode"/>
849     </td>
850     <xsl:choose>
851       <xsl:when test="$revauthor">
852         <td align="{$direction.align.start}">
853           <xsl:for-each select="$revauthor">
854             <xsl:apply-templates select="." mode="titlepage.mode"/>
855             <xsl:if test="position() != last()">
856               <xsl:text>, </xsl:text>
857             </xsl:if>
858           </xsl:for-each>
859         </td>
860       </xsl:when>
861       <xsl:when test="$numcols &gt; 2">
862         <td>&#160;</td>
863       </xsl:when>
864       <xsl:otherwise/>
865     </xsl:choose>
866   </tr>
867   <xsl:if test="$revremark">
868     <tr>
869       <td align="{$direction.align.start}" colspan="{$numcols}">
870         <xsl:apply-templates select="$revremark[1]" mode="titlepage.mode"/>
871       </td>
872     </tr>
873   </xsl:if>
874 </xsl:template>
875
876 <xsl:template match="revision/revnumber" mode="titlepage.mode">
877   <xsl:apply-templates mode="titlepage.mode"/>
878 </xsl:template>
879
880 <xsl:template match="revision/date" mode="titlepage.mode">
881   <xsl:apply-templates mode="titlepage.mode"/>
882 </xsl:template>
883
884 <xsl:template match="revision/authorinitials" mode="titlepage.mode">
885   <xsl:apply-templates mode="titlepage.mode"/>
886 </xsl:template>
887
888 <xsl:template match="revision/author" mode="titlepage.mode">
889   <xsl:apply-templates mode="titlepage.mode"/>
890 </xsl:template>
891
892 <xsl:template match="revision/revremark" mode="titlepage.mode">
893   <xsl:apply-templates mode="titlepage.mode"/>
894 </xsl:template>
895
896 <xsl:template match="revision/revdescription" mode="titlepage.mode">
897   <xsl:apply-templates mode="titlepage.mode"/>
898 </xsl:template>
899
900 <xsl:template match="seriesvolnums" mode="titlepage.mode">
901   <span>
902     <xsl:apply-templates select="." mode="common.html.attributes"/>
903     <xsl:apply-templates mode="titlepage.mode"/>
904     <br/>
905   </span>
906 </xsl:template>
907
908 <xsl:template match="shortaffil" mode="titlepage.mode">
909   <span>
910     <xsl:apply-templates select="." mode="common.html.attributes"/>
911     <xsl:apply-templates mode="titlepage.mode"/>
912     <br/>
913   </span>
914 </xsl:template>
915
916 <xsl:template match="subjectset" mode="titlepage.mode">
917 </xsl:template>
918
919 <xsl:template match="subtitle" mode="titlepage.mode">
920   <h2>
921     <xsl:apply-templates select="." mode="common.html.attributes"/>
922     <xsl:apply-templates mode="titlepage.mode"/>
923   </h2>
924 </xsl:template>
925
926 <xsl:template match="surname" mode="titlepage.mode">
927   <span>
928     <xsl:apply-templates select="." mode="common.html.attributes"/>
929     <xsl:apply-templates mode="titlepage.mode"/>
930     <br/>
931   </span>
932 </xsl:template>
933
934 <xsl:template match="title" mode="titlepage.mode">
935   <xsl:variable name="id">
936     <xsl:choose>
937       <!-- if title is in an *info wrapper, get the grandparent -->
938       <xsl:when test="contains(local-name(..), 'info')">
939         <xsl:call-template name="object.id">
940           <xsl:with-param name="object" select="../.."/>
941         </xsl:call-template>
942       </xsl:when>
943       <xsl:otherwise>
944         <xsl:call-template name="object.id">
945           <xsl:with-param name="object" select=".."/>
946         </xsl:call-template>
947       </xsl:otherwise>
948     </xsl:choose>
949   </xsl:variable>
950
951   <h1>
952     <xsl:apply-templates select="." mode="common.html.attributes"/>
953     <xsl:if test="$generate.id.attributes = 0">
954       <a id="{$id}"/>
955     </xsl:if>
956     <xsl:choose>
957       <xsl:when test="$show.revisionflag != 0 and @revisionflag">
958         <span class="{@revisionflag}">
959           <xsl:apply-templates mode="titlepage.mode"/>
960         </span>
961       </xsl:when>
962       <xsl:otherwise>
963         <xsl:apply-templates mode="titlepage.mode"/>
964       </xsl:otherwise>
965     </xsl:choose>
966   </h1>
967 </xsl:template>
968
969 <xsl:template match="titleabbrev" mode="titlepage.mode">
970   <!-- nop; title abbreviations don't belong on the title page! -->
971 </xsl:template>
972
973 <xsl:template match="volumenum" mode="titlepage.mode">
974   <span>
975     <xsl:apply-templates select="." mode="common.html.attributes"/>
976     <xsl:apply-templates mode="titlepage.mode"/>
977     <br/>
978   </span>
979 </xsl:template>
980
981 <!-- This template computes the filename for legalnotice and revhistory chunks -->
982 <xsl:template name="ln.or.rh.filename">
983   <xsl:param name="node" select="."/>
984   <xsl:param name="is.ln" select="true()"/>
985
986   <xsl:variable name="dbhtml-filename">
987     <xsl:call-template name="pi.dbhtml_filename">
988       <xsl:with-param name="node" select="$node"/>
989     </xsl:call-template>
990   </xsl:variable>
991  
992   <xsl:choose>
993     <!--  1. If there is a dbhtml_filename PI, use that -->
994     <xsl:when test="$dbhtml-filename != ''">
995       <xsl:value-of select="$dbhtml-filename"/>
996     </xsl:when>
997     <xsl:when test="($node/@id or $node/@xml:id) and not($use.id.as.filename = 0)">
998       <!-- * 2. If this legalnotice/revhistory has an ID, then go ahead and use -->
999       <!-- * just the value of that ID as the basename for the file -->
1000       <!-- * (that is, without prepending an "ln-" or "rh-" to it) -->
1001       <xsl:value-of select="($node/@id|$node/@xml:id)[1]"/>
1002       <xsl:value-of select="$html.ext"/>
1003     </xsl:when>
1004     <xsl:when test="not ($node/@id or $node/@xml:id) or $use.id.as.filename = 0">
1005       <!-- * 3. Otherwise, if this legalnotice/revhistory does not have an ID, or -->
1006       <!-- * if $use.id.as.filename = 0 -->
1007       <!-- * then we generate an ID... -->
1008       <xsl:variable name="id">
1009         <xsl:value-of select="generate-id($node)"/>
1010       </xsl:variable>
1011       <!-- * ...and then we take that generated ID, prepend a -->
1012       <!-- * prefix to it, and use that as the basename for the file -->
1013       <xsl:choose>
1014         <xsl:when test="$is.ln">
1015           <xsl:value-of select="concat('ln-',$id,$html.ext)"/>
1016         </xsl:when>
1017         <xsl:otherwise>
1018           <xsl:value-of select="concat('rh-',$id,$html.ext)"/>
1019         </xsl:otherwise>
1020       </xsl:choose>
1021     </xsl:when>
1022   </xsl:choose>
1023 </xsl:template>
1024     
1025 <!-- ==================================================================== -->
1026
1027 </xsl:stylesheet>