source: branches/samba-3.2.x/docs-xml/xslt/db2latex-xsl/xsl/revision.mod.xsl@ 203

Last change on this file since 203 was 203, checked in by Herwig Bauernfeind, 17 years ago

Missing 3.2.2 client and HOWTO files

File size: 6.5 KB
Line 
1<?xml version='1.0'?>
2<!DOCTYPE xsl:stylesheet [ <!ENTITY % xsldoc.ent SYSTEM "./xsldoc.ent"> %xsldoc.ent; ]>
3<!--#############################################################################
4| $Id: revision.mod.xsl,v 1.7 2004/01/03 09:48:34 j-devenish Exp $
5|- #############################################################################
6| $Author: j-devenish $
7+ ############################################################################## -->
8
9<xsl:stylesheet
10 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
11 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
12 exclude-result-prefixes="doc" version='1.0'>
13
14 <doc:reference id="revision" xmlns="">
15 <referenceinfo>
16 <releaseinfo role="meta">
17 $Id: revision.mod.xsl,v 1.7 2004/01/03 09:48:34 j-devenish Exp $
18 </releaseinfo>
19 <authorgroup>
20 &ramon;
21 &james;
22 </authorgroup>
23 <copyright>
24 <year>2000</year><year>2001</year><year>2002</year><year>2003</year><year>2004</year>
25 <holder>Ramon Casellas</holder>
26 </copyright>
27 <revhistory>
28 <doc:revision rcasver="1.12">&rev_2003_05;</doc:revision>
29 </revhistory>
30 </referenceinfo>
31 <title>Revision Management <filename>revision.mod.xsl</filename></title>
32 <partintro>
33 <para>
34
35 This file defines the &DB2LaTeX; XSL templates for
36 <doc:db>revision</doc:db> and its children. The basic mapping
37 is to output a &LaTeX; table and a table row for each revision.
38
39 </para>
40 </partintro>
41 </doc:reference>
42
43 <doc:template xmlns="">
44 <refpurpose>Process <doc:db>revhistory</doc:db> elements</refpurpose>
45 <doc:description>
46 <para>
47
48 Format a list of <doc:db basename="revision">revisions</doc:db>
49 as a block.
50
51 </para>
52 </doc:description>
53 <doc:variables>
54 <itemizedlist>
55 <listitem><simpara><xref linkend="param.latex.output.revhistory"/></simpara></listitem>
56 </itemizedlist>
57 </doc:variables>
58 <doc:notes>
59 <para>
60 Uses a &LaTeX; mapping and applies templates.
61 </para>
62 </doc:notes>
63 <doc:samples>
64 <simplelist type='inline'>
65 &test_article;
66 &test_book;
67 &test_ddh;
68 &test_ieeebiblio;
69 &test_mapping;
70 &test_minimal;
71 </simplelist>
72 </doc:samples>
73 <doc:seealso>
74 <itemizedlist>
75 <listitem><simpara>&mapping;</simpara></listitem>
76 </itemizedlist>
77 </doc:seealso>
78 </doc:template>
79 <xsl:template match="revhistory">
80 <!--
81 <xsl:message>RCAS: Processing Revision History </xsl:message>
82 -->
83 <xsl:if test="$latex.output.revhistory=1">
84 <xsl:call-template name="map.begin"/>
85 <xsl:apply-templates/>
86 <xsl:call-template name="map.end"/>
87 </xsl:if>
88 </xsl:template>
89
90 <doc:template xmlns="">
91 <refpurpose>Process <doc:db>revision</doc:db> elements</refpurpose>
92 <doc:description>
93 <para>
94
95 Format a list of <doc:db basename="revision">revisions</doc:db>.
96
97 </para>
98 </doc:description>
99 <doc:variables>
100 &no_var;
101 </doc:variables>
102 <doc:notes>
103 <para>
104
105 Each <doc:db>revision</doc:db> corresponds to a &LaTeX; table
106 row containing the revision number, the date, author initials
107 and the description/ remarks of the revision.
108
109 </para>
110 </doc:notes>
111 <doc:samples>
112 <simplelist type='inline'>
113 &test_article;
114 &test_book;
115 &test_ddh;
116 &test_ieeebiblio;
117 &test_mapping;
118 &test_minimal;
119 </simplelist>
120 </doc:samples>
121 <doc:seealso>
122 <itemizedlist>
123 <listitem><simpara>Gentext</simpara></listitem>
124 </itemizedlist>
125 </doc:seealso>
126 </doc:template>
127 <xsl:template match="revision">
128 <xsl:variable name="revnumber" select=".//revnumber"/>
129 <xsl:variable name="revdate" select=".//date"/>
130 <xsl:variable name="revauthor" select=".//authorinitials"/>
131 <xsl:variable name="revremark" select=".//revremark|.//revdescription"/>
132 <!-- Row starts here -->
133 <xsl:if test="$revnumber">
134 <xsl:call-template name="gentext.element.name"/>
135 <xsl:text> </xsl:text>
136 <xsl:apply-templates select="$revnumber"/>
137 </xsl:if>
138 <xsl:text> &amp; </xsl:text>
139 <xsl:apply-templates select="$revdate"/>
140 <xsl:text> &amp; </xsl:text>
141 <xsl:choose>
142 <xsl:when test="count($revauthor)=0">
143 <xsl:call-template name="dingbat">
144 <xsl:with-param name="dingbat">nbsp</xsl:with-param>
145 </xsl:call-template>
146 </xsl:when>
147 <xsl:otherwise>
148 <xsl:apply-templates select="$revauthor"/>
149 </xsl:otherwise>
150 </xsl:choose>
151 <!-- End Row here -->
152 <xsl:text> \\ \hline&#10;</xsl:text>
153 <!-- Add Remark Row if exists-->
154 <xsl:if test="$revremark">
155 <xsl:text>\multicolumn{3}{|l|}{</xsl:text>
156 <xsl:apply-templates select="$revremark"/>
157 <!-- End Row here -->
158 <xsl:text>} \\ \hline&#10;</xsl:text>
159 </xsl:if>
160 </xsl:template>
161
162
163 <doc:template basename="authorinitials" xmlns="">
164 <refpurpose>Process a <doc:db>revision</doc:db>'s <doc:db>authorinitials</doc:db> elements</refpurpose>
165 <doc:description>
166 <para>
167 Applies templates.
168 </para>
169 </doc:description>
170 <doc:variables>
171 &no_var;
172 </doc:variables>
173 <doc:notes>
174 <para>
175 Applies templates and outputs a "comma" between multiple
176 <doc:db>authorinitials</doc:db> elements.
177 </para>
178 </doc:notes>
179 </doc:template>
180 <xsl:template match="revision/authorinitials">
181 <xsl:apply-templates/>
182 <xsl:if test="following-sibling::authorinitials">
183 <xsl:text>, </xsl:text>
184 </xsl:if>
185 </xsl:template>
186
187 <doc:template xmlns="">
188 <refpurpose>Process <doc:db>revnumber</doc:db> elements</refpurpose>
189 <doc:description>
190 <para>
191 Applies templates.
192 </para>
193 </doc:description>
194 <doc:variables>
195 &no_var;
196 </doc:variables>
197 </doc:template>
198 <xsl:template match="revnumber">
199 <xsl:apply-templates/>
200 </xsl:template>
201
202 <doc:template basename="date" xmlns="">
203 <refpurpose>Process a <doc:db>revision</doc:db>'s <doc:db>date</doc:db> elements</refpurpose>
204 <doc:description>
205 <para>
206 Applies templates.
207 </para>
208 </doc:description>
209 <doc:variables>
210 &no_var;
211 </doc:variables>
212 </doc:template>
213 <xsl:template match="revision/date">
214 <xsl:apply-templates/>
215 </xsl:template>
216
217 <doc:template xmlns="">
218 <refpurpose>Process <doc:db>revremark</doc:db> elements</refpurpose>
219 <doc:description>
220 <para>
221 Applies templates.
222 </para>
223 </doc:description>
224 <doc:variables>
225 &no_var;
226 </doc:variables>
227 </doc:template>
228 <xsl:template match="revremark">
229 <xsl:apply-templates/>
230 </xsl:template>
231
232 <doc:template xmlns="">
233 <refpurpose>Process <doc:db>revdescription</doc:db> elements</refpurpose>
234 <doc:description>
235 <para>
236 Applies templates.
237 </para>
238 </doc:description>
239 <doc:variables>
240 &no_var;
241 </doc:variables>
242 </doc:template>
243 <xsl:template match="revdescription">
244 <xsl:apply-templates/>
245 </xsl:template>
246
247</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.