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