summaryrefslogtreecommitdiff
path: root/docs-xml/xslt/db2latex-xsl/xsl/keywords.mod.xsl
blob: f059b0c59039590487785348f78c924d0d0ee51a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?xml version='1.0'?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY % xsldoc.ent SYSTEM "./xsldoc.ent"> %xsldoc.ent; ]>
<!--############################################################################# 
|	$Id: keywords.mod.xsl,v 1.7 2004/01/09 12:02:15 j-devenish Exp $
|- #############################################################################
|	$Author: j-devenish $
+ ############################################################################## -->
<xsl:stylesheet
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
	exclude-result-prefixes="doc" version='1.0'>

	<doc:reference id="keywords" xmlns="">
		<referenceinfo>
			<releaseinfo role="meta">
				$Id: keywords.mod.xsl,v 1.7 2004/01/09 12:02:15 j-devenish Exp $
			</releaseinfo>
			<authorgroup>
				&ramon;
				&james;
			</authorgroup>
			<copyright>
				<year>2000</year><year>2001</year><year>2002</year><year>2003</year>
				<holder>Ramon Casellas</holder>
			</copyright>
			<revhistory>
				<doc:revision rcasver="1.6">&rev_2003_05;</doc:revision>
			</revhistory>
		</referenceinfo>
		<title>Keywords <filename>keywords.mod.xsl</filename></title>
		<partintro>
			<para>The file <filename>keywords.mod.xsl</filename> contains the
			XSL templates for <doc:db>keywordsset</doc:db>
			and <doc:db>sectionset</doc:db>.</para>
		</partintro>
	</doc:reference>

	<doc:template xmlns="">
		<refpurpose>Process <doc:db>keywordset</doc:db> elements</refpurpose>
		<doc:description>
			<para>
				Uses a &LaTeX; mapping to express a block representation
				of keywords.
			</para>
		</doc:description>
		<doc:variables>
			&no_var;
		</doc:variables>
		<doc:notes>

			<para><doc:db>keywordset</doc:db>s are only rendered in a limited
			number of situations.</para>

		</doc:notes>
		<doc:samples>
			<simplelist type='inline'>
				&test_book;
			</simplelist>
		</doc:samples>
		<doc:seealso>
			<itemizedlist>
				<listitem><para>&mapping;</para></listitem>
			</itemizedlist>
		</doc:seealso>
	</doc:template>

	<xsl:template match="keywordset">
		<xsl:call-template name="map.begin"/>
		<xsl:call-template name="gentext.template">
			<xsl:with-param name="context" select="'naturalblocklist'"/>
			<xsl:with-param name="name" select="'start'"/>
		</xsl:call-template>
		<xsl:apply-templates/>
		<xsl:call-template name="gentext.template">
			<xsl:with-param name="context" select="'naturalblocklist'"/>
			<xsl:with-param name="name" select="'end'"/>
		</xsl:call-template>
		<xsl:call-template name="map.end"/>
	</xsl:template>

	<doc:template xmlns="">
		<refpurpose>Process <doc:db basename="keyword">keywords</doc:db></refpurpose>
		<doc:description>
			<para>
				Emits keywords as regular text plus a separator.
			</para>
		</doc:description>
		<doc:variables>
			<itemizedlist>
				<listitem><simpara>Localisation for the <literal>keyword.separator</literal> in the <literal>keywordset</literal> context.</simpara></listitem>
			</itemizedlist>
		</doc:variables>
		<doc:samples>
			<simplelist type='inline'>
				&test_book;
			</simplelist>
		</doc:samples>
	</doc:template>

	<xsl:template match="keyword">
		<xsl:if test="position() &gt; 1">
			<xsl:choose>
				<xsl:when test="position()=last() and position() &gt; 2">
					<xsl:call-template name="gentext.template">
						<xsl:with-param name="context" select="'naturalblocklist'"/>
						<xsl:with-param name="name" select="'lastofmany'"/>
					</xsl:call-template>
				</xsl:when>
				<xsl:when test="position()=last()">
					<xsl:call-template name="gentext.template">
						<xsl:with-param name="context" select="'naturalblocklist'"/>
						<xsl:with-param name="name" select="'lastoftwo'"/>
					</xsl:call-template>
				</xsl:when>
				<xsl:otherwise>
					<xsl:call-template name="gentext.template">
						<xsl:with-param name="context" select="'naturalblocklist'"/>
						<xsl:with-param name="name" select="'middle'"/>
					</xsl:call-template>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
		<xsl:call-template name="inline.charseq"/>
	</xsl:template>

	<doc:template match="subjectset|subject" xmlns="">
		<refpurpose>Process <doc:db>subjectset</doc:db> elements</refpurpose>
		<doc:description>
			<para>
				Suppresses <doc:db basename="subjectset">subjectsets</doc:db>.
			</para>
		</doc:description>
		<doc:variables>
			&no_var;
		</doc:variables>
	</doc:template>

	<xsl:template match="subjectset"/>

</xsl:stylesheet>