Next update of VFS modules development guide
[gd/samba-autobuild/.git] / docs / xslt / db2latex-xsl / xsl / keywords.mod.xsl
1 <?xml version='1.0'?>
2 <!DOCTYPE xsl:stylesheet [ <!ENTITY % xsldoc.ent SYSTEM "./xsldoc.ent"> %xsldoc.ent; ]>
3 <!--############################################################################# 
4 |       $Id: keywords.mod.xsl,v 1.7 2004/01/09 12:02:15 j-devenish Exp $
5 |- #############################################################################
6 |       $Author: j-devenish $
7 + ############################################################################## -->
8 <xsl:stylesheet
9         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10         xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
11         exclude-result-prefixes="doc" version='1.0'>
12
13         <doc:reference id="keywords" xmlns="">
14                 <referenceinfo>
15                         <releaseinfo role="meta">
16                                 $Id: keywords.mod.xsl,v 1.7 2004/01/09 12:02:15 j-devenish Exp $
17                         </releaseinfo>
18                         <authorgroup>
19                                 &ramon;
20                                 &james;
21                         </authorgroup>
22                         <copyright>
23                                 <year>2000</year><year>2001</year><year>2002</year><year>2003</year>
24                                 <holder>Ramon Casellas</holder>
25                         </copyright>
26                         <revhistory>
27                                 <doc:revision rcasver="1.6">&rev_2003_05;</doc:revision>
28                         </revhistory>
29                 </referenceinfo>
30                 <title>Keywords <filename>keywords.mod.xsl</filename></title>
31                 <partintro>
32                         <para>The file <filename>keywords.mod.xsl</filename> contains the
33                         XSL templates for <doc:db>keywordsset</doc:db>
34                         and <doc:db>sectionset</doc:db>.</para>
35                 </partintro>
36         </doc:reference>
37
38         <doc:template xmlns="">
39                 <refpurpose>Process <doc:db>keywordset</doc:db> elements</refpurpose>
40                 <doc:description>
41                         <para>
42                                 Uses a &LaTeX; mapping to express a block representation
43                                 of keywords.
44                         </para>
45                 </doc:description>
46                 <doc:variables>
47                         &no_var;
48                 </doc:variables>
49                 <doc:notes>
50
51                         <para><doc:db>keywordset</doc:db>s are only rendered in a limited
52                         number of situations.</para>
53
54                 </doc:notes>
55                 <doc:samples>
56                         <simplelist type='inline'>
57                                 &test_book;
58                         </simplelist>
59                 </doc:samples>
60                 <doc:seealso>
61                         <itemizedlist>
62                                 <listitem><para>&mapping;</para></listitem>
63                         </itemizedlist>
64                 </doc:seealso>
65         </doc:template>
66
67         <xsl:template match="keywordset">
68                 <xsl:call-template name="map.begin"/>
69                 <xsl:call-template name="gentext.template">
70                         <xsl:with-param name="context" select="'naturalblocklist'"/>
71                         <xsl:with-param name="name" select="'start'"/>
72                 </xsl:call-template>
73                 <xsl:apply-templates/>
74                 <xsl:call-template name="gentext.template">
75                         <xsl:with-param name="context" select="'naturalblocklist'"/>
76                         <xsl:with-param name="name" select="'end'"/>
77                 </xsl:call-template>
78                 <xsl:call-template name="map.end"/>
79         </xsl:template>
80
81         <doc:template xmlns="">
82                 <refpurpose>Process <doc:db basename="keyword">keywords</doc:db></refpurpose>
83                 <doc:description>
84                         <para>
85                                 Emits keywords as regular text plus a separator.
86                         </para>
87                 </doc:description>
88                 <doc:variables>
89                         <itemizedlist>
90                                 <listitem><simpara>Localisation for the <literal>keyword.separator</literal> in the <literal>keywordset</literal> context.</simpara></listitem>
91                         </itemizedlist>
92                 </doc:variables>
93                 <doc:samples>
94                         <simplelist type='inline'>
95                                 &test_book;
96                         </simplelist>
97                 </doc:samples>
98         </doc:template>
99
100         <xsl:template match="keyword">
101                 <xsl:if test="position() &gt; 1">
102                         <xsl:choose>
103                                 <xsl:when test="position()=last() and position() &gt; 2">
104                                         <xsl:call-template name="gentext.template">
105                                                 <xsl:with-param name="context" select="'naturalblocklist'"/>
106                                                 <xsl:with-param name="name" select="'lastofmany'"/>
107                                         </xsl:call-template>
108                                 </xsl:when>
109                                 <xsl:when test="position()=last()">
110                                         <xsl:call-template name="gentext.template">
111                                                 <xsl:with-param name="context" select="'naturalblocklist'"/>
112                                                 <xsl:with-param name="name" select="'lastoftwo'"/>
113                                         </xsl:call-template>
114                                 </xsl:when>
115                                 <xsl:otherwise>
116                                         <xsl:call-template name="gentext.template">
117                                                 <xsl:with-param name="context" select="'naturalblocklist'"/>
118                                                 <xsl:with-param name="name" select="'middle'"/>
119                                         </xsl:call-template>
120                                 </xsl:otherwise>
121                         </xsl:choose>
122                 </xsl:if>
123                 <xsl:call-template name="inline.charseq"/>
124         </xsl:template>
125
126         <doc:template match="subjectset|subject" xmlns="">
127                 <refpurpose>Process <doc:db>subjectset</doc:db> elements</refpurpose>
128                 <doc:description>
129                         <para>
130                                 Suppresses <doc:db basename="subjectset">subjectsets</doc:db>.
131                         </para>
132                 </doc:description>
133                 <doc:variables>
134                         &no_var;
135                 </doc:variables>
136         </doc:template>
137
138         <xsl:template match="subjectset"/>
139
140 </xsl:stylesheet>