2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 <!-- ********************************************************************
6 $Id: titlepage.xsl 8816 2010-08-10 11:56:35Z mzjn $
7 ********************************************************************
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.
13 ******************************************************************** -->
15 <!-- ==================================================================== -->
17 <xsl:attribute-set name="book.titlepage.recto.style"/>
18 <xsl:attribute-set name="book.titlepage.verso.style"/>
20 <xsl:attribute-set name="article.titlepage.recto.style"/>
21 <xsl:attribute-set name="article.titlepage.verso.style"/>
23 <xsl:attribute-set name="set.titlepage.recto.style"/>
24 <xsl:attribute-set name="set.titlepage.verso.style"/>
26 <xsl:attribute-set name="part.titlepage.recto.style"/>
27 <xsl:attribute-set name="part.titlepage.verso.style"/>
29 <xsl:attribute-set name="partintro.titlepage.recto.style"/>
30 <xsl:attribute-set name="partintro.titlepage.verso.style"/>
32 <xsl:attribute-set name="reference.titlepage.recto.style"/>
33 <xsl:attribute-set name="reference.titlepage.verso.style"/>
35 <xsl:attribute-set name="refentry.titlepage.recto.style"/>
36 <xsl:attribute-set name="refentry.titlepage.verso.style"/>
38 <xsl:attribute-set name="dedication.titlepage.recto.style"/>
39 <xsl:attribute-set name="dedication.titlepage.verso.style"/>
41 <xsl:attribute-set name="acknowledgements.titlepage.recto.style"/>
42 <xsl:attribute-set name="acknowledgements.titlepage.verso.style"/>
44 <xsl:attribute-set name="preface.titlepage.recto.style"/>
45 <xsl:attribute-set name="preface.titlepage.verso.style"/>
47 <xsl:attribute-set name="chapter.titlepage.recto.style"/>
48 <xsl:attribute-set name="chapter.titlepage.verso.style"/>
50 <xsl:attribute-set name="appendix.titlepage.recto.style"/>
51 <xsl:attribute-set name="appendix.titlepage.verso.style"/>
53 <xsl:attribute-set name="bibliography.titlepage.recto.style"/>
54 <xsl:attribute-set name="bibliography.titlepage.verso.style"/>
56 <xsl:attribute-set name="glossary.titlepage.recto.style"/>
57 <xsl:attribute-set name="glossary.titlepage.verso.style"/>
59 <xsl:attribute-set name="index.titlepage.recto.style"/>
60 <xsl:attribute-set name="index.titlepage.verso.style"/>
62 <xsl:attribute-set name="setindex.titlepage.recto.style"/>
63 <xsl:attribute-set name="setindex.titlepage.verso.style"/>
65 <xsl:attribute-set name="sidebar.titlepage.recto.style"/>
66 <xsl:attribute-set name="sidebar.titlepage.verso.style"/>
68 <xsl:attribute-set name="section.titlepage.recto.style"/>
69 <xsl:attribute-set name="section.titlepage.verso.style"/>
71 <xsl:attribute-set name="sect1.titlepage.recto.style"
72 use-attribute-sets="section.titlepage.recto.style"/>
73 <xsl:attribute-set name="sect1.titlepage.verso.style"
74 use-attribute-sets="section.titlepage.verso.style"/>
76 <xsl:attribute-set name="sect2.titlepage.recto.style"
77 use-attribute-sets="section.titlepage.recto.style"/>
78 <xsl:attribute-set name="sect2.titlepage.verso.style"
79 use-attribute-sets="section.titlepage.verso.style"/>
81 <xsl:attribute-set name="sect3.titlepage.recto.style"
82 use-attribute-sets="section.titlepage.recto.style"/>
83 <xsl:attribute-set name="sect3.titlepage.verso.style"
84 use-attribute-sets="section.titlepage.verso.style"/>
86 <xsl:attribute-set name="sect4.titlepage.recto.style"
87 use-attribute-sets="section.titlepage.recto.style"/>
88 <xsl:attribute-set name="sect4.titlepage.verso.style"
89 use-attribute-sets="section.titlepage.verso.style"/>
91 <xsl:attribute-set name="sect5.titlepage.recto.style"
92 use-attribute-sets="section.titlepage.recto.style"/>
93 <xsl:attribute-set name="sect5.titlepage.verso.style"
94 use-attribute-sets="section.titlepage.verso.style"/>
96 <xsl:attribute-set name="simplesect.titlepage.recto.style"
97 use-attribute-sets="section.titlepage.recto.style"/>
98 <xsl:attribute-set name="simplesect.titlepage.verso.style"
99 use-attribute-sets="section.titlepage.verso.style"/>
101 <xsl:attribute-set name="table.of.contents.titlepage.recto.style"/>
102 <xsl:attribute-set name="table.of.contents.titlepage.verso.style"/>
104 <xsl:attribute-set name="list.of.tables.titlepage.recto.style"/>
105 <xsl:attribute-set name="list.of.tables.contents.titlepage.verso.style"/>
107 <xsl:attribute-set name="list.of.figures.titlepage.recto.style"/>
108 <xsl:attribute-set name="list.of.figures.contents.titlepage.verso.style"/>
110 <xsl:attribute-set name="list.of.equations.titlepage.recto.style"/>
111 <xsl:attribute-set name="list.of.equations.contents.titlepage.verso.style"/>
113 <xsl:attribute-set name="list.of.examples.titlepage.recto.style"/>
114 <xsl:attribute-set name="list.of.examples.contents.titlepage.verso.style"/>
116 <xsl:attribute-set name="list.of.unknowns.titlepage.recto.style"/>
117 <xsl:attribute-set name="list.of.unknowns.contents.titlepage.verso.style"/>
119 <!-- ==================================================================== -->
121 <xsl:template match="*" mode="titlepage.mode">
122 <!-- if an element isn't found in this mode, try the default mode -->
123 <xsl:apply-templates select="."/>
126 <xsl:template match="abbrev" mode="titlepage.mode">
128 <xsl:apply-templates select="." mode="common.html.attributes"/>
129 <xsl:apply-templates mode="titlepage.mode"/>
134 <xsl:template match="abstract" mode="titlepage.mode">
136 <xsl:apply-templates select="." mode="common.html.attributes"/>
137 <xsl:call-template name="anchor"/>
138 <xsl:if test="$abstract.notitle.enabled = 0">
139 <xsl:call-template name="formal.object.heading">
140 <xsl:with-param name="title">
141 <xsl:apply-templates select="." mode="title.markup"/>
145 <xsl:apply-templates mode="titlepage.mode"/>
146 <xsl:call-template name="process.footnotes"/>
150 <xsl:template match="abstract/title" mode="titlepage.mode">
153 <xsl:template match="address" mode="titlepage.mode">
154 <xsl:param name="suppress-numbers" select="'0'"/>
156 <xsl:variable name="rtf">
157 <xsl:apply-templates mode="titlepage.mode"/>
161 <xsl:when test="$suppress-numbers = '0'
162 and @linenumbering = 'numbered'
163 and $use.extensions != '0'
164 and $linenumbering.extension != '0'">
166 <xsl:apply-templates select="." mode="common.html.attributes"/>
167 <xsl:call-template name="paragraph">
168 <xsl:with-param name="content">
169 <xsl:call-template name="number.rtf.lines">
170 <xsl:with-param name="rtf" select="$rtf"/>
179 <xsl:apply-templates select="." mode="common.html.attributes"/>
180 <xsl:call-template name="paragraph">
181 <xsl:with-param name="content">
182 <xsl:call-template name="make-verbatim">
183 <xsl:with-param name="rtf" select="$rtf"/>
192 <xsl:template match="affiliation" mode="titlepage.mode">
194 <xsl:apply-templates select="." mode="common.html.attributes"/>
195 <xsl:apply-templates mode="titlepage.mode"/>
199 <xsl:template match="artpagenums" mode="titlepage.mode">
201 <xsl:apply-templates select="." mode="common.html.attributes"/>
202 <xsl:apply-templates mode="titlepage.mode"/>
207 <xsl:template match="author|editor" mode="titlepage.mode">
208 <xsl:call-template name="credits.div"/>
211 <xsl:template name="credits.div">
213 <xsl:apply-templates select="." mode="common.html.attributes"/>
214 <xsl:if test="self::editor[position()=1] and not($editedby.enabled = 0)">
215 <h4 class="editedby"><xsl:call-template name="gentext.edited.by"/></h4>
218 <xsl:apply-templates select="." mode="common.html.attributes"/>
220 <xsl:when test="orgname">
221 <xsl:apply-templates/>
224 <xsl:call-template name="person.name"/>
228 <xsl:if test="not($contrib.inline.enabled = 0)">
229 <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
231 <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
232 <xsl:apply-templates mode="titlepage.mode" select="email"/>
233 <xsl:if test="not($blurb.on.titlepage.enabled = 0)">
235 <xsl:when test="$contrib.inline.enabled = 0">
236 <xsl:apply-templates mode="titlepage.mode"
237 select="contrib|authorblurb|personblurb"/>
240 <xsl:apply-templates mode="titlepage.mode"
241 select="authorblurb|personblurb"/>
248 <xsl:template match="authorblurb|personblurb" mode="titlepage.mode">
250 <xsl:apply-templates select="." mode="common.html.attributes"/>
251 <xsl:apply-templates mode="titlepage.mode"/>
255 <xsl:template match="authorgroup" mode="titlepage.mode">
257 <xsl:apply-templates select="." mode="common.html.attributes"/>
258 <xsl:if test="parent::refentryinfo">
262 <xsl:call-template name="anchor"/>
263 <xsl:apply-templates mode="titlepage.mode"/>
267 <xsl:template match="authorinitials" mode="titlepage.mode">
269 <xsl:apply-templates select="." mode="common.html.attributes"/>
270 <xsl:apply-templates mode="titlepage.mode"/>
275 <xsl:template match="bibliomisc" mode="titlepage.mode">
276 <xsl:apply-templates mode="titlepage.mode"/>
279 <xsl:template match="bibliomset" mode="titlepage.mode">
280 <xsl:apply-templates mode="titlepage.mode"/>
283 <xsl:template match="collab" mode="titlepage.mode">
285 <xsl:apply-templates select="." mode="common.html.attributes"/>
286 <xsl:apply-templates mode="titlepage.mode"/>
291 <xsl:template match="collabname" mode="titlepage.mode">
293 <xsl:apply-templates select="." mode="common.html.attributes"/>
294 <xsl:apply-templates mode="titlepage.mode"/>
298 <xsl:template match="confgroup" mode="titlepage.mode">
300 <xsl:apply-templates select="." mode="common.html.attributes"/>
301 <xsl:apply-templates mode="titlepage.mode"/>
305 <xsl:template match="confdates" mode="titlepage.mode">
307 <xsl:apply-templates select="." mode="common.html.attributes"/>
308 <xsl:apply-templates mode="titlepage.mode"/>
313 <xsl:template match="confsponsor" mode="titlepage.mode">
315 <xsl:apply-templates select="." mode="common.html.attributes"/>
316 <xsl:apply-templates mode="titlepage.mode"/>
321 <xsl:template match="conftitle" mode="titlepage.mode">
323 <xsl:apply-templates select="." mode="common.html.attributes"/>
324 <xsl:apply-templates mode="titlepage.mode"/>
329 <xsl:template match="confnum" mode="titlepage.mode">
333 <xsl:template match="contractnum" mode="titlepage.mode">
335 <xsl:apply-templates select="." mode="common.html.attributes"/>
336 <xsl:apply-templates mode="titlepage.mode"/>
341 <xsl:template match="contractsponsor" mode="titlepage.mode">
343 <xsl:apply-templates select="." mode="common.html.attributes"/>
344 <xsl:apply-templates mode="titlepage.mode"/>
349 <xsl:template match="contrib" mode="titlepage.mode">
351 <xsl:when test="not($contrib.inline.enabled = 0)">
353 <xsl:apply-templates select="." mode="common.html.attributes"/>
354 <xsl:apply-templates mode="titlepage.mode"/>
355 </span><xsl:text> </xsl:text>
359 <xsl:apply-templates select="." mode="common.html.attributes"/>
360 <p><xsl:apply-templates mode="titlepage.mode"/></p>
366 <xsl:template match="copyright" mode="titlepage.mode">
368 <xsl:if test="generate-id() = generate-id(//refentryinfo/copyright[1])
369 and ($stylesheet.result.type = 'html' or $stylesheet.result.type = 'xhtml')">
374 <xsl:apply-templates select="." mode="common.html.attributes"/>
375 <xsl:call-template name="gentext">
376 <xsl:with-param name="key" select="'Copyright'"/>
378 <xsl:call-template name="gentext.space"/>
379 <xsl:call-template name="dingbat">
380 <xsl:with-param name="dingbat">copyright</xsl:with-param>
382 <xsl:call-template name="gentext.space"/>
383 <xsl:call-template name="copyright.years">
384 <xsl:with-param name="years" select="year"/>
385 <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
386 <xsl:with-param name="single.year.ranges"
387 select="$make.single.year.ranges"/>
389 <xsl:call-template name="gentext.space"/>
390 <xsl:apply-templates select="holder" mode="titlepage.mode"/>
394 <xsl:template match="year" mode="titlepage.mode">
396 <xsl:when test="$show.revisionflag != 0 and @revisionflag">
397 <span class="{@revisionflag}">
398 <xsl:apply-templates mode="titlepage.mode"/>
402 <xsl:apply-templates mode="titlepage.mode"/>
407 <xsl:template match="holder" mode="titlepage.mode">
409 <xsl:when test="$show.revisionflag != 0 and @revisionflag">
410 <span class="{@revisionflag}">
411 <xsl:apply-templates mode="titlepage.mode"/>
415 <xsl:apply-templates mode="titlepage.mode"/>
418 <xsl:if test="position() < last()">
419 <xsl:text>, </xsl:text>
423 <xsl:template match="corpauthor" mode="titlepage.mode">
425 <xsl:apply-templates select="." mode="common.html.attributes"/>
426 <xsl:apply-templates mode="titlepage.mode"/>
430 <xsl:template match="corpcredit" mode="titlepage.mode">
432 <xsl:apply-templates select="." mode="common.html.attributes"/>
433 <xsl:apply-templates mode="titlepage.mode"/>
438 <xsl:template match="corpname" mode="titlepage.mode">
440 <xsl:apply-templates select="." mode="common.html.attributes"/>
441 <xsl:apply-templates mode="titlepage.mode"/>
446 <xsl:template match="date" mode="titlepage.mode">
448 <xsl:apply-templates select="." mode="common.html.attributes"/>
449 <xsl:apply-templates mode="titlepage.mode"/>
454 <xsl:template match="edition" mode="titlepage.mode">
456 <xsl:apply-templates select="." mode="common.html.attributes"/>
457 <xsl:apply-templates mode="titlepage.mode"/>
458 <xsl:call-template name="gentext.space"/>
459 <xsl:call-template name="gentext">
460 <xsl:with-param name="key" select="'Edition'"/>
465 <xsl:template match="email" mode="titlepage.mode">
466 <!-- use the normal e-mail handling code -->
467 <xsl:apply-templates select="."/>
470 <xsl:template match="firstname" mode="titlepage.mode">
472 <xsl:apply-templates select="." mode="common.html.attributes"/>
473 <xsl:apply-templates mode="titlepage.mode"/>
478 <xsl:template match="graphic" mode="titlepage.mode">
479 <!-- use the normal graphic handling code -->
480 <xsl:apply-templates select="."/>
483 <xsl:template match="honorific" mode="titlepage.mode">
485 <xsl:apply-templates select="." mode="common.html.attributes"/>
486 <xsl:apply-templates mode="titlepage.mode"/>
491 <xsl:template match="isbn" mode="titlepage.mode">
493 <xsl:apply-templates select="." mode="common.html.attributes"/>
494 <xsl:apply-templates mode="titlepage.mode"/>
499 <xsl:template match="issn" mode="titlepage.mode">
501 <xsl:apply-templates select="." mode="common.html.attributes"/>
502 <xsl:apply-templates mode="titlepage.mode"/>
507 <xsl:template match="biblioid" mode="titlepage.mode">
509 <xsl:apply-templates select="." mode="common.html.attributes"/>
510 <xsl:apply-templates mode="titlepage.mode"/>
515 <xsl:template match="itermset" mode="titlepage.mode">
518 <xsl:template match="invpartnumber" mode="titlepage.mode">
520 <xsl:apply-templates select="." mode="common.html.attributes"/>
521 <xsl:apply-templates mode="titlepage.mode"/>
526 <xsl:template match="issuenum" mode="titlepage.mode">
528 <xsl:apply-templates select="." mode="common.html.attributes"/>
529 <xsl:apply-templates mode="titlepage.mode"/>
534 <xsl:template match="jobtitle" mode="titlepage.mode">
536 <xsl:apply-templates select="." mode="common.html.attributes"/>
537 <xsl:apply-templates mode="titlepage.mode"/>
542 <xsl:template match="keywordset" mode="titlepage.mode">
545 <xsl:template match="legalnotice" mode="titlepage.mode">
546 <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
549 <xsl:when test="$generate.legalnotice.link != 0">
551 <!-- Compute name of legalnotice file -->
552 <xsl:variable name="file">
553 <xsl:call-template name="ln.or.rh.filename"/>
556 <xsl:variable name="filename">
557 <xsl:call-template name="make-relative-filename">
558 <xsl:with-param name="base.dir" select="$base.dir"/>
559 <xsl:with-param name="base.name" select="$file"/>
563 <xsl:variable name="title">
564 <xsl:apply-templates select="." mode="title.markup"/>
568 <xsl:copy-of select="$title"/>
571 <xsl:call-template name="write.chunk">
572 <xsl:with-param name="filename" select="$filename"/>
573 <xsl:with-param name="quiet" select="$chunk.quietly"/>
574 <xsl:with-param name="content">
575 <xsl:call-template name="user.preroot"/>
578 <xsl:call-template name="system.head.content"/>
579 <xsl:call-template name="head.content"/>
580 <xsl:call-template name="user.head.content"/>
583 <xsl:call-template name="body.attributes"/>
585 <xsl:apply-templates select="." mode="common.html.attributes"/>
586 <xsl:apply-templates mode="titlepage.mode"/>
590 <xsl:value-of select="$chunk.append"/>
596 <xsl:apply-templates select="." mode="common.html.attributes"/>
598 <xsl:apply-templates mode="titlepage.mode"/>
604 <xsl:template match="legalnotice/title" mode="titlepage.mode">
605 <p class="legalnotice-title"><b><xsl:apply-templates/></b></p>
608 <xsl:template match="lineage" mode="titlepage.mode">
610 <xsl:apply-templates select="." mode="common.html.attributes"/>
611 <xsl:apply-templates mode="titlepage.mode"/>
616 <xsl:template match="modespec" mode="titlepage.mode">
619 <xsl:template match="orgdiv" mode="titlepage.mode">
620 <xsl:if test="preceding-sibling::*[1][self::orgname]">
621 <xsl:text> </xsl:text>
624 <xsl:apply-templates select="." mode="common.html.attributes"/>
625 <xsl:apply-templates mode="titlepage.mode"/>
630 <xsl:template match="orgname" mode="titlepage.mode">
632 <xsl:apply-templates select="." mode="common.html.attributes"/>
633 <xsl:apply-templates mode="titlepage.mode"/>
638 <xsl:template match="othercredit" mode="titlepage.mode">
640 <xsl:when test="not($othercredit.like.author.enabled = 0)">
641 <xsl:variable name="contrib" select="string(contrib)"/>
643 <xsl:when test="contrib">
644 <xsl:if test="not(preceding-sibling::othercredit[string(contrib)=$contrib])">
645 <xsl:call-template name="paragraph">
646 <xsl:with-param name="class" select="local-name(.)"/>
647 <xsl:with-param name="content">
648 <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
649 <xsl:text>: </xsl:text>
650 <xsl:call-template name="person.name"/>
651 <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
652 <xsl:apply-templates select="following-sibling::othercredit[string(contrib)=$contrib]" mode="titlepage.othercredits"/>
658 <xsl:call-template name="paragraph">
659 <xsl:with-param name="class" select="local-name(.)"/>
660 <xsl:with-param name="content">
661 <xsl:call-template name="person.name"/>
664 <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
669 <xsl:call-template name="credits.div"/>
674 <xsl:template match="othercredit" mode="titlepage.othercredits">
675 <xsl:text>, </xsl:text>
676 <xsl:call-template name="person.name"/>
679 <xsl:template match="othername" mode="titlepage.mode">
681 <xsl:apply-templates select="." mode="common.html.attributes"/>
682 <xsl:apply-templates mode="titlepage.mode"/>
687 <xsl:template match="pagenums" mode="titlepage.mode">
689 <xsl:apply-templates select="." mode="common.html.attributes"/>
690 <xsl:apply-templates mode="titlepage.mode"/>
695 <xsl:template match="printhistory" mode="titlepage.mode">
697 <xsl:apply-templates select="." mode="common.html.attributes"/>
698 <xsl:apply-templates mode="titlepage.mode"/>
702 <xsl:template match="productname" mode="titlepage.mode">
704 <xsl:apply-templates select="." mode="common.html.attributes"/>
705 <xsl:apply-templates mode="titlepage.mode"/>
710 <xsl:template match="productnumber" mode="titlepage.mode">
712 <xsl:apply-templates select="." mode="common.html.attributes"/>
713 <xsl:apply-templates mode="titlepage.mode"/>
718 <xsl:template match="pubdate" mode="titlepage.mode">
719 <xsl:call-template name="paragraph">
720 <xsl:with-param name="class" select="local-name(.)"/>
721 <xsl:with-param name="content">
722 <xsl:apply-templates mode="titlepage.mode"/>
727 <xsl:template match="publisher" mode="titlepage.mode">
728 <xsl:call-template name="paragraph">
729 <xsl:with-param name="class" select="local-name(.)"/>
730 <xsl:with-param name="content">
731 <xsl:apply-templates mode="titlepage.mode"/>
736 <xsl:template match="publishername" mode="titlepage.mode">
738 <xsl:apply-templates select="." mode="common.html.attributes"/>
739 <xsl:apply-templates mode="titlepage.mode"/>
744 <xsl:template match="pubsnumber" mode="titlepage.mode">
746 <xsl:apply-templates select="." mode="common.html.attributes"/>
747 <xsl:apply-templates mode="titlepage.mode"/>
752 <xsl:template match="releaseinfo" mode="titlepage.mode">
753 <xsl:call-template name="paragraph">
754 <xsl:with-param name="class" select="local-name(.)"/>
755 <xsl:with-param name="content">
756 <xsl:apply-templates mode="titlepage.mode"/>
761 <xsl:template match="revhistory" mode="titlepage.mode">
762 <xsl:variable name="numcols">
764 <xsl:when test=".//authorinitials|.//author">3</xsl:when>
765 <xsl:otherwise>2</xsl:otherwise>
769 <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
771 <xsl:variable name="title">
772 <xsl:call-template name="gentext">
773 <xsl:with-param name="key">RevHistory</xsl:with-param>
777 <xsl:variable name="contents">
779 <xsl:apply-templates select="." mode="common.html.attributes"/>
780 <table border="1" width="100%" summary="Revision history">
782 <th align="{$direction.align.start}" valign="top" colspan="{$numcols}">
784 <xsl:call-template name="gentext">
785 <xsl:with-param name="key" select="'RevHistory'"/>
790 <xsl:apply-templates mode="titlepage.mode">
791 <xsl:with-param name="numcols" select="$numcols"/>
792 </xsl:apply-templates>
798 <xsl:when test="$generate.revhistory.link != 0">
800 <!-- Compute name of revhistory file -->
801 <xsl:variable name="file">
802 <xsl:call-template name="ln.or.rh.filename">
803 <xsl:with-param name="is.ln" select="false()"/>
807 <xsl:variable name="filename">
808 <xsl:call-template name="make-relative-filename">
809 <xsl:with-param name="base.dir" select="$base.dir"/>
810 <xsl:with-param name="base.name" select="$file"/>
815 <xsl:copy-of select="$title"/>
818 <xsl:call-template name="write.chunk">
819 <xsl:with-param name="filename" select="$filename"/>
820 <xsl:with-param name="quiet" select="$chunk.quietly"/>
821 <xsl:with-param name="content">
822 <xsl:call-template name="user.preroot"/>
825 <xsl:call-template name="system.head.content"/>
826 <xsl:call-template name="head.content">
827 <xsl:with-param name="title">
828 <xsl:value-of select="$title"/>
829 <xsl:if test="../../title">
830 <xsl:value-of select="concat(' (', ../../title, ')')"/>
834 <xsl:call-template name="user.head.content"/>
837 <xsl:call-template name="body.attributes"/>
838 <xsl:copy-of select="$contents"/>
841 <xsl:text>
</xsl:text>
846 <xsl:copy-of select="$contents"/>
851 <xsl:template match="revhistory/revision" mode="titlepage.mode">
852 <xsl:param name="numcols" select="'3'"/>
853 <xsl:variable name="revnumber" select="revnumber"/>
854 <xsl:variable name="revdate" select="date"/>
855 <xsl:variable name="revauthor" select="authorinitials|author"/>
856 <xsl:variable name="revremark" select="revremark|revdescription"/>
858 <td align="{$direction.align.start}">
859 <xsl:if test="$revnumber">
860 <xsl:call-template name="gentext">
861 <xsl:with-param name="key" select="'Revision'"/>
863 <xsl:call-template name="gentext.space"/>
864 <xsl:apply-templates select="$revnumber[1]" mode="titlepage.mode"/>
867 <td align="{$direction.align.start}">
868 <xsl:apply-templates select="$revdate[1]" mode="titlepage.mode"/>
871 <xsl:when test="$revauthor">
872 <td align="{$direction.align.start}">
873 <xsl:for-each select="$revauthor">
874 <xsl:apply-templates select="." mode="titlepage.mode"/>
875 <xsl:if test="position() != last()">
876 <xsl:text>, </xsl:text>
881 <xsl:when test="$numcols > 2">
884 <xsl:otherwise></xsl:otherwise>
887 <xsl:if test="$revremark">
889 <td align="{$direction.align.start}" colspan="{$numcols}">
890 <xsl:apply-templates select="$revremark[1]" mode="titlepage.mode"/>
896 <xsl:template match="revision/revnumber" mode="titlepage.mode">
897 <xsl:apply-templates mode="titlepage.mode"/>
900 <xsl:template match="revision/date" mode="titlepage.mode">
901 <xsl:apply-templates mode="titlepage.mode"/>
904 <xsl:template match="revision/authorinitials" mode="titlepage.mode">
905 <xsl:apply-templates mode="titlepage.mode"/>
908 <xsl:template match="revision/author" mode="titlepage.mode">
909 <xsl:apply-templates mode="titlepage.mode"/>
912 <xsl:template match="revision/revremark" mode="titlepage.mode">
913 <xsl:apply-templates mode="titlepage.mode"/>
916 <xsl:template match="revision/revdescription" mode="titlepage.mode">
917 <xsl:apply-templates mode="titlepage.mode"/>
920 <xsl:template match="seriesvolnums" mode="titlepage.mode">
922 <xsl:apply-templates select="." mode="common.html.attributes"/>
923 <xsl:apply-templates mode="titlepage.mode"/>
928 <xsl:template match="shortaffil" mode="titlepage.mode">
930 <xsl:apply-templates select="." mode="common.html.attributes"/>
931 <xsl:apply-templates mode="titlepage.mode"/>
936 <xsl:template match="subjectset" mode="titlepage.mode">
939 <xsl:template match="subtitle" mode="titlepage.mode">
941 <xsl:apply-templates select="." mode="common.html.attributes"/>
942 <xsl:apply-templates mode="titlepage.mode"/>
946 <xsl:template match="surname" mode="titlepage.mode">
948 <xsl:apply-templates select="." mode="common.html.attributes"/>
949 <xsl:apply-templates mode="titlepage.mode"/>
954 <xsl:template match="title" mode="titlepage.mode">
955 <xsl:variable name="id">
957 <!-- if title is in an *info wrapper, get the grandparent -->
958 <xsl:when test="contains(local-name(..), 'info')">
959 <xsl:call-template name="object.id">
960 <xsl:with-param name="object" select="../.."/>
964 <xsl:call-template name="object.id">
965 <xsl:with-param name="object" select=".."/>
972 <xsl:apply-templates select="." mode="common.html.attributes"/>
973 <xsl:if test="$generate.id.attributes = 0">
977 <xsl:when test="$show.revisionflag != 0 and @revisionflag">
978 <span class="{@revisionflag}">
979 <xsl:apply-templates mode="titlepage.mode"/>
983 <xsl:apply-templates mode="titlepage.mode"/>
989 <xsl:template match="titleabbrev" mode="titlepage.mode">
990 <!-- nop; title abbreviations don't belong on the title page! -->
993 <xsl:template match="volumenum" mode="titlepage.mode">
995 <xsl:apply-templates select="." mode="common.html.attributes"/>
996 <xsl:apply-templates mode="titlepage.mode"/>
1001 <!-- This template computes the filename for legalnotice and revhistory chunks -->
1002 <xsl:template name="ln.or.rh.filename">
1003 <xsl:param name="node" select="."/>
1004 <xsl:param name="is.ln" select="true()"/>
1006 <xsl:variable name="dbhtml-filename">
1007 <xsl:call-template name="pi.dbhtml_filename">
1008 <xsl:with-param name="node" select="$node"/>
1009 </xsl:call-template>
1013 <!-- 1. If there is a dbhtml_filename PI, use that -->
1014 <xsl:when test="$dbhtml-filename != ''">
1015 <xsl:value-of select="$dbhtml-filename"/>
1017 <xsl:when test="($node/@id or $node/@xml:id) and not($use.id.as.filename = 0)">
1018 <!-- * 2. If this legalnotice/revhistory has an ID, then go ahead and use -->
1019 <!-- * just the value of that ID as the basename for the file -->
1020 <!-- * (that is, without prepending an "ln-" or "rh-" to it) -->
1021 <xsl:value-of select="($node/@id|$node/@xml:id)[1]"/>
1022 <xsl:value-of select="$html.ext"/>
1024 <xsl:when test="not ($node/@id or $node/@xml:id) or $use.id.as.filename = 0">
1025 <!-- * 3. Otherwise, if this legalnotice/revhistory does not have an ID, or -->
1026 <!-- * if $use.id.as.filename = 0 -->
1027 <!-- * then we generate an ID... -->
1028 <xsl:variable name="id">
1029 <xsl:value-of select="generate-id($node)"/>
1031 <!-- * ...and then we take that generated ID, prepend a -->
1032 <!-- * prefix to it, and use that as the basename for the file -->
1034 <xsl:when test="$is.ln">
1035 <xsl:value-of select="concat('ln-',$id,$html.ext)"/>
1038 <xsl:value-of select="concat('rh-',$id,$html.ext)"/>
1045 <!-- ==================================================================== -->