[c873d807] | 1 | <?xml version='1.0'?>
|
---|
| 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"
|
---|
| 5 | version='1.0'>
|
---|
| 6 |
|
---|
| 7 | <!-- ********************************************************************
|
---|
[15c7d39] | 8 | $Id: subtitles.xsl 9286 2012-04-19 10:10:58Z bobstayton $
|
---|
[c873d807] | 9 | ********************************************************************
|
---|
| 10 |
|
---|
| 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.
|
---|
| 14 |
|
---|
| 15 | ******************************************************************** -->
|
---|
| 16 |
|
---|
| 17 | <!-- ==================================================================== -->
|
---|
| 18 |
|
---|
| 19 | <!-- subtitle markup -->
|
---|
| 20 |
|
---|
| 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.
|
---|
| 27 | </para>
|
---|
| 28 | </refdescription>
|
---|
| 29 | </doc:mode>
|
---|
| 30 |
|
---|
| 31 | <xsl:template match="*" mode="subtitle.markup">
|
---|
[15c7d39] | 32 | <xsl:param name="verbose" select="1"/>
|
---|
| 33 | <xsl:if test="$verbose != 0">
|
---|
| 34 | <xsl:message>
|
---|
| 35 | <xsl:text>Request for subtitle of unexpected element: </xsl:text>
|
---|
| 36 | <xsl:value-of select="local-name(.)"/>
|
---|
| 37 | </xsl:message>
|
---|
| 38 | <xsl:text>???SUBTITLE???</xsl:text>
|
---|
| 39 | </xsl:if>
|
---|
[c873d807] | 40 | </xsl:template>
|
---|
| 41 |
|
---|
| 42 | <xsl:template match="subtitle" mode="subtitle.markup">
|
---|
| 43 | <xsl:param name="allow-anchors" select="'0'"/>
|
---|
[15c7d39] | 44 | <xsl:param name="verbose" select="1"/>
|
---|
[c873d807] | 45 | <xsl:apply-templates/>
|
---|
| 46 | </xsl:template>
|
---|
| 47 |
|
---|
| 48 | <xsl:template match="set" mode="subtitle.markup">
|
---|
| 49 | <xsl:param name="allow-anchors" select="'0'"/>
|
---|
[15c7d39] | 50 | <xsl:param name="verbose" select="1"/>
|
---|
[c873d807] | 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"/>
|
---|
[15c7d39] | 54 | <xsl:with-param name="verbose" select="$verbose"/>
|
---|
[c873d807] | 55 | </xsl:apply-templates>
|
---|
| 56 | </xsl:template>
|
---|
| 57 |
|
---|
| 58 | <xsl:template match="book" mode="subtitle.markup">
|
---|
| 59 | <xsl:param name="allow-anchors" select="'0'"/>
|
---|
[15c7d39] | 60 | <xsl:param name="verbose" select="1"/>
|
---|
[c873d807] | 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"/>
|
---|
[15c7d39] | 64 | <xsl:with-param name="verbose" select="$verbose"/>
|
---|
[c873d807] | 65 | </xsl:apply-templates>
|
---|
| 66 | </xsl:template>
|
---|
| 67 |
|
---|
| 68 | <xsl:template match="part" mode="subtitle.markup">
|
---|
| 69 | <xsl:param name="allow-anchors" select="'0'"/>
|
---|
[15c7d39] | 70 | <xsl:param name="verbose" select="1"/>
|
---|
[c873d807] | 71 | <xsl:apply-templates select="(partinfo/subtitle
|
---|
| 72 | |docinfo/subtitle
|
---|
| 73 | |info/subtitle
|
---|
| 74 | |subtitle)[1]"
|
---|
| 75 | mode="subtitle.markup">
|
---|
| 76 | <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
|
---|
[15c7d39] | 77 | <xsl:with-param name="verbose" select="$verbose"/>
|
---|
[c873d807] | 78 | </xsl:apply-templates>
|
---|
| 79 | </xsl:template>
|
---|
| 80 |
|
---|
| 81 | <xsl:template match="preface|chapter|appendix" mode="subtitle.markup">
|
---|
| 82 | <xsl:param name="allow-anchors" select="'0'"/>
|
---|
[15c7d39] | 83 | <xsl:param name="verbose" select="1"/>
|
---|
[c873d807] | 84 | <xsl:apply-templates select="(docinfo/subtitle
|
---|
| 85 | |info/subtitle
|
---|
| 86 | |prefaceinfo/subtitle
|
---|
| 87 | |chapterinfo/subtitle
|
---|
| 88 | |appendixinfo/subtitle
|
---|
| 89 | |subtitle)[1]"
|
---|
| 90 | mode="subtitle.markup">
|
---|
| 91 | <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
|
---|
[15c7d39] | 92 | <xsl:with-param name="verbose" select="$verbose"/>
|
---|
[c873d807] | 93 | </xsl:apply-templates>
|
---|
| 94 | </xsl:template>
|
---|
| 95 |
|
---|
| 96 | <xsl:template match="article" mode="subtitle.markup">
|
---|
| 97 | <xsl:param name="allow-anchors" select="'0'"/>
|
---|
[15c7d39] | 98 | <xsl:param name="verbose" select="1"/>
|
---|
[c873d807] | 99 | <xsl:apply-templates select="(artheader/subtitle
|
---|
| 100 | |articleinfo/subtitle
|
---|
| 101 | |info/subtitle
|
---|
| 102 | |subtitle)[1]"
|
---|
| 103 | mode="subtitle.markup">
|
---|
| 104 | <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
|
---|
[15c7d39] | 105 | <xsl:with-param name="verbose" select="$verbose"/>
|
---|
[c873d807] | 106 | </xsl:apply-templates>
|
---|
| 107 | </xsl:template>
|
---|
| 108 |
|
---|
| 109 | <xsl:template match="dedication|colophon" mode="subtitle.markup">
|
---|
| 110 | <xsl:param name="allow-anchors" select="'0'"/>
|
---|
[15c7d39] | 111 | <xsl:param name="verbose" select="1"/>
|
---|
[c873d807] | 112 | <xsl:apply-templates select="(subtitle|info/subtitle)[1]"
|
---|
| 113 | mode="subtitle.markup">
|
---|
| 114 | <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
|
---|
[15c7d39] | 115 | <xsl:with-param name="verbose" select="$verbose"/>
|
---|
[c873d807] | 116 | </xsl:apply-templates>
|
---|
| 117 | </xsl:template>
|
---|
| 118 |
|
---|
| 119 | <xsl:template match="reference" mode="subtitle.markup">
|
---|
| 120 | <xsl:param name="allow-anchors" select="'0'"/>
|
---|
[15c7d39] | 121 | <xsl:param name="verbose" select="1"/>
|
---|
[c873d807] | 122 | <xsl:apply-templates select="(referenceinfo/subtitle
|
---|
| 123 | |docinfo/subtitle
|
---|
| 124 | |info/subtitle
|
---|
| 125 | |subtitle)[1]"
|
---|
| 126 | mode="subtitle.markup">
|
---|
| 127 | <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
|
---|
[15c7d39] | 128 | <xsl:with-param name="verbose" select="$verbose"/>
|
---|
[c873d807] | 129 | </xsl:apply-templates>
|
---|
| 130 | </xsl:template>
|
---|
| 131 |
|
---|
| 132 | <xsl:template match="qandaset" mode="subtitle.markup">
|
---|
| 133 | <xsl:param name="allow-anchors" select="'0'"/>
|
---|
[15c7d39] | 134 | <xsl:param name="verbose" select="1"/>
|
---|
[c873d807] | 135 | <xsl:apply-templates select="(blockinfo/subtitle|info/subtitle)[1]"
|
---|
| 136 | mode="subtitle.markup">
|
---|
| 137 | <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
|
---|
[15c7d39] | 138 | <xsl:with-param name="verbose" select="$verbose"/>
|
---|
[c873d807] | 139 | </xsl:apply-templates>
|
---|
| 140 | </xsl:template>
|
---|
| 141 |
|
---|
| 142 | <xsl:template match="refentry" mode="subtitle.markup">
|
---|
| 143 | <xsl:param name="allow-anchors" select="'0'"/>
|
---|
[15c7d39] | 144 | <xsl:param name="verbose" select="1"/>
|
---|
[c873d807] | 145 | <xsl:apply-templates select="(refentryinfo/subtitle
|
---|
| 146 | |info/subtitle
|
---|
| 147 | |docinfo/subtitle)[1]"
|
---|
| 148 | mode="subtitle.markup">
|
---|
| 149 | <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
|
---|
[15c7d39] | 150 | <xsl:with-param name="verbose" select="$verbose"/>
|
---|
[c873d807] | 151 | </xsl:apply-templates>
|
---|
| 152 | </xsl:template>
|
---|
| 153 |
|
---|
| 154 | <xsl:template match="section
|
---|
| 155 | |sect1|sect2|sect3|sect4|sect5
|
---|
| 156 | |refsect1|refsect2|refsect3
|
---|
[15c7d39] | 157 | |topic
|
---|
[c873d807] | 158 | |simplesect"
|
---|
| 159 | mode="subtitle.markup">
|
---|
| 160 | <xsl:param name="allow-anchors" select="'0'"/>
|
---|
[15c7d39] | 161 | <xsl:param name="verbose" select="1"/>
|
---|
[c873d807] | 162 | <xsl:apply-templates select="(info/subtitle
|
---|
| 163 | |sectioninfo/subtitle
|
---|
| 164 | |sect1info/subtitle
|
---|
| 165 | |sect2info/subtitle
|
---|
| 166 | |sect3info/subtitle
|
---|
| 167 | |sect4info/subtitle
|
---|
| 168 | |sect5info/subtitle
|
---|
| 169 | |refsect1info/subtitle
|
---|
| 170 | |refsect2info/subtitle
|
---|
| 171 | |refsect3info/subtitle
|
---|
| 172 | |subtitle)[1]"
|
---|
| 173 | mode="subtitle.markup">
|
---|
| 174 | <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
|
---|
[15c7d39] | 175 | <xsl:with-param name="verbose" select="$verbose"/>
|
---|
[c873d807] | 176 | </xsl:apply-templates>
|
---|
| 177 | </xsl:template>
|
---|
| 178 |
|
---|
| 179 | </xsl:stylesheet>
|
---|
| 180 |
|
---|