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,v 1.2 2004/01/04 09:25:57 j-devenish Exp $
9 ********************************************************************
11 This file is part of the XSL DocBook Stylesheet distribution.
13 Copyright (C) 1999, 2000, 2001, 2002 Norman Walsh.
14 ******************************************************************** -->
16 <!-- ==================================================================== -->
18 <!-- subtitle markup -->
20 <doc:mode mode="subtitle.markup" xmlns="">
21 <refpurpose>Provides access to element subtitles</refpurpose>
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">
32 <xsl:text>Request for subtitle of unexpected element: </xsl:text>
33 <xsl:value-of select="name(.)"/>
35 <xsl:text>???SUBTITLE???</xsl:text>
38 <xsl:template match="subtitle" mode="subtitle.markup">
39 <xsl:param name="allow-anchors" select="'0'"/>
40 <xsl:apply-templates/>
43 <xsl:template match="set" mode="subtitle.markup">
44 <xsl:param name="allow-anchors" select="'0'"/>
45 <xsl:apply-templates select="(setinfo/subtitle|subtitle)[1]"
46 mode="subtitle.markup">
47 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
48 </xsl:apply-templates>
51 <xsl:template match="book" mode="subtitle.markup">
52 <xsl:param name="allow-anchors" select="'0'"/>
53 <xsl:apply-templates select="(bookinfo/subtitle|subtitle)[1]"
54 mode="subtitle.markup">
55 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
56 </xsl:apply-templates>
59 <xsl:template match="part" mode="subtitle.markup">
60 <xsl:param name="allow-anchors" select="'0'"/>
61 <xsl:apply-templates select="(partinfo/subtitle
64 mode="subtitle.markup">
65 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
66 </xsl:apply-templates>
69 <xsl:template match="preface|chapter|appendix" mode="subtitle.markup">
70 <xsl:param name="allow-anchors" select="'0'"/>
71 <xsl:apply-templates select="(docinfo/subtitle
74 |appendixinfo/subtitle
76 mode="subtitle.markup">
77 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
78 </xsl:apply-templates>
81 <xsl:template match="article" mode="subtitle.markup">
82 <xsl:param name="allow-anchors" select="'0'"/>
83 <xsl:apply-templates select="(artheader/subtitle
86 mode="subtitle.markup">
87 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
88 </xsl:apply-templates>
91 <xsl:template match="dedication|colophon" mode="subtitle.markup">
92 <xsl:param name="allow-anchors" select="'0'"/>
93 <xsl:apply-templates select="subtitle"
94 mode="subtitle.markup">
95 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
96 </xsl:apply-templates>
99 <xsl:template match="reference" mode="subtitle.markup">
100 <xsl:param name="allow-anchors" select="'0'"/>
101 <xsl:apply-templates select="(referenceinfo/subtitle
104 mode="subtitle.markup">
105 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
106 </xsl:apply-templates>
109 <xsl:template match="refentry" mode="subtitle.markup">
110 <xsl:param name="allow-anchors" select="'0'"/>
111 <xsl:apply-templates select="(refentryinfo/subtitle
112 |docinfo/subtitle)[1]"
113 mode="subtitle.markup">
114 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
115 </xsl:apply-templates>
118 <xsl:template match="section
119 |sect1|sect2|sect3|sect4|sect5
120 |refsect1|refsect2|refsect3
122 mode="subtitle.markup">
123 <xsl:param name="allow-anchors" select="'0'"/>
124 <xsl:apply-templates select="(sectioninfo/subtitle
130 |refsect1info/subtitle
131 |refsect2info/subtitle
132 |refsect3info/subtitle
134 mode="subtitle.markup">
135 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
136 </xsl:apply-templates>