2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:d="http://docbook.org/ns/docbook"
4 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
5 exclude-result-prefixes="doc d"
8 <!-- ********************************************************************
10 This file is part of the XSL DocBook Stylesheet distribution.
11 See ../README or http://cdn.docbook.org/release/xsl/current/ for
12 copyright and other information.
14 ******************************************************************** -->
16 <!-- ==================================================================== -->
18 <!-- subtitle markup -->
20 <doc:mode mode="subtitle.markup" xmlns="">
21 <refpurpose>Provides access to element subtitles</refpurpose>
22 <refdescription id="subtitle.markup-desc">
23 <para>Processing an element in the
24 <literal role="mode">subtitle.markup</literal> mode produces the
25 subtitle of the element.
30 <xsl:template match="*" mode="subtitle.markup">
31 <xsl:param name="verbose" select="1"/>
32 <xsl:if test="$verbose != 0">
34 <xsl:text>Request for subtitle of unexpected element: </xsl:text>
35 <xsl:value-of select="local-name(.)"/>
37 <xsl:text>???SUBTITLE???</xsl:text>
41 <xsl:template match="d:subtitle" mode="subtitle.markup">
42 <xsl:param name="allow-anchors" select="'0'"/>
43 <xsl:param name="verbose" select="1"/>
44 <xsl:apply-templates/>
47 <xsl:template match="d:set" mode="subtitle.markup">
48 <xsl:param name="allow-anchors" select="'0'"/>
49 <xsl:param name="verbose" select="1"/>
50 <xsl:apply-templates select="(d:setinfo/d:subtitle|d:info/d:subtitle|d:subtitle)[1]"
51 mode="subtitle.markup">
52 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
53 <xsl:with-param name="verbose" select="$verbose"/>
54 </xsl:apply-templates>
57 <xsl:template match="d:book" mode="subtitle.markup">
58 <xsl:param name="allow-anchors" select="'0'"/>
59 <xsl:param name="verbose" select="1"/>
60 <xsl:apply-templates select="(d:bookinfo/d:subtitle|d:info/d:subtitle|d:subtitle)[1]"
61 mode="subtitle.markup">
62 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
63 <xsl:with-param name="verbose" select="$verbose"/>
64 </xsl:apply-templates>
67 <xsl:template match="d:part" mode="subtitle.markup">
68 <xsl:param name="allow-anchors" select="'0'"/>
69 <xsl:param name="verbose" select="1"/>
70 <xsl:apply-templates select="(d:partinfo/d:subtitle
74 mode="subtitle.markup">
75 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
76 <xsl:with-param name="verbose" select="$verbose"/>
77 </xsl:apply-templates>
80 <xsl:template match="d:preface|d:chapter|d:appendix" mode="subtitle.markup">
81 <xsl:param name="allow-anchors" select="'0'"/>
82 <xsl:param name="verbose" select="1"/>
83 <xsl:apply-templates select="(d:docinfo/d:subtitle
85 |d:prefaceinfo/d:subtitle
86 |d:chapterinfo/d:subtitle
87 |d:appendixinfo/d:subtitle
89 mode="subtitle.markup">
90 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
91 <xsl:with-param name="verbose" select="$verbose"/>
92 </xsl:apply-templates>
95 <xsl:template match="d:article" mode="subtitle.markup">
96 <xsl:param name="allow-anchors" select="'0'"/>
97 <xsl:param name="verbose" select="1"/>
98 <xsl:apply-templates select="(d:artheader/d:subtitle
99 |d:articleinfo/d:subtitle
102 mode="subtitle.markup">
103 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
104 <xsl:with-param name="verbose" select="$verbose"/>
105 </xsl:apply-templates>
108 <xsl:template match="d:dedication|d:colophon" mode="subtitle.markup">
109 <xsl:param name="allow-anchors" select="'0'"/>
110 <xsl:param name="verbose" select="1"/>
111 <xsl:apply-templates select="(d:subtitle|d:info/d:subtitle)[1]"
112 mode="subtitle.markup">
113 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
114 <xsl:with-param name="verbose" select="$verbose"/>
115 </xsl:apply-templates>
118 <xsl:template match="d:reference" mode="subtitle.markup">
119 <xsl:param name="allow-anchors" select="'0'"/>
120 <xsl:param name="verbose" select="1"/>
121 <xsl:apply-templates select="(d:referenceinfo/d:subtitle
122 |d:docinfo/d:subtitle
125 mode="subtitle.markup">
126 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
127 <xsl:with-param name="verbose" select="$verbose"/>
128 </xsl:apply-templates>
131 <xsl:template match="d:qandaset" mode="subtitle.markup">
132 <xsl:param name="allow-anchors" select="'0'"/>
133 <xsl:param name="verbose" select="1"/>
134 <xsl:apply-templates select="(d:blockinfo/d:subtitle|d:info/d:subtitle)[1]"
135 mode="subtitle.markup">
136 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
137 <xsl:with-param name="verbose" select="$verbose"/>
138 </xsl:apply-templates>
141 <xsl:template match="d:refentry" mode="subtitle.markup">
142 <xsl:param name="allow-anchors" select="'0'"/>
143 <xsl:param name="verbose" select="1"/>
144 <xsl:apply-templates select="(d:refentryinfo/d:subtitle
146 |d:docinfo/d:subtitle)[1]"
147 mode="subtitle.markup">
148 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
149 <xsl:with-param name="verbose" select="$verbose"/>
150 </xsl:apply-templates>
153 <xsl:template match="d:section
154 |d:sect1|d:sect2|d:sect3|d:sect4|d:sect5
155 |d:refsect1|d:refsect2|d:refsect3
158 mode="subtitle.markup">
159 <xsl:param name="allow-anchors" select="'0'"/>
160 <xsl:param name="verbose" select="1"/>
161 <xsl:apply-templates select="(d:info/d:subtitle
162 |d:sectioninfo/d:subtitle
163 |d:sect1info/d:subtitle
164 |d:sect2info/d:subtitle
165 |d:sect3info/d:subtitle
166 |d:sect4info/d:subtitle
167 |d:sect5info/d:subtitle
168 |d:refsect1info/d:subtitle
169 |d:refsect2info/d:subtitle
170 |d:refsect3info/d:subtitle
172 mode="subtitle.markup">
173 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
174 <xsl:with-param name="verbose" select="$verbose"/>
175 </xsl:apply-templates>