2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
4 exclude-result-prefixes="doc"
7 <!-- ********************************************************************
8 $Id: subtitles.xsl 9286 2012-04-19 10:10:58Z bobstayton $
9 ********************************************************************
11 This file is part of the XSL DocBook Stylesheet distribution.
12 See ../README or http://docbook.sf.net/release/xsl/current/ for
13 copyright and other information.
15 ******************************************************************** -->
17 <!-- ==================================================================== -->
19 <!-- subtitle markup -->
21 <doc:mode mode="subtitle.markup" xmlns="">
22 <refpurpose>Provides access to element subtitles</refpurpose>
23 <refdescription id="subtitle.markup-desc">
24 <para>Processing an element in the
25 <literal role="mode">subtitle.markup</literal> mode produces the
26 subtitle of the element.
31 <xsl:template match="*" mode="subtitle.markup">
32 <xsl:param name="verbose" select="1"/>
33 <xsl:if test="$verbose != 0">
35 <xsl:text>Request for subtitle of unexpected element: </xsl:text>
36 <xsl:value-of select="local-name(.)"/>
38 <xsl:text>???SUBTITLE???</xsl:text>
42 <xsl:template match="subtitle" mode="subtitle.markup">
43 <xsl:param name="allow-anchors" select="'0'"/>
44 <xsl:param name="verbose" select="1"/>
45 <xsl:apply-templates/>
48 <xsl:template match="set" mode="subtitle.markup">
49 <xsl:param name="allow-anchors" select="'0'"/>
50 <xsl:param name="verbose" select="1"/>
51 <xsl:apply-templates select="(setinfo/subtitle|info/subtitle|subtitle)[1]"
52 mode="subtitle.markup">
53 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
54 <xsl:with-param name="verbose" select="$verbose"/>
55 </xsl:apply-templates>
58 <xsl:template match="book" mode="subtitle.markup">
59 <xsl:param name="allow-anchors" select="'0'"/>
60 <xsl:param name="verbose" select="1"/>
61 <xsl:apply-templates select="(bookinfo/subtitle|info/subtitle|subtitle)[1]"
62 mode="subtitle.markup">
63 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
64 <xsl:with-param name="verbose" select="$verbose"/>
65 </xsl:apply-templates>
68 <xsl:template match="part" mode="subtitle.markup">
69 <xsl:param name="allow-anchors" select="'0'"/>
70 <xsl:param name="verbose" select="1"/>
71 <xsl:apply-templates select="(partinfo/subtitle
75 mode="subtitle.markup">
76 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
77 <xsl:with-param name="verbose" select="$verbose"/>
78 </xsl:apply-templates>
81 <xsl:template match="preface|chapter|appendix" mode="subtitle.markup">
82 <xsl:param name="allow-anchors" select="'0'"/>
83 <xsl:param name="verbose" select="1"/>
84 <xsl:apply-templates select="(docinfo/subtitle
88 |appendixinfo/subtitle
90 mode="subtitle.markup">
91 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
92 <xsl:with-param name="verbose" select="$verbose"/>
93 </xsl:apply-templates>
96 <xsl:template match="article" mode="subtitle.markup">
97 <xsl:param name="allow-anchors" select="'0'"/>
98 <xsl:param name="verbose" select="1"/>
99 <xsl:apply-templates select="(artheader/subtitle
100 |articleinfo/subtitle
103 mode="subtitle.markup">
104 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
105 <xsl:with-param name="verbose" select="$verbose"/>
106 </xsl:apply-templates>
109 <xsl:template match="dedication|colophon" mode="subtitle.markup">
110 <xsl:param name="allow-anchors" select="'0'"/>
111 <xsl:param name="verbose" select="1"/>
112 <xsl:apply-templates select="(subtitle|info/subtitle)[1]"
113 mode="subtitle.markup">
114 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
115 <xsl:with-param name="verbose" select="$verbose"/>
116 </xsl:apply-templates>
119 <xsl:template match="reference" mode="subtitle.markup">
120 <xsl:param name="allow-anchors" select="'0'"/>
121 <xsl:param name="verbose" select="1"/>
122 <xsl:apply-templates select="(referenceinfo/subtitle
126 mode="subtitle.markup">
127 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
128 <xsl:with-param name="verbose" select="$verbose"/>
129 </xsl:apply-templates>
132 <xsl:template match="qandaset" mode="subtitle.markup">
133 <xsl:param name="allow-anchors" select="'0'"/>
134 <xsl:param name="verbose" select="1"/>
135 <xsl:apply-templates select="(blockinfo/subtitle|info/subtitle)[1]"
136 mode="subtitle.markup">
137 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
138 <xsl:with-param name="verbose" select="$verbose"/>
139 </xsl:apply-templates>
142 <xsl:template match="refentry" mode="subtitle.markup">
143 <xsl:param name="allow-anchors" select="'0'"/>
144 <xsl:param name="verbose" select="1"/>
145 <xsl:apply-templates select="(refentryinfo/subtitle
147 |docinfo/subtitle)[1]"
148 mode="subtitle.markup">
149 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
150 <xsl:with-param name="verbose" select="$verbose"/>
151 </xsl:apply-templates>
154 <xsl:template match="section
155 |sect1|sect2|sect3|sect4|sect5
156 |refsect1|refsect2|refsect3
159 mode="subtitle.markup">
160 <xsl:param name="allow-anchors" select="'0'"/>
161 <xsl:param name="verbose" select="1"/>
162 <xsl:apply-templates select="(info/subtitle
163 |sectioninfo/subtitle
169 |refsect1info/subtitle
170 |refsect2info/subtitle
171 |refsect3info/subtitle
173 mode="subtitle.markup">
174 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
175 <xsl:with-param name="verbose" select="$verbose"/>
176 </xsl:apply-templates>