source: trunk/Distribution/XSL/xhtml/block.xsl@ 2

Last change on this file since 2 was 2, checked in by jkacer, 18 years ago

Added all DocBook Framework stuff:

  • DocBook DTD
  • Transformation software FOP 0.20.5 and Saxon 6
  • XSL styles
  • Rexx scripts

Also added some WarpIN-related stuff for creation of WarpIN installation packages.
This state corresponds to version 1.0.0 from November 2005, just slightly modified to carry versioning information (Rexx scripts).

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