~zulcss/samba/server-dailies-3.4

« back to all changes in this revision

Viewing changes to docs-xml/xslt/db2latex-xsl/xsl/common/subtitles.xsl

  • Committer: Chuck Short
  • Date: 2010-09-28 20:38:39 UTC
  • Revision ID: zulcss@ubuntu.com-20100928203839-pgjulytsi9ue63x1
Initial version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
     $Id: subtitles.xsl,v 1.2 2004/01/04 09:25:57 j-devenish Exp $
 
9
     ********************************************************************
 
10
 
 
11
     This file is part of the XSL DocBook Stylesheet distribution.
 
12
 
 
13
     Copyright (C) 1999, 2000, 2001, 2002 Norman Walsh.
 
14
     ******************************************************************** -->
 
15
 
 
16
<!-- ==================================================================== -->
 
17
 
 
18
<!-- subtitle markup -->
 
19
 
 
20
<doc:mode mode="subtitle.markup" xmlns="">
 
21
<refpurpose>Provides access to element subtitles</refpurpose>
 
22
<refdescription>
 
23
<para>Processing an element in the
 
24
<literal role="mode">subtitle.markup</literal> mode produces the
 
25
subtitle of the element.
 
26
</para>
 
27
</refdescription>
 
28
</doc:mode>
 
29
 
 
30
<xsl:template match="*" mode="subtitle.markup">
 
31
  <xsl:message>
 
32
    <xsl:text>Request for subtitle of unexpected element: </xsl:text>
 
33
    <xsl:value-of select="name(.)"/>
 
34
  </xsl:message>
 
35
  <xsl:text>???SUBTITLE???</xsl:text>
 
36
</xsl:template>
 
37
 
 
38
<xsl:template match="subtitle" mode="subtitle.markup">
 
39
  <xsl:param name="allow-anchors" select="'0'"/>
 
40
  <xsl:apply-templates/>
 
41
</xsl:template>
 
42
 
 
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>
 
49
</xsl:template>
 
50
 
 
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>
 
57
</xsl:template>
 
58
 
 
59
<xsl:template match="part" mode="subtitle.markup">
 
60
  <xsl:param name="allow-anchors" select="'0'"/>
 
61
  <xsl:apply-templates select="(partinfo/subtitle
 
62
                                |docinfo/subtitle
 
63
                                |subtitle)[1]"
 
64
                       mode="subtitle.markup">
 
65
    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
 
66
  </xsl:apply-templates>
 
67
</xsl:template>
 
68
 
 
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
 
72
                                |prefaceinfo/subtitle
 
73
                                |chapterinfo/subtitle
 
74
                                |appendixinfo/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="article" mode="subtitle.markup">
 
82
  <xsl:param name="allow-anchors" select="'0'"/>
 
83
  <xsl:apply-templates select="(artheader/subtitle
 
84
                                |articleinfo/subtitle
 
85
                                |subtitle)[1]"
 
86
                       mode="subtitle.markup">
 
87
    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
 
88
  </xsl:apply-templates>
 
89
</xsl:template>
 
90
 
 
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>
 
97
</xsl:template>
 
98
 
 
99
<xsl:template match="reference" mode="subtitle.markup">
 
100
  <xsl:param name="allow-anchors" select="'0'"/>
 
101
  <xsl:apply-templates select="(referenceinfo/subtitle
 
102
                                |docinfo/subtitle
 
103
                                |subtitle)[1]"
 
104
                       mode="subtitle.markup">
 
105
    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
 
106
  </xsl:apply-templates>
 
107
</xsl:template>
 
108
 
 
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>
 
116
</xsl:template>
 
117
 
 
118
<xsl:template match="section
 
119
                     |sect1|sect2|sect3|sect4|sect5
 
120
                     |refsect1|refsect2|refsect3
 
121
                     |simplesect"
 
122
              mode="subtitle.markup">
 
123
  <xsl:param name="allow-anchors" select="'0'"/>
 
124
  <xsl:apply-templates select="(sectioninfo/subtitle
 
125
                                |sect1info/subtitle
 
126
                                |sect2info/subtitle
 
127
                                |sect3info/subtitle
 
128
                                |sect4info/subtitle
 
129
                                |sect5info/subtitle
 
130
                                |refsect1info/subtitle
 
131
                                |refsect2info/subtitle
 
132
                                |refsect3info/subtitle
 
133
                                |subtitle)[1]"
 
134
                       mode="subtitle.markup">
 
135
    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
 
136
  </xsl:apply-templates>
 
137
</xsl:template>
 
138
 
 
139
</xsl:stylesheet>
 
140