Don't explicitly send MotionNotify event during Resize (GeometryWindow)
[fvwm.git] / doc / fvwm-man.xsl
blobaea34da7c8567b0f2e7fe3fd537e9ee7624f75e7
1 <?xml version='1.0'?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:exsl="http://exslt.org/common"
4 xmlns:ng="http://docbook.org/docbook-ng"
5 xmlns:db="http://docbook.org/ns/docbook"
6 exclude-result-prefixes="exsl"
7 version='1.0'>
9 <xsl:import href="docbook-xsl/html/docbook.xsl"/>
10 <xsl:import href="docbook-xsl/html/manifest.xsl"/>
11 <!-- * html-synop.xsl file is generated by build -->
12 <xsl:import href="docbook-xsl/manpages/html-synop.xsl"/>
13 <xsl:import href="docbook-xsl/manpages/synop.xsl"/>
14 <xsl:import href="docbook-xsl/manpages/lists.xsl"/>
15 <!-- we need to overrade apostroph escapment defined in other.xsl -->
16 <xsl:import href="docbook-xsl/manpages/other.xsl"/>
18 <xsl:output method="text"
19 encoding="UTF-8"
20 indent="no"/>
21 <!-- ********************************************************************
22 $Id: fvwm-man.xsl,v 1.12 2007/08/17 17:02:03 griph Exp $
23 ********************************************************************
25 This file is part of the XSL DocBook Stylesheet distribution.
26 See ../README or http://docbook.sf.net/release/xsl/current/ for
27 copyright and other information.
29 ******************************************************************** -->
31 <!-- ==================================================================== -->
33 <xsl:include href="docbook-xsl/common/refentry.xsl"/>
34 <xsl:include href="docbook-xsl/manpages/param.xsl"/>
35 <xsl:include href="docbook-xsl/manpages/utility.xsl"/>
36 <xsl:include href="docbook-xsl/manpages/info.xsl"/>
37 <xsl:include href="docbook-xsl/manpages/refentry.xsl"/>
38 <xsl:include href="docbook-xsl/manpages/block.xsl"/>
39 <xsl:include href="docbook-xsl/manpages/inline.xsl"/>
40 <xsl:include href="docbook-xsl/manpages/endnotes.xsl"/>
41 <xsl:include href="docbook-xsl/manpages/table.xsl"/>
43 <!-- * we rename the following just to avoid using params with "man" -->
44 <!-- * prefixes in the table.xsl stylesheet (because that stylesheet -->
45 <!-- * can potentially be reused for more than just man output) -->
46 <xsl:param name="tbl.font.headings" select="$man.font.table.headings"/>
47 <xsl:param name="tbl.font.title" select="$man.font.table.title"/>
49 <!-- ==================================================================== -->
51 <!--xsl:variable name="arg.or.sep">|</xsl:variable-->
52 <xsl:variable name="arg.choice.plain.close.str"></xsl:variable>
53 <xsl:variable name="arg.rep.repeat.str"> ...</xsl:variable>
55 <xsl:template match="section">
56 <xsl:apply-templates/>
57 </xsl:template>
59 <!-- don't escape apostrophs, but put them on the previous line if they start
60 one -->
61 <xsl:template name="escape.apostrophe">
62 <xsl:param name="content"/>
63 <xsl:call-template name="string.subst">
64 <xsl:with-param name="string" select="$content"/>
65 <xsl:with-param name="target">&#10;'</xsl:with-param>
66 <xsl:with-param name="replacement"> '</xsl:with-param>
67 </xsl:call-template>
68 </xsl:template>
71 <xsl:template match="section/title">
72 <xsl:text>.SH </xsl:text>
73 <xsl:call-template name="string.upper">
74 <xsl:with-param name="string">
75 <xsl:apply-templates/>
76 </xsl:with-param>
77 </xsl:call-template>
78 <xsl:text>&#10;</xsl:text>
79 </xsl:template>
81 <xsl:template match="section/section/title">
82 <xsl:text>.SS </xsl:text>
83 <xsl:apply-templates/>
84 <xsl:text>&#10;</xsl:text>
85 </xsl:template>
87 <xsl:template match="section/section/section/title">
89 <xsl:choose>
90 <xsl:when test="parent::section//cmdsynopsis/@command = text()">
91 </xsl:when>
92 <xsl:when test="parent::section//cmdsynopsis/command/text() = text()">
93 <!-- this is no good when there are multiple cmdsynopsis children -->
94 <!--xsl:apply-templates select="parent::section//cmdsynopsis/*"/-->
95 </xsl:when>
96 <xsl:otherwise>
97 <xsl:text>.TP&#10;</xsl:text>
98 <xsl:text>.B </xsl:text>
99 <xsl:apply-templates/>
100 <xsl:text>&#10;.RS&#10;</xsl:text>
101 <!-- We don't want .PP from following paras, this is a hack for that -->
102 <xsl:text>.\&quot;</xsl:text>
103 </xsl:otherwise>
104 </xsl:choose>
105 </xsl:template>
107 <xsl:template match="section/section/section">
108 <xsl:apply-templates/>
109 <xsl:text>.RE&#10;</xsl:text>
110 </xsl:template>
112 <xsl:template match="section/section/section//cmdsynopsis">
113 <xsl:choose>
114 <xsl:when test="parent::section/title/text() = command/text() or @command = parent::section/title/text()">
115 <xsl:if test="preceding-sibling::cmdsynopsis/command/text() = command/text()">
116 <xsl:text>.RE&#10;</xsl:text>
117 </xsl:if>
118 <xsl:text>.TP&#10;</xsl:text>
119 <xsl:apply-templates select="*"/>
120 <xsl:text>&#10;.RS&#10;</xsl:text>
121 <!-- We don't want .PP from following paras, this is a hack for that -->
122 <xsl:text>.\&quot;</xsl:text>
123 </xsl:when>
124 <xsl:otherwise>
125 <xsl:apply-imports/>
126 <!--xsl:text>&#10;</xsl:text-->
127 </xsl:otherwise>
128 </xsl:choose>
129 </xsl:template>
131 <xsl:template match="simplelist">
132 <xsl:text>.nf&#10;</xsl:text>
133 <xsl:text>.IP ""</xsl:text>
134 <xsl:if test="not($list-indent = '')">
135 <xsl:text> </xsl:text>
136 <xsl:value-of select="$list-indent"/>
137 </xsl:if>
138 <xsl:text>&#10;</xsl:text>
139 <xsl:for-each select="member">
140 <xsl:variable name="content">
141 <xsl:apply-templates/>
142 </xsl:variable>
143 <xsl:value-of select="normalize-space($content)"/>
144 <xsl:text>&#10;</xsl:text>
145 </xsl:for-each>
146 <xsl:text>.fi&#10;</xsl:text>
147 </xsl:template>
149 <xsl:template mode="small" match="*">
150 <xsl:for-each select="node()">
151 <xsl:text>&#10;.SM </xsl:text>
152 <xsl:value-of select="normalize-space(.)"/>
153 <xsl:text>&#10;</xsl:text>
154 </xsl:for-each>
155 </xsl:template>
157 <xsl:template match="keysym">
158 <xsl:apply-templates mode="small" select="."/>
159 </xsl:template>
161 <xsl:template match="envar">
162 <xsl:apply-templates mode="italic" select="."/>
163 </xsl:template>
165 <!-- fvwmopt -->
166 <xsl:template match="fvwmopt">
167 <xsl:text>\fI</xsl:text>
168 <xsl:value-of select="@opt"/>
169 <xsl:text>\fR</xsl:text>
170 </xsl:template>
172 <!-- * paragraphs starting with a blank line adds extra space in some
173 * cases were we don't want it. Work around that, and make sentenses
174 * have two spaces inbetween in the same time. -->
176 <xsl:template name="normalize-paragraph">
177 <xsl:param name="content"/>
178 <xsl:choose>
179 <xsl:when test="starts-with($content,'&#10;') or starts-with($content,' ')">
180 <xsl:call-template name="normalize-paragraph">
181 <xsl:with-param name="content" select="substring($content,2)"/>
182 </xsl:call-template>
183 </xsl:when>
184 <xsl:when test="contains($content,'&#10;&#10;')">
185 <xsl:variable name='pcontent'>
186 <xsl:value-of select="substring-before($content,'&#10;&#10;')"/>
187 </xsl:variable>
188 <xsl:choose>
189 <xsl:when test="contains($pcontent,'. ') or contains($pcontent,'&#10; ')">
190 <xsl:call-template name="normalize-paragraph">
191 <xsl:with-param name="content" select="$pcontent"/>
192 </xsl:call-template>
193 </xsl:when>
194 <xsl:otherwise>
195 <xsl:value-of select="$pcontent"/>
196 </xsl:otherwise>
197 </xsl:choose>
198 <xsl:text>&#10;</xsl:text>
199 <xsl:variable name="rcontent">
200 <xsl:value-of select="substring-after($content,'&#10;&#10;')"/>
201 </xsl:variable>
202 <xsl:choose>
203 <xsl:when test="starts-with($rcontent,'&#10;') or starts-with($rcontent,' ')">
204 <xsl:call-template name="normalize-paragraph">
205 <xsl:with-param name="content" select="substring($rcontent,2)"/>
206 </xsl:call-template>
207 </xsl:when>
208 <xsl:when test="contains($rcontent,'&#10;&#10;') or contains($rcontent,'. ')">
209 <xsl:call-template name="normalize-paragraph">
210 <xsl:with-param name="content" select="$rcontent"/>
211 </xsl:call-template>
212 </xsl:when>
213 <xsl:otherwise>
214 <xsl:value-of select="$rcontent"/>
215 </xsl:otherwise>
216 </xsl:choose>
217 </xsl:when>
218 <!-- spaces at the start of lines must be removed -->
219 <xsl:when test="contains($content,'&#10; ')">
220 <xsl:variable name='pcontent'>
221 <xsl:value-of select="substring-before($content,'&#10; ')"/>
222 </xsl:variable>
223 <xsl:choose>
224 <xsl:when test="contains($pcontent,'. ')">
225 <xsl:call-template name="normalize-paragraph">
226 <xsl:with-param name="content" select="$pcontent"/>
227 </xsl:call-template>
228 </xsl:when>
229 <xsl:otherwise>
230 <xsl:value-of select="$pcontent"/>
231 </xsl:otherwise>
232 </xsl:choose>
233 <xsl:text>&#10;</xsl:text>
234 <xsl:variable name="rcontent">
235 <xsl:value-of select="substring-after($content,'&#10; ')"/>
236 </xsl:variable>
237 <xsl:choose>
238 <xsl:when test="starts-with($rcontent,'&#10;') or starts-with($rcontent,' ')">
239 <xsl:call-template name="normalize-paragraph">
240 <xsl:with-param name="content" select="substring($rcontent,2)"/>
241 </xsl:call-template>
242 </xsl:when>
243 <xsl:when test="contains($rcontent,'&#10; ') or contains($rcontent,'&#10;&#10;') or contains($rcontent,'. ')">
244 <xsl:call-template name="normalize-paragraph">
245 <xsl:with-param name="content" select="$rcontent"/>
246 </xsl:call-template>
247 </xsl:when>
248 <xsl:otherwise>
249 <xsl:value-of select="$rcontent"/>
250 </xsl:otherwise>
251 </xsl:choose>
252 </xsl:when>
253 <xsl:when test="contains($content,'. ')">
254 <xsl:variable name='pcontent'>
255 <xsl:value-of select="substring-before($content,'. ')"/>
256 </xsl:variable>
257 <xsl:variable name='spcontent'>
258 <xsl:value-of select="substring($pcontent,string-length($pcontent)-3)"/>
259 </xsl:variable>
260 <xsl:value-of select="$pcontent"/>
261 <xsl:text>. </xsl:text>
262 <xsl:if test="not(contains($spcontent,'.')) or contains('0123456789)',substring($spcontent,3,1))">
263 <xsl:text> </xsl:text>
264 </xsl:if>
265 <xsl:call-template name="normalize-paragraph">
266 <xsl:with-param name="content" select="substring-after($content,'. ')"/>
267 </xsl:call-template>
268 </xsl:when>
269 <xsl:otherwise>
270 <xsl:value-of select="$content"/>
271 </xsl:otherwise>
272 </xsl:choose>
273 </xsl:template>
275 <xsl:template match="para[ancestor::listitem]">
276 <xsl:call-template name="normalize-paragraph">
277 <xsl:with-param name="content">
278 <xsl:apply-imports/>
279 </xsl:with-param>
280 </xsl:call-template>
281 </xsl:template>
283 <xsl:template match="para">
284 <!-- just &#10; is enough for most cases, and make less need for .RS
285 in all places, however it reduces spaces in some less desireable
286 places -->
287 <xsl:text>.PP&#10;</xsl:text>
288 <xsl:variable name="rawcontent">
289 <xsl:apply-templates/>
290 </xsl:variable>
291 <xsl:variable name="content">
292 <!-- normalize spaces, but not newlisnes -->
293 <xsl:value-of select="translate(normalize-space(translate($rawcontent,'&#10;','&#63743;')),'&#63743;','&#10;')"/>
294 </xsl:variable>
295 <!-- * Add some check to remove double newlines within the paragraph
296 * but keep single newlines since there might be formatting -->
297 <xsl:choose>
298 <xsl:when test="contains($content,'&#10; ') or contains($content,'&#10;&#10;') or starts-with($content,'&#10;') or contains($content,'. ')">
299 <xsl:call-template name="normalize-paragraph">
300 <xsl:with-param name="content" select="$content"/>
301 </xsl:call-template>
302 </xsl:when>
303 <xsl:otherwise>
304 <xsl:value-of select="$content"/>
305 </xsl:otherwise>
306 </xsl:choose>
307 <!-- <xsl:apply-templates/> -->
308 <xsl:text>&#10;</xsl:text>
309 </xsl:template>
312 <!-- fvwmref -->
313 <xsl:template match="fvwmref">
314 <xsl:choose>
315 <xsl:when test="@sect">
316 <xsl:text>\fB</xsl:text>
317 <xsl:value-of select="@name"/>
318 <xsl:text>\fR</xsl:text>
319 </xsl:when>
320 <xsl:when test="@opt">
321 <xsl:text>\fI</xsl:text>
322 <xsl:value-of select="@opt"/>
323 <xsl:text>\fR</xsl:text>
324 </xsl:when>
325 <xsl:otherwise>
326 <xsl:text>\fB</xsl:text>
327 <xsl:choose>
328 <xsl:when test="@cmd">
329 <xsl:value-of select="@cmd"/>
330 </xsl:when>
331 <xsl:when test="@mod">
332 <xsl:value-of select="@mod"/>
333 </xsl:when>
334 <!-- anything else should be an error -->
335 </xsl:choose>
336 <xsl:text>\fR</xsl:text>
337 </xsl:otherwise>
338 </xsl:choose>
339 </xsl:template>
342 <xsl:template match="section/command">
343 <xsl:text>&#10;</xsl:text>
344 <xsl:text>.sp&#10;</xsl:text>
345 <xsl:text>.RS</xsl:text>
346 <xsl:text> </xsl:text>
347 <xsl:value-of select="$man.indent.width"/>
348 <xsl:text>&#10;</xsl:text>
349 <xsl:text>.nf&#10;</xsl:text>
350 <xsl:apply-templates/>
351 <xsl:text>&#10;</xsl:text>
352 <xsl:text>.fi&#10;</xsl:text>
353 <xsl:text>.RE&#10;</xsl:text>
354 <xsl:text>.PP&#10;</xsl:text>
355 </xsl:template>
358 <xsl:template name="get.fvwm.metadata">
359 <title>
360 <xsl:value-of select="artheader/titleabbrev"/>
361 </title>
362 <section>
363 <xsl:text>1</xsl:text>
364 </section>
365 <date>
366 <xsl:value-of select="artheader/date"/>
367 </date>
368 <source>
369 </source>
370 <manual>
371 <xsl:value-of select="artheader/title"/>
372 </manual>
373 </xsl:template>
375 <!-- escape special characters (as for <refentry>) -->
376 <xsl:template match="//article//text()">
377 <xsl:call-template name="escape.roff.specials">
378 <xsl:with-param name="content">
379 <xsl:value-of select="."/>
380 </xsl:with-param>
381 </xsl:call-template>
382 </xsl:template>
385 <!-- ==================================================================== -->
387 <xsl:template match="/">
388 <xsl:choose>
389 <xsl:when test="//article">
390 <!-- * Check to see if we have any refentry children in this -->
391 <!-- * document; if so, process them. -->
392 <xsl:apply-templates select="//article"/>
393 <!-- * if $man.output.manifest.enabled is non-zero, -->
394 <!-- * generate a manifest file -->
395 <xsl:if test="not($man.output.manifest.enabled = 0)">
396 <xsl:call-template name="generate.manifest">
397 <xsl:with-param name="filename">
398 <xsl:choose>
399 <xsl:when test="not($man.output.manifest.filename = '')">
400 <!-- * If a name for the manifest file is specified, -->
401 <!-- * use that name. -->
402 <xsl:value-of select="$man.output.manifest.filename"/>
403 </xsl:when>
404 <xsl:otherwise>
405 <!-- * Otherwise, if user has unset -->
406 <!-- * $man.output.manifest.filename, default to -->
407 <!-- * using "MAN.MANIFEST" as the filename. Because -->
408 <!-- * $man.output.manifest.enabled is non-zero and -->
409 <!-- * so we must have a filename in order to -->
410 <!-- * generate the manifest. -->
411 <xsl:text>MAN.MANIFEST</xsl:text>
412 </xsl:otherwise>
413 </xsl:choose>
414 </xsl:with-param>
415 </xsl:call-template>
416 </xsl:if>
417 </xsl:when>
418 <xsl:otherwise>
419 <!-- * Otherwise, the document does not contain any -->
420 <!-- * refentry elements, so emit message and stop. -->
421 <xsl:variable name="title">
422 <!-- * Get a title so that we let the user know what -->
423 <!-- * document we are processing at this point. -->
424 <xsl:choose>
425 <xsl:when test="title">
426 <xsl:value-of select="title[1]"/>
427 </xsl:when>
428 <xsl:when test="substring(local-name(*[1]),
429 string-length(local-name(*[1])-3) = 'info')
430 and *[1]/title">
431 <xsl:value-of select="*[1]/title[1]"/>
432 </xsl:when>
433 </xsl:choose>
434 </xsl:variable>
435 <xsl:message>
436 <xsl:text>Note: No article elements found in "</xsl:text>
437 <xsl:value-of select="local-name(.)"/>
438 <xsl:if test="$title != ''">
439 <xsl:choose>
440 <xsl:when test="string-length($title) &gt; 30">
441 <xsl:value-of select="substring($title,1,30)"/>
442 <xsl:text>...</xsl:text>
443 </xsl:when>
444 <xsl:otherwise>
445 <xsl:value-of select="$title"/>
446 </xsl:otherwise>
447 </xsl:choose>
448 </xsl:if>
449 <xsl:text>"</xsl:text>
450 </xsl:message>
451 </xsl:otherwise>
452 </xsl:choose>
453 </xsl:template>
455 <!-- ============================================================== -->
457 <xsl:template match="article">
458 <xsl:param name="lang">
459 <xsl:call-template name="l10n.language"/>
460 </xsl:param>
461 <!-- * Just use the first refname found as the "name" of the man -->
462 <!-- * page (which may different from the "title"...) -->
463 <!--
464 <xsl:variable name="first.refname" select="refnamediv[1]/refname[1]"/>
466 <xsl:variable name="first.refname" select="artheader/titleabbrev"/>
468 <xsl:call-template name="root.messages">
469 <xsl:with-param name="refname" select="$first.refname"/>
470 </xsl:call-template>
472 <!-- * Because there are several times when we need to check *info of -->
473 <!-- * each refentry and its ancestors, we get those and store the -->
474 <!-- * data from them as a node-set in memory. -->
476 <!-- * Make a node-set with contents of *info -->
477 <xsl:variable name="get.info"
478 select="ancestor-or-self::*/*[substring(local-name(),
479 string-length(local-name()) - 3) = 'info']"
481 <xsl:variable name="info" select="exsl:node-set($get.info)"/>
483 <!-- * The get.refentry.metadata template is in -->
484 <!-- * ../common/refentry.xsl. It looks for metadata in $info -->
485 <!-- * and in various other places and then puts it into a form -->
486 <!-- * that's easier for us to digest. -->
488 <xsl:variable name="get.refentry.metadata">
489 <xsl:call-template name="get.fvwm.metadata">
490 <xsl:with-param name="refname" select="$first.refname"/>
491 <xsl:with-param name="info" select="$info"/>
492 <xsl:with-param name="prefs" select="$refentry.metadata.prefs"/>
493 </xsl:call-template>
494 </xsl:variable>
495 <xsl:variable name="refentry.metadata" select="exsl:node-set($get.refentry.metadata)"/>
498 <!-- * Assemble the various parts into a complete page, then store into -->
499 <!-- * $manpage.contents so that we can manipluate them further. -->
500 <xsl:variable name="manpage.contents">
501 <!-- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
502 <!-- * top.comment = commented-out section at top of roff source -->
503 <!-- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
504 <xsl:call-template name="top.comment">
505 <xsl:with-param name="info" select="$info"/>
506 <xsl:with-param name="date" select="$refentry.metadata/date"/>
507 <xsl:with-param name="title" select="$refentry.metadata/title"/>
508 <xsl:with-param name="manual" select="$refentry.metadata/manual"/>
509 <xsl:with-param name="source" select="$refentry.metadata/source"/>
510 </xsl:call-template>
511 <!-- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
512 <!-- * TH.title.line = title line in header/footer of man page -->
513 <!-- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
514 <xsl:call-template name="TH.title.line">
515 <!-- * .TH TITLE section extra1 extra2 extra3 -->
516 <!-- * -->
517 <!-- * According to the man(7) man page: -->
518 <!-- * -->
519 <!-- * extra1 = date, "the date of the last revision" -->
520 <!-- * extra2 = source, "the source of the command" -->
521 <!-- * extra3 = manual, "the title of the manual -->
522 <!-- * (e.g., Linux Programmer's Manual)" -->
523 <!-- * -->
524 <!-- * So, we end up with: -->
525 <!-- * -->
526 <!-- * .TH TITLE section date source manual -->
527 <!-- * -->
528 <xsl:with-param name="title" select="$refentry.metadata/title"/>
529 <xsl:with-param name="section" select="$refentry.metadata/section"/>
530 <xsl:with-param name="extra1" select="$refentry.metadata/date"/>
531 <xsl:with-param name="extra2" select="$refentry.metadata/source"/>
532 <xsl:with-param name="extra3" select="$refentry.metadata/manual"/>
533 </xsl:call-template>
534 <!-- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
535 <!-- * Set default hyphenation, justification, indentation, and -->
536 <!-- * line-breaking -->
537 <!-- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
538 <xsl:call-template name="set.default.formatting"/>
539 <!-- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
540 <!-- * Main body of man page -->
541 <!-- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
542 <xsl:apply-templates/>
543 <!-- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
544 <!-- * AUTHOR section -->
545 <!-- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
546 <xsl:call-template name="author.section">
547 <xsl:with-param name="info" select="$info"/>
548 </xsl:call-template>
549 <!-- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
550 <!-- * COPYRIGHT section -->
551 <!-- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
552 <xsl:call-template name="copyright.section">
553 <xsl:with-param name="info" select="$info"/>
554 </xsl:call-template>
555 <!-- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
556 <!-- * NOTES list (only if user wants endnotes numbered and/or listed) -->
557 <!-- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
558 <xsl:if test="$man.endnotes.list.enabled != 0 or
559 $man.endnotes.are.numbered != 0">
560 <xsl:call-template name="endnotes.list"/>
561 </xsl:if>
562 </xsl:variable> <!-- * end of manpage.contents -->
564 <!-- * Prepare the page contents for final output, then store in -->
565 <!-- * $manpage.contents.prepared so the we can pass it on to the -->
566 <!-- * write.text.chunk() function -->
567 <xsl:variable name="manpage.contents.prepared">
568 <!-- * "Preparing" the page contents involves, at a minimum, -->
569 <!-- * doubling any backslashes found (so they aren't interpreted -->
570 <!-- * as roff escapes). -->
571 <!-- * -->
572 <!-- * If $charmap.enabled is true, "preparing" the page contents also -->
573 <!-- * involves applying a character map to convert Unicode symbols and -->
574 <!-- * special characters into corresponding roff escape sequences. -->
575 <xsl:call-template name="prepare.manpage.contents">
576 <xsl:with-param name="content" select="$manpage.contents"/>
577 </xsl:call-template>
578 </xsl:variable>
580 <!-- * Write the prepared page contents to disk to create -->
581 <!-- * the final man page. -->
582 <xsl:call-template name="write.man.file">
583 <xsl:with-param name="name" select="$first.refname"/>
584 <xsl:with-param name="section" select="$refentry.metadata/section"/>
585 <xsl:with-param name="lang" select="$lang"/>
586 <xsl:with-param name="content" select="$manpage.contents.prepared"/>
587 </xsl:call-template>
589 <!-- * Generate "stub" (alias) pages (if any needed) -->
590 <xsl:call-template name="write.stubs">
591 <xsl:with-param name="first.refname" select="$first.refname"/>
592 <xsl:with-param name="section" select="$refentry.metadata/section"/>
593 <xsl:with-param name="lang" select="$lang"/>
594 </xsl:call-template>
596 </xsl:template>
598 </xsl:stylesheet>
600 <!-- vim:ts=2 sw=2