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<!-- ============================================================ --> 8<!-- subtitle markup --> 9 10<doc:mode mode="subtitle.markup" xmlns=""> 11<refpurpose>Provides access to element subtitles</refpurpose> 12<refdescription> 13<para>Processing an element in the 14<literal role="mode">subtitle.markup</literal> mode produces the 15subtitle of the element. 16</para> 17</refdescription> 18</doc:mode> 19 20<xsl:template match="*" mode="subtitle.markup"> 21 <xsl:message> 22 <xsl:text>Request for subtitle of unexpected element: </xsl:text> 23 <xsl:value-of select="name(.)"/> 24 </xsl:message> 25 <xsl:text>???SUBTITLE???</xsl:text> 26</xsl:template> 27 28<xsl:template match="subtitle" mode="subtitle.markup"> 29 <xsl:param name="allow-anchors" select="'0'"/> 30 <xsl:apply-templates/> 31</xsl:template> 32 33<xsl:template match="set" mode="subtitle.markup"> 34 <xsl:param name="allow-anchors" select="'0'"/> 35 <xsl:apply-templates select="(setinfo/subtitle|subtitle)[1]" 36 mode="subtitle.markup"> 37 <xsl:with-param name="allow-anchors" select="$allow-anchors"/> 38 </xsl:apply-templates> 39</xsl:template> 40 41<xsl:template match="book" mode="subtitle.markup"> 42 <xsl:param name="allow-anchors" select="'0'"/> 43 <xsl:apply-templates select="(bookinfo/subtitle|subtitle)[1]" 44 mode="subtitle.markup"> 45 <xsl:with-param name="allow-anchors" select="$allow-anchors"/> 46 </xsl:apply-templates> 47</xsl:template> 48 49<xsl:template match="part" mode="subtitle.markup"> 50 <xsl:param name="allow-anchors" select="'0'"/> 51 <xsl:apply-templates select="(partinfo/subtitle 52 |docinfo/subtitle 53 |subtitle)[1]" 54 mode="subtitle.markup"> 55 <xsl:with-param name="allow-anchors" select="$allow-anchors"/> 56 </xsl:apply-templates> 57</xsl:template> 58 59<xsl:template match="preface|chapter|appendix" mode="subtitle.markup"> 60 <xsl:param name="allow-anchors" select="'0'"/> 61 <xsl:apply-templates select="(docinfo/subtitle 62 |prefaceinfo/subtitle 63 |chapterinfo/subtitle 64 |appendixinfo/subtitle 65 |subtitle)[1]" 66 mode="subtitle.markup"> 67 <xsl:with-param name="allow-anchors" select="$allow-anchors"/> 68 </xsl:apply-templates> 69</xsl:template> 70 71<xsl:template match="article" mode="subtitle.markup"> 72 <xsl:param name="allow-anchors" select="'0'"/> 73 <xsl:apply-templates select="(artheader/subtitle 74 |articleinfo/subtitle 75 |subtitle)[1]" 76 mode="subtitle.markup"> 77 <xsl:with-param name="allow-anchors" select="$allow-anchors"/> 78 </xsl:apply-templates> 79</xsl:template> 80 81<xsl:template match="dedication|colophon" mode="subtitle.markup"> 82 <xsl:param name="allow-anchors" select="'0'"/> 83 <xsl:apply-templates select="subtitle" 84 mode="subtitle.markup"> 85 <xsl:with-param name="allow-anchors" select="$allow-anchors"/> 86 </xsl:apply-templates> 87</xsl:template> 88 89<xsl:template match="reference" mode="subtitle.markup"> 90 <xsl:param name="allow-anchors" select="'0'"/> 91 <xsl:apply-templates select="(referenceinfo/subtitle 92 |docinfo/subtitle 93 |subtitle)[1]" 94 mode="subtitle.markup"> 95 <xsl:with-param name="allow-anchors" select="$allow-anchors"/> 96 </xsl:apply-templates> 97</xsl:template> 98 99<xsl:template match="refentry" mode="subtitle.markup"> 100 <xsl:param name="allow-anchors" select="'0'"/> 101 <xsl:apply-templates select="(refentryinfo/subtitle 102 |docinfo/subtitle)[1]" 103 mode="subtitle.markup"> 104 <xsl:with-param name="allow-anchors" select="$allow-anchors"/> 105 </xsl:apply-templates> 106</xsl:template> 107 108<xsl:template match="section 109 |sect1|sect2|sect3|sect4|sect5 110 |refsect1|refsect2|refsect3 111 |simplesect" 112 mode="subtitle.markup"> 113 <xsl:param name="allow-anchors" select="'0'"/> 114 <xsl:apply-templates select="(sectioninfo/subtitle 115 |sect1info/subtitle 116 |sect2info/subtitle 117 |sect3info/subtitle 118 |sect4info/subtitle 119 |sect5info/subtitle 120 |refsect1info/subtitle 121 |refsect2info/subtitle 122 |refsect3info/subtitle 123 |subtitle)[1]" 124 mode="subtitle.markup"> 125 <xsl:with-param name="allow-anchors" select="$allow-anchors"/> 126 </xsl:apply-templates> 127</xsl:template> 128 129</xsl:stylesheet> 130 131