1 | <?xml version="1.0" encoding="ASCII"?> |
---|
2 | <!--This file was created automatically by html2xhtml--> |
---|
3 | <!--from the HTML stylesheets.--> |
---|
4 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> |
---|
5 | |
---|
6 | <!-- ******************************************************************** |
---|
7 | $Id$ |
---|
8 | ******************************************************************** |
---|
9 | |
---|
10 | This file is part of the XSL DocBook Stylesheet distribution. |
---|
11 | See ../README or http://docbook.sf.net/release/xsl/current/ for |
---|
12 | copyright and other information. |
---|
13 | |
---|
14 | ******************************************************************** --> |
---|
15 | |
---|
16 | <!-- ==================================================================== --> |
---|
17 | <!-- What should we do about styling blockinfo? --> |
---|
18 | |
---|
19 | <xsl:template match="blockinfo|info"> |
---|
20 | <!-- suppress --> |
---|
21 | </xsl:template> |
---|
22 | |
---|
23 | <!-- ==================================================================== --> |
---|
24 | |
---|
25 | <xsl:template name="block.object"> |
---|
26 | <div> |
---|
27 | <xsl:apply-templates select="." mode="class.attribute"/> |
---|
28 | <xsl:call-template name="anchor"/> |
---|
29 | <xsl:apply-templates/> |
---|
30 | </div> |
---|
31 | </xsl:template> |
---|
32 | |
---|
33 | <!-- ==================================================================== --> |
---|
34 | |
---|
35 | <xsl:template match="para"> |
---|
36 | <xsl:call-template name="paragraph"> |
---|
37 | <xsl:with-param name="class"> |
---|
38 | <xsl:if test="@role and $para.propagates.style != 0"> |
---|
39 | <xsl:value-of select="@role"/> |
---|
40 | </xsl:if> |
---|
41 | </xsl:with-param> |
---|
42 | <xsl:with-param name="content"> |
---|
43 | <xsl:if test="position() = 1 and parent::listitem"> |
---|
44 | <xsl:call-template name="anchor"> |
---|
45 | <xsl:with-param name="node" select="parent::listitem"/> |
---|
46 | </xsl:call-template> |
---|
47 | </xsl:if> |
---|
48 | |
---|
49 | <xsl:call-template name="anchor"/> |
---|
50 | <xsl:apply-templates/> |
---|
51 | </xsl:with-param> |
---|
52 | </xsl:call-template> |
---|
53 | </xsl:template> |
---|
54 | |
---|
55 | <xsl:template name="paragraph"> |
---|
56 | <xsl:param name="class" select="''"/> |
---|
57 | <xsl:param name="content"/> |
---|
58 | |
---|
59 | <xsl:variable name="p"> |
---|
60 | <p> |
---|
61 | <xsl:call-template name="dir"/> |
---|
62 | <xsl:if test="$class != ''"> |
---|
63 | <xsl:apply-templates select="." mode="class.attribute"> |
---|
64 | <xsl:with-param name="class" select="$class"/> |
---|
65 | </xsl:apply-templates> |
---|
66 | </xsl:if> |
---|
67 | <xsl:copy-of select="$content"/> |
---|
68 | </p> |
---|
69 | </xsl:variable> |
---|
70 | |
---|
71 | <xsl:choose> |
---|
72 | <xsl:when test="$html.cleanup != 0"> |
---|
73 | <xsl:call-template name="unwrap.p"> |
---|
74 | <xsl:with-param name="p" select="$p"/> |
---|
75 | </xsl:call-template> |
---|
76 | </xsl:when> |
---|
77 | <xsl:otherwise> |
---|
78 | <xsl:copy-of select="$p"/> |
---|
79 | </xsl:otherwise> |
---|
80 | </xsl:choose> |
---|
81 | </xsl:template> |
---|
82 | |
---|
83 | <xsl:template match="simpara"> |
---|
84 | <!-- see also listitem/simpara in lists.xsl --> |
---|
85 | <p> |
---|
86 | <xsl:if test="@role and $para.propagates.style != 0"> |
---|
87 | <xsl:apply-templates select="." mode="class.attribute"> |
---|
88 | <xsl:with-param name="class" select="@role"/> |
---|
89 | </xsl:apply-templates> |
---|
90 | </xsl:if> |
---|
91 | |
---|
92 | <xsl:call-template name="anchor"/> |
---|
93 | <xsl:apply-templates/> |
---|
94 | </p> |
---|
95 | </xsl:template> |
---|
96 | |
---|
97 | <xsl:template match="formalpara"> |
---|
98 | <xsl:call-template name="paragraph"> |
---|
99 | <xsl:with-param name="class"> |
---|
100 | <xsl:if test="@role and $para.propagates.style != 0"> |
---|
101 | <xsl:value-of select="@role"/> |
---|
102 | </xsl:if> |
---|
103 | </xsl:with-param> |
---|
104 | <xsl:with-param name="content"> |
---|
105 | <xsl:call-template name="anchor"/> |
---|
106 | <xsl:apply-templates/> |
---|
107 | </xsl:with-param> |
---|
108 | </xsl:call-template> |
---|
109 | </xsl:template> |
---|
110 | |
---|
111 | <!-- Only use title from info --> |
---|
112 | <xsl:template match="formalpara/info"> |
---|
113 | <xsl:apply-templates select="title"/> |
---|
114 | </xsl:template> |
---|
115 | |
---|
116 | <xsl:template match="formalpara/title|formalpara/info/title"> |
---|
117 | <xsl:variable name="titleStr"> |
---|
118 | <xsl:apply-templates/> |
---|
119 | </xsl:variable> |
---|
120 | <xsl:variable name="lastChar"> |
---|
121 | <xsl:if test="$titleStr != ''"> |
---|
122 | <xsl:value-of select="substring($titleStr,string-length($titleStr),1)"/> |
---|
123 | </xsl:if> |
---|
124 | </xsl:variable> |
---|
125 | |
---|
126 | <b> |
---|
127 | <xsl:copy-of select="$titleStr"/> |
---|
128 | <xsl:if test="$lastChar != '' and not(contains($runinhead.title.end.punct, $lastChar))"> |
---|
129 | <xsl:value-of select="$runinhead.default.title.end.punct"/> |
---|
130 | </xsl:if> |
---|
131 | <xsl:text> </xsl:text> |
---|
132 | </b> |
---|
133 | </xsl:template> |
---|
134 | |
---|
135 | <xsl:template match="formalpara/para"> |
---|
136 | <xsl:apply-templates/> |
---|
137 | </xsl:template> |
---|
138 | |
---|
139 | <!-- ==================================================================== --> |
---|
140 | |
---|
141 | <xsl:template match="blockquote"> |
---|
142 | <div> |
---|
143 | <xsl:apply-templates select="." mode="class.attribute"/> |
---|
144 | <xsl:if test="@lang or @xml:lang"> |
---|
145 | <xsl:call-template name="language.attribute"/> |
---|
146 | </xsl:if> |
---|
147 | <xsl:call-template name="anchor"/> |
---|
148 | |
---|
149 | <xsl:choose> |
---|
150 | <xsl:when test="attribution"> |
---|
151 | <table border="0" width="100%" cellspacing="0" cellpadding="0" class="blockquote" summary="Block quote"> |
---|
152 | <tr> |
---|
153 | <td width="10%" valign="top"> </td> |
---|
154 | <td width="80%" valign="top"> |
---|
155 | <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/> |
---|
156 | </td> |
---|
157 | <td width="10%" valign="top"> </td> |
---|
158 | </tr> |
---|
159 | <tr> |
---|
160 | <td width="10%" valign="top"> </td> |
---|
161 | <td colspan="2" align="right" valign="top"> |
---|
162 | <xsl:text>--</xsl:text> |
---|
163 | <xsl:apply-templates select="attribution"/> |
---|
164 | </td> |
---|
165 | </tr> |
---|
166 | </table> |
---|
167 | </xsl:when> |
---|
168 | <xsl:otherwise> |
---|
169 | <blockquote> |
---|
170 | <xsl:apply-templates select="." mode="class.attribute"/> |
---|
171 | <xsl:apply-templates/> |
---|
172 | </blockquote> |
---|
173 | </xsl:otherwise> |
---|
174 | </xsl:choose> |
---|
175 | </div> |
---|
176 | </xsl:template> |
---|
177 | |
---|
178 | <xsl:template match="blockquote/title|blockquote/info/title"> |
---|
179 | <div class="blockquote-title"> |
---|
180 | <p> |
---|
181 | <b> |
---|
182 | <xsl:apply-templates/> |
---|
183 | </b> |
---|
184 | </p> |
---|
185 | </div> |
---|
186 | </xsl:template> |
---|
187 | |
---|
188 | <xsl:template match="epigraph"> |
---|
189 | <div> |
---|
190 | <xsl:apply-templates select="." mode="class.attribute"/> |
---|
191 | <xsl:apply-templates select="para|simpara|formalpara|literallayout"/> |
---|
192 | <xsl:if test="attribution"> |
---|
193 | <div class="attribution"> |
---|
194 | <span>--<xsl:apply-templates select="attribution"/></span> |
---|
195 | </div> |
---|
196 | </xsl:if> |
---|
197 | </div> |
---|
198 | </xsl:template> |
---|
199 | |
---|
200 | <xsl:template match="attribution"> |
---|
201 | <span> |
---|
202 | <xsl:apply-templates select="." mode="class.attribute"/> |
---|
203 | <xsl:apply-templates/> |
---|
204 | </span> |
---|
205 | </xsl:template> |
---|
206 | |
---|
207 | <!-- ==================================================================== --> |
---|
208 | |
---|
209 | <xsl:template match="abstract|sidebar"> |
---|
210 | <div> |
---|
211 | <xsl:apply-templates select="." mode="class.attribute"/> |
---|
212 | <xsl:call-template name="anchor"/> |
---|
213 | <xsl:call-template name="formal.object.heading"> |
---|
214 | <xsl:with-param name="title"> |
---|
215 | <xsl:apply-templates select="." mode="title.markup"> |
---|
216 | <xsl:with-param name="allow-anchors" select="'1'"/> |
---|
217 | </xsl:apply-templates> |
---|
218 | </xsl:with-param> |
---|
219 | </xsl:call-template> |
---|
220 | <xsl:apply-templates/> |
---|
221 | </div> |
---|
222 | </xsl:template> |
---|
223 | |
---|
224 | <xsl:template match="abstract/title|sidebar/title"> |
---|
225 | </xsl:template> |
---|
226 | |
---|
227 | <xsl:template match="sidebar/sidebarinfo|sidebar/info"/> |
---|
228 | |
---|
229 | <!-- ==================================================================== --> |
---|
230 | |
---|
231 | <xsl:template match="msgset"> |
---|
232 | <xsl:apply-templates/> |
---|
233 | </xsl:template> |
---|
234 | |
---|
235 | <xsl:template match="msgentry"> |
---|
236 | <xsl:call-template name="block.object"/> |
---|
237 | </xsl:template> |
---|
238 | |
---|
239 | <xsl:template match="simplemsgentry"> |
---|
240 | <xsl:call-template name="block.object"/> |
---|
241 | </xsl:template> |
---|
242 | |
---|
243 | <xsl:template match="msg"> |
---|
244 | <xsl:call-template name="block.object"/> |
---|
245 | </xsl:template> |
---|
246 | |
---|
247 | <xsl:template match="msgmain"> |
---|
248 | <xsl:apply-templates/> |
---|
249 | </xsl:template> |
---|
250 | |
---|
251 | <xsl:template match="msgmain/title"> |
---|
252 | <b><xsl:apply-templates/></b> |
---|
253 | </xsl:template> |
---|
254 | |
---|
255 | <xsl:template match="msgsub"> |
---|
256 | <xsl:apply-templates/> |
---|
257 | </xsl:template> |
---|
258 | |
---|
259 | <xsl:template match="msgsub/title"> |
---|
260 | <b><xsl:apply-templates/></b> |
---|
261 | </xsl:template> |
---|
262 | |
---|
263 | <xsl:template match="msgrel"> |
---|
264 | <xsl:apply-templates/> |
---|
265 | </xsl:template> |
---|
266 | |
---|
267 | <xsl:template match="msgrel/title"> |
---|
268 | <b><xsl:apply-templates/></b> |
---|
269 | </xsl:template> |
---|
270 | |
---|
271 | <xsl:template match="msgtext"> |
---|
272 | <xsl:apply-templates/> |
---|
273 | </xsl:template> |
---|
274 | |
---|
275 | <xsl:template match="msginfo"> |
---|
276 | <xsl:call-template name="block.object"/> |
---|
277 | </xsl:template> |
---|
278 | |
---|
279 | <xsl:template match="msglevel"> |
---|
280 | <p> |
---|
281 | <b> |
---|
282 | <xsl:call-template name="gentext.template"> |
---|
283 | <xsl:with-param name="context" select="'msgset'"/> |
---|
284 | <xsl:with-param name="name" select="'MsgLevel'"/> |
---|
285 | </xsl:call-template> |
---|
286 | </b> |
---|
287 | <xsl:apply-templates/> |
---|
288 | </p> |
---|
289 | </xsl:template> |
---|
290 | |
---|
291 | <xsl:template match="msgorig"> |
---|
292 | <p> |
---|
293 | <b> |
---|
294 | <xsl:call-template name="gentext.template"> |
---|
295 | <xsl:with-param name="context" select="'msgset'"/> |
---|
296 | <xsl:with-param name="name" select="'MsgOrig'"/> |
---|
297 | </xsl:call-template> |
---|
298 | </b> |
---|
299 | <xsl:apply-templates/> |
---|
300 | </p> |
---|
301 | </xsl:template> |
---|
302 | |
---|
303 | <xsl:template match="msgaud"> |
---|
304 | <p> |
---|
305 | <b> |
---|
306 | <xsl:call-template name="gentext.template"> |
---|
307 | <xsl:with-param name="context" select="'msgset'"/> |
---|
308 | <xsl:with-param name="name" select="'MsgAud'"/> |
---|
309 | </xsl:call-template> |
---|
310 | </b> |
---|
311 | <xsl:apply-templates/> |
---|
312 | </p> |
---|
313 | </xsl:template> |
---|
314 | |
---|
315 | <xsl:template match="msgexplan"> |
---|
316 | <xsl:call-template name="block.object"/> |
---|
317 | </xsl:template> |
---|
318 | |
---|
319 | <xsl:template match="msgexplan/title"> |
---|
320 | <p><b><xsl:apply-templates/></b></p> |
---|
321 | </xsl:template> |
---|
322 | |
---|
323 | <!-- ==================================================================== --> |
---|
324 | |
---|
325 | <xsl:template match="revhistory"> |
---|
326 | <div> |
---|
327 | <xsl:apply-templates select="." mode="class.attribute"/> |
---|
328 | <table border="0" width="100%" summary="Revision history"> |
---|
329 | <tr> |
---|
330 | <th align="left" valign="top" colspan="3"> |
---|
331 | <b> |
---|
332 | <xsl:call-template name="gentext"> |
---|
333 | <xsl:with-param name="key" select="'RevHistory'"/> |
---|
334 | </xsl:call-template> |
---|
335 | </b> |
---|
336 | </th> |
---|
337 | </tr> |
---|
338 | <xsl:apply-templates/> |
---|
339 | </table> |
---|
340 | </div> |
---|
341 | </xsl:template> |
---|
342 | |
---|
343 | <xsl:template match="revhistory/revision"> |
---|
344 | <xsl:variable name="revnumber" select="revnumber"/> |
---|
345 | <xsl:variable name="revdate" select="date"/> |
---|
346 | <xsl:variable name="revauthor" select="authorinitials|author"/> |
---|
347 | <xsl:variable name="revremark" select="revremark|revdescription"/> |
---|
348 | <tr> |
---|
349 | <td align="left"> |
---|
350 | <xsl:if test="$revnumber"> |
---|
351 | <xsl:call-template name="gentext"> |
---|
352 | <xsl:with-param name="key" select="'Revision'"/> |
---|
353 | </xsl:call-template> |
---|
354 | <xsl:call-template name="gentext.space"/> |
---|
355 | <xsl:apply-templates select="$revnumber"/> |
---|
356 | </xsl:if> |
---|
357 | </td> |
---|
358 | <td align="left"> |
---|
359 | <xsl:apply-templates select="$revdate"/> |
---|
360 | </td> |
---|
361 | <xsl:choose> |
---|
362 | <xsl:when test="count($revauthor)=0"> |
---|
363 | <td align="left"> |
---|
364 | <xsl:call-template name="dingbat"> |
---|
365 | <xsl:with-param name="dingbat">nbsp</xsl:with-param> |
---|
366 | </xsl:call-template> |
---|
367 | </td> |
---|
368 | </xsl:when> |
---|
369 | <xsl:otherwise> |
---|
370 | <td align="left"> |
---|
371 | <xsl:for-each select="$revauthor"> |
---|
372 | <xsl:apply-templates select="."/> |
---|
373 | <xsl:if test="position() != last()"> |
---|
374 | <xsl:text>, </xsl:text> |
---|
375 | </xsl:if> |
---|
376 | </xsl:for-each> |
---|
377 | </td> |
---|
378 | </xsl:otherwise> |
---|
379 | </xsl:choose> |
---|
380 | </tr> |
---|
381 | <xsl:if test="$revremark"> |
---|
382 | <tr> |
---|
383 | <td align="left" colspan="3"> |
---|
384 | <xsl:apply-templates select="$revremark"/> |
---|
385 | </td> |
---|
386 | </tr> |
---|
387 | </xsl:if> |
---|
388 | </xsl:template> |
---|
389 | |
---|
390 | <xsl:template match="revision/revnumber"> |
---|
391 | <xsl:apply-templates/> |
---|
392 | </xsl:template> |
---|
393 | |
---|
394 | <xsl:template match="revision/date"> |
---|
395 | <xsl:apply-templates/> |
---|
396 | </xsl:template> |
---|
397 | |
---|
398 | <xsl:template match="revision/authorinitials"> |
---|
399 | <xsl:text>, </xsl:text> |
---|
400 | <xsl:apply-templates/> |
---|
401 | </xsl:template> |
---|
402 | |
---|
403 | <xsl:template match="revision/authorinitials[1]" priority="2"> |
---|
404 | <xsl:apply-templates/> |
---|
405 | </xsl:template> |
---|
406 | |
---|
407 | <xsl:template match="revision/revremark"> |
---|
408 | <xsl:apply-templates/> |
---|
409 | </xsl:template> |
---|
410 | |
---|
411 | <xsl:template match="revision/revdescription"> |
---|
412 | <xsl:apply-templates/> |
---|
413 | </xsl:template> |
---|
414 | |
---|
415 | <!-- ==================================================================== --> |
---|
416 | |
---|
417 | <xsl:template match="ackno"> |
---|
418 | <p> |
---|
419 | <xsl:apply-templates select="." mode="class.attribute"/> |
---|
420 | <xsl:apply-templates/> |
---|
421 | </p> |
---|
422 | </xsl:template> |
---|
423 | |
---|
424 | <!-- ==================================================================== --> |
---|
425 | |
---|
426 | <xsl:template match="highlights"> |
---|
427 | <xsl:call-template name="block.object"/> |
---|
428 | </xsl:template> |
---|
429 | |
---|
430 | <!-- ==================================================================== --> |
---|
431 | |
---|
432 | </xsl:stylesheet> |
---|