docbook_xsl_wrapper 0.1.2 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -0
  3. data/CHANGELOG +41 -0
  4. data/README.md +9 -17
  5. data/bin/docbook_xsl_wrapper +9 -14
  6. data/docbook_xsl_wrapper.gemspec +8 -7
  7. data/lib/docbook_xsl_wrapper.rb +24 -1
  8. data/lib/docbook_xsl_wrapper/epub.rb +124 -122
  9. data/lib/docbook_xsl_wrapper/options.rb +1 -1
  10. data/lib/docbook_xsl_wrapper/validate.rb +22 -0
  11. data/lib/docbook_xsl_wrapper/version.rb +1 -1
  12. data/schema/docbookxi.rng +18654 -0
  13. data/spec/docbook_xsl_wrapper/validate_spec.rb +64 -0
  14. data/xsl/AUTHORS +4 -0
  15. data/xsl/COPYING +48 -0
  16. data/xsl/REVISION +1 -0
  17. data/xsl/VERSION.xsl +115 -0
  18. data/xsl/common/addns.xsl +124 -0
  19. data/xsl/common/af.xml +1272 -0
  20. data/xsl/common/am.xml +1272 -0
  21. data/xsl/common/ar.xml +1272 -0
  22. data/xsl/common/as.xml +703 -0
  23. data/xsl/common/ast.xml +703 -0
  24. data/xsl/common/autoidx-kimber.xsl +45 -0
  25. data/xsl/common/autoidx-kosek.xsl +155 -0
  26. data/xsl/common/az.xml +715 -0
  27. data/xsl/common/bg.xml +767 -0
  28. data/xsl/common/bn.xml +1272 -0
  29. data/xsl/common/bn_in.xml +703 -0
  30. data/xsl/common/bs.xml +705 -0
  31. data/xsl/common/ca.xml +703 -0
  32. data/xsl/common/charmap.xsl +222 -0
  33. data/xsl/common/common.xsl +2129 -0
  34. data/xsl/common/cs.xml +743 -0
  35. data/xsl/common/cy.xml +1288 -0
  36. data/xsl/common/da.xml +707 -0
  37. data/xsl/common/de.xml +709 -0
  38. data/xsl/common/el.xml +772 -0
  39. data/xsl/common/en.xml +1272 -0
  40. data/xsl/common/entities.ent +67 -0
  41. data/xsl/common/eo.xml +1272 -0
  42. data/xsl/common/es.xml +719 -0
  43. data/xsl/common/et.xml +1272 -0
  44. data/xsl/common/eu.xml +1272 -0
  45. data/xsl/common/fa.xml +703 -0
  46. data/xsl/common/fi.xml +713 -0
  47. data/xsl/common/fr.xml +733 -0
  48. data/xsl/common/ga.xml +1272 -0
  49. data/xsl/common/gentext.xsl +855 -0
  50. data/xsl/common/gl.xml +1272 -0
  51. data/xsl/common/gu.xml +703 -0
  52. data/xsl/common/he.xml +1272 -0
  53. data/xsl/common/hi.xml +703 -0
  54. data/xsl/common/hr.xml +705 -0
  55. data/xsl/common/hu.xml +721 -0
  56. data/xsl/common/id.xml +1272 -0
  57. data/xsl/common/insertfile.xsl +113 -0
  58. data/xsl/common/is.xml +715 -0
  59. data/xsl/common/it.xml +1272 -0
  60. data/xsl/common/ja.xml +703 -0
  61. data/xsl/common/ka.xml +743 -0
  62. data/xsl/common/kn.xml +1272 -0
  63. data/xsl/common/ko.xml +1272 -0
  64. data/xsl/common/ky.xml +775 -0
  65. data/xsl/common/l10n.dtd +64 -0
  66. data/xsl/common/l10n.xml +78 -0
  67. data/xsl/common/l10n.xsl +598 -0
  68. data/xsl/common/la.xml +1272 -0
  69. data/xsl/common/labels.xsl +933 -0
  70. data/xsl/common/lt.xml +721 -0
  71. data/xsl/common/lv.xml +1272 -0
  72. data/xsl/common/ml.xml +703 -0
  73. data/xsl/common/mn.xml +773 -0
  74. data/xsl/common/mr.xml +703 -0
  75. data/xsl/common/nb.xml +1272 -0
  76. data/xsl/common/nds.xml +709 -0
  77. data/xsl/common/nl.xml +703 -0
  78. data/xsl/common/nn.xml +1272 -0
  79. data/xsl/common/olink.xsl +1284 -0
  80. data/xsl/common/or.xml +1272 -0
  81. data/xsl/common/pa.xml +703 -0
  82. data/xsl/common/pi.xml +168 -0
  83. data/xsl/common/pi.xsl +347 -0
  84. data/xsl/common/pl.xml +721 -0
  85. data/xsl/common/pt.xml +1272 -0
  86. data/xsl/common/pt_br.xml +1272 -0
  87. data/xsl/common/refentry.xsl +1353 -0
  88. data/xsl/common/ro.xml +1272 -0
  89. data/xsl/common/ru.xml +769 -0
  90. data/xsl/common/sk.xml +1272 -0
  91. data/xsl/common/sl.xml +1272 -0
  92. data/xsl/common/sq.xml +1272 -0
  93. data/xsl/common/sr.xml +763 -0
  94. data/xsl/common/sr_Latn.xml +722 -0
  95. data/xsl/common/subtitles.xsl +181 -0
  96. data/xsl/common/sv.xml +707 -0
  97. data/xsl/common/ta.xml +703 -0
  98. data/xsl/common/table.xsl +515 -0
  99. data/xsl/common/targetdatabase.dtd +49 -0
  100. data/xsl/common/targets.xsl +338 -0
  101. data/xsl/common/te.xml +703 -0
  102. data/xsl/common/th.xml +1272 -0
  103. data/xsl/common/titles.xsl +850 -0
  104. data/xsl/common/tl.xml +1272 -0
  105. data/xsl/common/tr.xml +709 -0
  106. data/xsl/common/uk.xml +769 -0
  107. data/xsl/common/ur.xml +705 -0
  108. data/xsl/common/utility.xsl +291 -0
  109. data/xsl/common/vi.xml +1272 -0
  110. data/xsl/common/xh.xml +1272 -0
  111. data/xsl/common/zh.xml +703 -0
  112. data/xsl/common/zh_cn.xml +703 -0
  113. data/xsl/common/zh_tw.xml +703 -0
  114. data/xsl/epub/docbook.xsl +1769 -0
  115. data/xsl/epub3/chunk.xsl +30 -0
  116. data/xsl/epub3/docbook-epub.css.xml +142 -0
  117. data/xsl/epub3/docbook.xsl +20 -0
  118. data/xsl/epub3/epub3-chunk-mods.xsl +52 -0
  119. data/xsl/epub3/epub3-element-mods.xsl +2533 -0
  120. data/xsl/epub3/titlepage.templates.xml +712 -0
  121. data/xsl/epub3/titlepage.templates.xsl +3842 -0
  122. data/xsl/lib/lib.xsl +533 -0
  123. data/xsl/xhtml/admon.xsl +142 -0
  124. data/xsl/xhtml/annotations.xsl +160 -0
  125. data/xsl/xhtml/autoidx.xsl +831 -0
  126. data/xsl/xhtml/autotoc.xsl +706 -0
  127. data/xsl/xhtml/biblio-iso690.xsl +1302 -0
  128. data/xsl/xhtml/biblio.xsl +1371 -0
  129. data/xsl/xhtml/block.xsl +584 -0
  130. data/xsl/xhtml/callout.xsl +210 -0
  131. data/xsl/xhtml/chunk-code.xsl +675 -0
  132. data/xsl/xhtml/chunk-common.xsl +1627 -0
  133. data/xsl/xhtml/chunker.xsl +317 -0
  134. data/xsl/xhtml/component.xsl +440 -0
  135. data/xsl/xhtml/division.xsl +214 -0
  136. data/xsl/xhtml/ebnf.xsl +331 -0
  137. data/xsl/xhtml/footnote.xsl +346 -0
  138. data/xsl/xhtml/formal.xsl +496 -0
  139. data/xsl/xhtml/glossary.xsl +602 -0
  140. data/xsl/xhtml/graphics.xsl +1537 -0
  141. data/xsl/xhtml/html-rtf.xsl +321 -0
  142. data/xsl/xhtml/html.xsl +690 -0
  143. data/xsl/xhtml/htmltbl.xsl +102 -0
  144. data/xsl/xhtml/index.xsl +264 -0
  145. data/xsl/xhtml/info.xsl +48 -0
  146. data/xsl/xhtml/inline.xsl +1508 -0
  147. data/xsl/xhtml/its.xsl +109 -0
  148. data/xsl/xhtml/keywords.xsl +38 -0
  149. data/xsl/xhtml/lists.xsl +1227 -0
  150. data/xsl/xhtml/math.xsl +286 -0
  151. data/xsl/xhtml/param.xsl +449 -0
  152. data/xsl/xhtml/pi.xsl +1237 -0
  153. data/xsl/xhtml/qandaset.xsl +440 -0
  154. data/xsl/xhtml/refentry.xsl +307 -0
  155. data/xsl/xhtml/sections.xsl +564 -0
  156. data/xsl/xhtml/synop.xsl +1623 -0
  157. data/xsl/xhtml/table.xsl +1179 -0
  158. data/xsl/xhtml/task.xsl +76 -0
  159. data/xsl/xhtml/titlepage.templates.xsl +4005 -0
  160. data/xsl/xhtml/titlepage.xsl +1108 -0
  161. data/xsl/xhtml/toc.xsl +334 -0
  162. data/xsl/xhtml/verbatim.xsl +389 -0
  163. data/xsl/xhtml/xref.xsl +1268 -0
  164. data/xsl/xhtml5/docbook.xsl +22 -0
  165. data/xsl/xhtml5/html5-chunk-mods.xsl +112 -0
  166. data/xsl/xhtml5/html5-element-mods.xsl +791 -0
  167. data/xsl/xhtml5/xhtml-docbook.xsl +531 -0
  168. metadata +207 -27
  169. data/.rvmrc +0 -48
  170. data/xslt/obfuscate.xsl +0 -12
@@ -0,0 +1,1353 @@
1
+ <?xml version='1.0'?>
2
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
+ xmlns:d="http://docbook.org/ns/docbook"
4
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
5
+ xmlns:date="http://exslt.org/dates-and-times"
6
+ exclude-result-prefixes="doc date d"
7
+ version='1.0'>
8
+
9
+ <!-- ********************************************************************
10
+ $Id: refentry.xsl 7867 2008-03-07 09:54:25Z xmldoc $
11
+ ********************************************************************
12
+
13
+ This file is part of the XSL DocBook Stylesheet distribution.
14
+ See ../README or http://docbook.sf.net/release/xsl/current/ for
15
+ copyright and other information.
16
+
17
+ ******************************************************************** -->
18
+
19
+ <!-- ==================================================================== -->
20
+ <doc:reference xmlns="" xml:id="refentry">
21
+ <info>
22
+ <title>Common » Refentry Metadata Template Reference</title>
23
+ <releaseinfo role="meta">
24
+ $Id: refentry.xsl 7867 2008-03-07 09:54:25Z xmldoc $
25
+ </releaseinfo>
26
+ </info>
27
+ <!-- * yes, partintro is a valid child of a reference... -->
28
+ <partintro xml:id="partintro">
29
+ <title>Introduction</title>
30
+ <para>This is technical reference documentation for the “refentry
31
+ metadata” templates in the DocBook XSL Stylesheets.</para>
32
+ <para>This is not intended to be user documentation. It is provided
33
+ for developers writing customization layers for the stylesheets.</para>
34
+ <note>
35
+ <para>Currently, only the manpages stylesheets make use of these
36
+ templates. They are, however, potentially useful elsewhere.</para>
37
+ </note>
38
+ </partintro>
39
+ </doc:reference>
40
+
41
+ <!-- ==================================================================== -->
42
+ <doc:template name="get.refentry.metadata" xmlns="">
43
+ <refpurpose>Gathers metadata from a refentry and its ancestors</refpurpose>
44
+ <refdescription id="get.refentry.metadata-desc">
45
+ <para>Reference documentation for particular commands, functions,
46
+ etc., is sometimes viewed in isolation from its greater "context". For
47
+ example, users view Unix man pages as, well, individual pages, not as
48
+ part of a "book" of some kind. Therefore, it is sometimes necessary to
49
+ embed "context" information in output for each <tag>refentry</tag>.</para>
50
+
51
+ <para>However, one problem is that different users mark up that
52
+ context information in different ways. Often (usually), the
53
+ context information is not actually part of the content of the
54
+ <tag>refentry</tag> itself, but instead part of the content of a
55
+ parent or ancestor element to the <tag>refentry</tag>. And
56
+ even then, DocBook provides a variety of elements that users might
57
+ potentially use to mark up the same kind of information. One user
58
+ might use the <tag>productnumber</tag> element to mark up version
59
+ information about a particular product, while another might use
60
+ the <tag>releaseinfo</tag> element.</para>
61
+
62
+ <para>Taking all that in mind, the
63
+ <function>get.refentry.metadata</function> template tries to gather
64
+ metadata from a <tag>refentry</tag> element and its ancestor
65
+ elements in an intelligent and user-configurable way. The basic
66
+ mechanism used in the XPath expressions throughout this stylesheet
67
+ is to select the relevant metadata from the *info element that is
68
+ closest to the actual <tag>refentry</tag>&#160;– either on the
69
+ <tag>refentry</tag> itself, or on its nearest ancestor.</para>
70
+
71
+ <note>
72
+ <para>The <function>get.refentry.metadata</function>
73
+ template is actually just sort of a "driver" template; it
74
+ calls other templates that do the actual data collection,
75
+ then returns the data as a set.</para>
76
+ </note>
77
+
78
+ </refdescription>
79
+ <refparameter id="get.refentry.metadata-params">
80
+ <variablelist>
81
+ <varlistentry>
82
+ <term>refname</term>
83
+ <listitem>
84
+ <para>The first <tag>refname</tag> in the refentry</para>
85
+ </listitem>
86
+ </varlistentry>
87
+ <varlistentry>
88
+ <term>info</term>
89
+ <listitem>
90
+ <para>A set of info nodes (from a <tag>refentry</tag>
91
+ element and its ancestors)</para>
92
+ </listitem>
93
+ </varlistentry>
94
+ <varlistentry>
95
+ <term>prefs</term>
96
+ <listitem>
97
+ <para>A node containing user preferences (from global
98
+ stylesheet parameters)</para>
99
+ </listitem>
100
+ </varlistentry>
101
+ </variablelist>
102
+ </refparameter>
103
+ <refreturn id="get.refentry.metadata-returns">
104
+ <para>Returns a node set with the following elements. The
105
+ descriptions are verbatim from the <literal>man(7)</literal> man
106
+ page.
107
+ <variablelist>
108
+ <varlistentry>
109
+ <term>title</term>
110
+ <listitem>
111
+ <para>the title of the man page (e.g., <literal>MAN</literal>)</para>
112
+ </listitem>
113
+ </varlistentry>
114
+ <varlistentry>
115
+ <term>section</term>
116
+ <listitem>
117
+ <para>the section number the man page should be placed in (e.g.,
118
+ <literal>7</literal>)</para>
119
+ </listitem>
120
+ </varlistentry>
121
+ <varlistentry>
122
+ <term>date</term>
123
+ <listitem>
124
+ <para>the date of the last revision</para>
125
+ </listitem>
126
+ </varlistentry>
127
+ <varlistentry>
128
+ <term>source</term>
129
+ <listitem>
130
+ <para>the source of the command</para>
131
+ </listitem>
132
+ </varlistentry>
133
+ <varlistentry>
134
+ <term>manual</term>
135
+ <listitem>
136
+ <para>the title of the manual (e.g., <citetitle>Linux
137
+ Programmer's Manual</citetitle>)</para>
138
+ </listitem>
139
+ </varlistentry>
140
+ </variablelist>
141
+ </para>
142
+ </refreturn>
143
+ </doc:template>
144
+ <xsl:template name="get.refentry.metadata">
145
+ <xsl:param name="refname"/>
146
+ <xsl:param name="info"/>
147
+ <xsl:param name="prefs"/>
148
+ <title>
149
+ <xsl:call-template name="get.refentry.title">
150
+ <xsl:with-param name="refname" select="$refname"/>
151
+ </xsl:call-template>
152
+ </title>
153
+ <section>
154
+ <xsl:call-template name="get.refentry.section">
155
+ <xsl:with-param name="refname" select="$refname"/>
156
+ </xsl:call-template>
157
+ </section>
158
+ <date>
159
+ <xsl:call-template name="get.refentry.date">
160
+ <xsl:with-param name="info" select="$info"/>
161
+ <xsl:with-param name="refname" select="$refname"/>
162
+ <xsl:with-param name="prefs" select="$prefs/DatePrefs"/>
163
+ </xsl:call-template>
164
+ </date>
165
+ <source>
166
+ <xsl:call-template name="get.refentry.source">
167
+ <xsl:with-param name="info" select="$info"/>
168
+ <xsl:with-param name="refname" select="$refname"/>
169
+ <xsl:with-param name="prefs" select="$prefs/SourcePrefs"/>
170
+ </xsl:call-template>
171
+ </source>
172
+ <manual>
173
+ <xsl:call-template name="get.refentry.manual">
174
+ <xsl:with-param name="info" select="$info"/>
175
+ <xsl:with-param name="refname" select="$refname"/>
176
+ <xsl:with-param name="prefs" select="$prefs/ManualPrefs"/>
177
+ </xsl:call-template>
178
+ </manual>
179
+ </xsl:template>
180
+
181
+ <!-- ====================================================================== -->
182
+ <doc:template name="get.refentry.title" xmlns="">
183
+ <refpurpose>Gets title metadata for a refentry</refpurpose>
184
+ <refdescription id="get.refentry.title-desc">
185
+ <para>The <literal>man(7)</literal> man page describes this as "the
186
+ title of the man page (e.g., <literal>MAN</literal>). This differs
187
+ from <tag>refname</tag> in that, if the <tag>refentry</tag> has a
188
+ <tag>refentrytitle</tag>, we use that as the <tag>title</tag>;
189
+ otherwise, we just use first <tag>refname</tag> in the first
190
+ <tag>refnamediv</tag> in the source.</para>
191
+ </refdescription>
192
+ <refparameter id="get.refentry.title-params">
193
+ <variablelist>
194
+ <varlistentry>
195
+ <term>refname</term>
196
+ <listitem>
197
+ <para>The first <tag>refname</tag> in the refentry</para>
198
+ </listitem>
199
+ </varlistentry>
200
+ </variablelist>
201
+ </refparameter>
202
+ <refreturn id="get.refentry.title-returns">
203
+ <para>Returns a <tag>title</tag> node.</para></refreturn>
204
+ </doc:template>
205
+ <xsl:template name="get.refentry.title">
206
+ <xsl:param name="refname"/>
207
+ <xsl:choose>
208
+ <xsl:when test="d:refmeta/d:refentrytitle">
209
+ <xsl:copy>
210
+ <xsl:apply-templates select="d:refmeta/d:refentrytitle/node()"/>
211
+ </xsl:copy>
212
+ </xsl:when>
213
+ <xsl:otherwise>
214
+ <xsl:copy-of select="$refname"/>
215
+ </xsl:otherwise>
216
+ </xsl:choose>
217
+ </xsl:template>
218
+
219
+ <!-- ==================================================================== -->
220
+ <doc:template name="get.refentry.section" xmlns="">
221
+ <refpurpose>Gets section metadata for a refentry</refpurpose>
222
+ <refdescription id="get.refentry.section-desc">
223
+ <para>The <literal>man(7)</literal> man page describes this as "the
224
+ section number the man page should be placed in (e.g.,
225
+ <literal>7</literal>)". If we do not find a <tag>manvolnum</tag>
226
+ specified in the source, and we find that the <tag>refentry</tag> is
227
+ for a function, we use the section number <literal>3</literal>
228
+ ["Library calls (functions within program libraries)"]; otherwise, we
229
+ default to using <literal>1</literal> ["Executable programs or shell
230
+ commands"].</para>
231
+ </refdescription>
232
+ <refparameter id="get.refentry.section-params">
233
+ <variablelist>
234
+ <varlistentry>
235
+ <term>refname</term>
236
+ <listitem>
237
+ <para>The first <tag>refname</tag> in the refentry</para>
238
+ </listitem>
239
+ </varlistentry>
240
+ <varlistentry>
241
+ <term>quiet</term>
242
+ <listitem>
243
+ <para>If non-zero, no "missing" message is emitted</para>
244
+ </listitem>
245
+ </varlistentry>
246
+ </variablelist>
247
+ </refparameter>
248
+ <refreturn id="get.refentry.section-returns">
249
+ <para>Returns a string representing a section number.</para></refreturn>
250
+ </doc:template>
251
+ <xsl:template name="get.refentry.section">
252
+ <xsl:param name="refname"/>
253
+ <xsl:param name="quiet" select="0"/>
254
+ <xsl:choose>
255
+ <xsl:when test="d:refmeta/d:manvolnum">
256
+ <xsl:value-of select="d:refmeta/d:manvolnum"/>
257
+ </xsl:when>
258
+ <xsl:otherwise>
259
+ <xsl:if test="$quiet = 0">
260
+ <xsl:if test="$refentry.meta.get.quietly = 0">
261
+ <xsl:call-template name="log.message">
262
+ <xsl:with-param name="level">Note</xsl:with-param>
263
+ <xsl:with-param name="source" select="$refname"/>
264
+ <xsl:with-param name="context-desc">meta manvol</xsl:with-param>
265
+ <xsl:with-param name="message">
266
+ <xsl:text>no refentry/refmeta/manvolnum</xsl:text>
267
+ </xsl:with-param>
268
+ </xsl:call-template>
269
+ <xsl:call-template name="log.message">
270
+ <xsl:with-param name="level">Note</xsl:with-param>
271
+ <xsl:with-param name="source" select="$refname"/>
272
+ <xsl:with-param name="context-desc">meta manvol</xsl:with-param>
273
+ <xsl:with-param name="message">
274
+ <xsl:text>see http://docbook.sf.net/el/manvolnum</xsl:text>
275
+ </xsl:with-param>
276
+ </xsl:call-template>
277
+ </xsl:if>
278
+ </xsl:if>
279
+ <xsl:choose>
280
+ <xsl:when test=".//d:funcsynopsis">
281
+ <xsl:if test="$quiet = 0">
282
+ <xsl:if test="$refentry.meta.get.quietly = 0">
283
+ <xsl:call-template name="log.message">
284
+ <xsl:with-param name="level">Note</xsl:with-param>
285
+ <xsl:with-param name="source" select="$refname"/>
286
+ <xsl:with-param name="context-desc">meta manvol</xsl:with-param>
287
+ <xsl:with-param name="message">
288
+ <xsl:text>Setting man section to 3</xsl:text>
289
+ </xsl:with-param>
290
+ </xsl:call-template>
291
+ </xsl:if>
292
+ </xsl:if>
293
+ <xsl:text>3</xsl:text>
294
+ </xsl:when>
295
+ <xsl:otherwise>
296
+ <xsl:text>1</xsl:text>
297
+ </xsl:otherwise>
298
+ </xsl:choose>
299
+ </xsl:otherwise>
300
+ </xsl:choose>
301
+ </xsl:template>
302
+
303
+ <!-- ==================================================================== -->
304
+ <doc:template name="get.refentry.date" xmlns="">
305
+ <refpurpose>Gets date metadata for a refentry</refpurpose>
306
+ <refdescription id="get.refentry.date-desc">
307
+ <para>The <literal>man(7)</literal> man page describes this as "the
308
+ date of the last revision". If we cannot find a date in the source, we
309
+ generate one.</para>
310
+ </refdescription>
311
+ <refparameter id="get.refentry.date-params">
312
+ <variablelist>
313
+ <varlistentry>
314
+ <term>refname</term>
315
+ <listitem>
316
+ <para>The first <tag>refname</tag> in the refentry</para>
317
+ </listitem>
318
+ </varlistentry>
319
+ <varlistentry>
320
+ <term>info</term>
321
+ <listitem>
322
+ <para>A set of info nodes (from a <tag>refentry</tag>
323
+ element and its ancestors)</para>
324
+ </listitem>
325
+ </varlistentry>
326
+ <varlistentry>
327
+ <term>prefs</term>
328
+ <listitem>
329
+ <para>A node containing users preferences (from global stylesheet parameters)</para>
330
+ </listitem>
331
+ </varlistentry>
332
+ </variablelist>
333
+ </refparameter>
334
+ <refreturn id="get.refentry.date-returns">
335
+ <para>Returns a <tag>date</tag> node.</para>
336
+ </refreturn>
337
+ </doc:template>
338
+ <xsl:template name="get.refentry.date">
339
+ <xsl:param name="refname"/>
340
+ <xsl:param name="info"/>
341
+ <xsl:param name="prefs"/>
342
+ <xsl:variable name="Date">
343
+ <xsl:choose>
344
+ <!-- * if profiling is enabled for date, and the date -->
345
+ <!-- * profile is non-empty, use it -->
346
+ <xsl:when test="not($prefs/@profileEnabled = 0) and
347
+ not($prefs/@profile = '')">
348
+ <xsl:call-template name="evaluate.info.profile">
349
+ <xsl:with-param name="profile" select="$prefs/@profile"/>
350
+ <xsl:with-param name="info" select="$info"/>
351
+ </xsl:call-template>
352
+ </xsl:when>
353
+ <xsl:otherwise>
354
+ <!-- * either profiling is not enabled for date, or the-->
355
+ <!-- * date profile is empty, so we need to look for date -->
356
+ <!-- * in *info -->
357
+ <xsl:choose>
358
+ <!-- * look for date or pubdate in *info -->
359
+ <xsl:when test="$info/d:date/node()
360
+ |$info/d:pubdate/node()">
361
+ <xsl:apply-templates
362
+ select="(($info[d:date])[last()]/d:date)[1]|
363
+ (($info[d:pubdate])[last()]/d:pubdate)[1]"/>
364
+ </xsl:when>
365
+ <xsl:otherwise>
366
+ <!-- * found no Date or Pubdate -->
367
+ </xsl:otherwise>
368
+ </xsl:choose>
369
+ </xsl:otherwise>
370
+ </xsl:choose>
371
+ </xsl:variable>
372
+ <xsl:choose>
373
+ <xsl:when test="not($Date = '')">
374
+ <xsl:value-of select="$Date"/>
375
+ </xsl:when>
376
+ <!-- * We couldn't find a date, so we generate a date. -->
377
+ <!-- * And we make it an appropriately localized date. -->
378
+ <xsl:otherwise>
379
+ <!-- * The following block is commented out because: -->
380
+ <!-- * -->
381
+ <!-- * - having a missing date in the source doesn’t result in -->
382
+ <!-- * any information being missing from the generated man -->
383
+ <!-- * page (since we generate the needed date) -->
384
+ <!-- * -->
385
+ <!-- * - experience has shown the many users omit the date -->
386
+ <!-- * intentionally, because they want to be it generated -->
387
+ <!-- * -->
388
+ <!-- * - in practice it’s not really a condition that most users -->
389
+ <!-- * want reported to them -->
390
+ <!-- * -->
391
+ <!-- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
392
+ <!-- * <xsl:if test="$refentry.meta.get.quietly = 0"> -->
393
+ <!-- * <xsl:call-template name="log.message"> -->
394
+ <!-- * <xsl:with-param name="level">Note</xsl:with-param> -->
395
+ <!-- * <xsl:with-param name="source" select="$refname"/> -->
396
+ <!-- * <xsl:with-param name="context-desc">meta date</xsl:with-param> -->
397
+ <!-- * <xsl:with-param name="message"> -->
398
+ <!-- * <xsl:text>no date; using generated date</xsl:text> -->
399
+ <!-- * </xsl:with-param> -->
400
+ <!-- * </xsl:call-template> -->
401
+ <!-- * <xsl:call-template name="log.message"> -->
402
+ <!-- * <xsl:with-param name="level">Note</xsl:with-param> -->
403
+ <!-- * <xsl:with-param name="source" select="$refname"/> -->
404
+ <!-- * <xsl:with-param name="context-desc">meta date</xsl:with-param> -->
405
+ <!-- * <xsl:with-param name="message"> -->
406
+ <!-- * <xsl:text>see http://docbook.sf.net/el/date</xsl:text> -->
407
+ <!-- * </xsl:with-param> -->
408
+ <!-- * </xsl:call-template> -->
409
+ <!-- * </xsl:if> -->
410
+ <!-- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
411
+ <xsl:call-template name="datetime.format">
412
+ <xsl:with-param name="date">
413
+ <xsl:choose>
414
+ <xsl:when test="function-available('date:date-time')">
415
+ <xsl:value-of select="date:date-time()"/>
416
+ </xsl:when>
417
+ <xsl:when test="function-available('date:dateTime')">
418
+ <!-- Xalan quirk -->
419
+ <xsl:value-of select="date:dateTime()"/>
420
+ </xsl:when>
421
+ </xsl:choose>
422
+ </xsl:with-param>
423
+ <xsl:with-param name="format">
424
+ <xsl:call-template name="gentext.template">
425
+ <xsl:with-param name="context" select="'datetime'"/>
426
+ <xsl:with-param name="name" select="'format'"/>
427
+ </xsl:call-template>
428
+ </xsl:with-param>
429
+ </xsl:call-template>
430
+ </xsl:otherwise>
431
+ </xsl:choose>
432
+ </xsl:template>
433
+
434
+ <!-- ==================================================================== -->
435
+ <doc:template name="get.refentry.source" xmlns="">
436
+ <refpurpose>Gets source metadata for a refentry</refpurpose>
437
+ <refdescription id="get.refentry.source-desc">
438
+ <para>The <literal>man(7)</literal> man page describes this as "the
439
+ source of the command", and provides the following examples:
440
+ <itemizedlist>
441
+ <listitem>
442
+ <para>For binaries, use something like: GNU, NET-2, SLS
443
+ Distribution, MCC Distribution.</para>
444
+ </listitem>
445
+ <listitem>
446
+ <para>For system calls, use the version of the kernel that you are
447
+ currently looking at: Linux 0.99.11.</para>
448
+ </listitem>
449
+ <listitem>
450
+ <para>For library calls, use the source of the function: GNU, BSD
451
+ 4.3, Linux DLL 4.4.1.</para>
452
+ </listitem>
453
+ </itemizedlist>
454
+ </para>
455
+
456
+ <para>The <literal>solbook(5)</literal> man page describes
457
+ something very much like what <literal>man(7)</literal> calls
458
+ "source", except that <literal>solbook(5)</literal> names it
459
+ "software" and describes it like this:
460
+ <blockquote>
461
+ <para>This is the name of the software product that the topic
462
+ discussed on the reference page belongs to. For example UNIX
463
+ commands are part of the <literal>SunOS x.x</literal>
464
+ release.</para>
465
+ </blockquote>
466
+ </para>
467
+
468
+ <para>In practice, there are many pages that simply have a version
469
+ number in the "source" field. So, it looks like what we have is a
470
+ two-part field,
471
+ <replaceable>Name</replaceable>&#160;<replaceable>Version</replaceable>,
472
+ where:
473
+ <variablelist>
474
+ <varlistentry>
475
+ <term>Name</term>
476
+ <listitem>
477
+ <para>product name (e.g., BSD) or org. name (e.g., GNU)</para>
478
+ </listitem>
479
+ </varlistentry>
480
+ <varlistentry>
481
+ <term>Version</term>
482
+ <listitem>
483
+ <para>version name</para>
484
+ </listitem>
485
+ </varlistentry>
486
+ </variablelist>
487
+ Each part is optional. If the <replaceable>Name</replaceable> is a
488
+ product name, then the <replaceable>Version</replaceable> is probably
489
+ the version of the product. Or there may be no
490
+ <replaceable>Name</replaceable>, in which case, if there is a
491
+ <replaceable>Version</replaceable>, it is probably the version of the
492
+ item itself, not the product it is part of. Or, if the
493
+ <replaceable>Name</replaceable> is an organization name, then there
494
+ probably will be no <replaceable>Version</replaceable>.
495
+ </para>
496
+ </refdescription>
497
+ <refparameter id="get.refentry.source-params">
498
+ <variablelist>
499
+ <varlistentry>
500
+ <term>refname</term>
501
+ <listitem>
502
+ <para>The first <tag>refname</tag> in the refentry</para>
503
+ </listitem>
504
+ </varlistentry>
505
+ <varlistentry>
506
+ <term>info</term>
507
+ <listitem>
508
+ <para>A set of info nodes (from a <tag>refentry</tag>
509
+ element and its ancestors)</para>
510
+ </listitem>
511
+ </varlistentry>
512
+ <varlistentry>
513
+ <term>prefs</term>
514
+ <listitem>
515
+ <para>A node containing users preferences (from global
516
+ stylesheet parameters)</para>
517
+ </listitem>
518
+ </varlistentry>
519
+ </variablelist>
520
+ </refparameter>
521
+ <refreturn id="get.refentry.source-returns">
522
+ <para>Returns a <tag>source</tag> node.</para>
523
+ </refreturn>
524
+ </doc:template>
525
+ <xsl:template name="get.refentry.source">
526
+ <xsl:param name="refname"/>
527
+ <xsl:param name="info"/>
528
+ <xsl:param name="prefs"/>
529
+ <xsl:variable name="Name">
530
+ <xsl:if test="$prefs/Name/@suppress = 0">
531
+ <xsl:call-template name="get.refentry.source.name">
532
+ <xsl:with-param name="info" select="$info"/>
533
+ <xsl:with-param name="refname" select="$refname"/>
534
+ <xsl:with-param name="prefs" select="$prefs/Name"/>
535
+ </xsl:call-template>
536
+ </xsl:if>
537
+ </xsl:variable>
538
+ <xsl:variable name="Version">
539
+ <xsl:if test="$prefs/Version/@suppress = 0">
540
+ <xsl:call-template name="get.refentry.version">
541
+ <xsl:with-param name="info" select="$info"/>
542
+ <xsl:with-param name="refname" select="$refname"/>
543
+ <xsl:with-param name="prefs" select="$prefs/Version"/>
544
+ </xsl:call-template>
545
+ </xsl:if>
546
+ </xsl:variable>
547
+ <xsl:choose>
548
+ <!-- * if we have a Name and/or Version, use either or both -->
549
+ <!-- * of those, in the form "Name Version" or just "Name" -->
550
+ <!-- * or just "Version" -->
551
+ <xsl:when test="not($Name = '') or not($Version = '')">
552
+ <xsl:choose>
553
+ <xsl:when test="not($Name = '') and not($Version = '')">
554
+ <xsl:copy-of select="$Name"/>
555
+ <xsl:text> </xsl:text>
556
+ </xsl:when>
557
+ <xsl:otherwise>
558
+ <xsl:copy-of select="$Name"/>
559
+ </xsl:otherwise>
560
+ </xsl:choose>
561
+ <xsl:copy-of select="$Version"/>
562
+ </xsl:when>
563
+ <!-- * if no Name and no Version, use fallback (if any) -->
564
+ <xsl:when test="not($prefs/@fallback = '')">
565
+ <xsl:variable name="source.fallback">
566
+ <xsl:call-template name="evaluate.info.profile">
567
+ <xsl:with-param name="profile" select="$prefs/@fallback"/>
568
+ <xsl:with-param name="info" select="$info"/>
569
+ </xsl:call-template>
570
+ </xsl:variable>
571
+ <!-- * At this point, we know that we don't have properly marked-up -->
572
+ <!-- * source metadata, so even if we do have source fallback -->
573
+ <!-- * content, we still report to the user that it should be -->
574
+ <!-- * marked up properly instead. -->
575
+ <xsl:if test="$refentry.meta.get.quietly = 0">
576
+ <xsl:call-template name="report.missing.source.name">
577
+ <xsl:with-param name="refname" select="$refname"/>
578
+ </xsl:call-template>
579
+ <xsl:call-template name="report.missing.version">
580
+ <xsl:with-param name="refname" select="$refname"/>
581
+ </xsl:call-template>
582
+ </xsl:if>
583
+ <xsl:choose>
584
+ <xsl:when test="not($source.fallback = '')">
585
+ <xsl:value-of select="$source.fallback"/>
586
+ <xsl:if test="$refentry.meta.get.quietly = 0">
587
+ <xsl:call-template name="log.message">
588
+ <xsl:with-param name="level">Warn</xsl:with-param>
589
+ <xsl:with-param name="source" select="$refname"/>
590
+ <xsl:with-param name="context-desc">meta source</xsl:with-param>
591
+ <xsl:with-param name="message">
592
+ <xsl:text>using</xsl:text>
593
+ <xsl:text> "</xsl:text>
594
+ <xsl:value-of select="$source.fallback"/>
595
+ <xsl:text>" </xsl:text>
596
+ <xsl:text>for "source"</xsl:text>
597
+ </xsl:with-param>
598
+ </xsl:call-template>
599
+ </xsl:if>
600
+ </xsl:when>
601
+ <xsl:otherwise>
602
+ <!-- * we have no Name, no Version, and no fallback content, so -->
603
+ <!-- * insert a fixme -->
604
+ <xsl:text>[FIXME: source]</xsl:text>
605
+ <xsl:if test="$refentry.meta.get.quietly = 0">
606
+ <xsl:call-template name="log.message">
607
+ <xsl:with-param name="level">Warn</xsl:with-param>
608
+ <xsl:with-param name="source" select="$refname"/>
609
+ <xsl:with-param name="context-desc">meta source</xsl:with-param>
610
+ <xsl:with-param name="message">
611
+ <xsl:text>no fallback for source, so inserted a fixme</xsl:text>
612
+ </xsl:with-param>
613
+ </xsl:call-template>
614
+ </xsl:if>
615
+ </xsl:otherwise>
616
+ </xsl:choose>
617
+ </xsl:when>
618
+ <xsl:otherwise>
619
+ <!-- * we have no Name, no Version, and no fallback given, so -->
620
+ <!-- * insert a fixme -->
621
+ <xsl:text>[FIXME: source]</xsl:text>
622
+ <xsl:if test="$refentry.meta.get.quietly = 0">
623
+ <xsl:call-template name="log.message">
624
+ <xsl:with-param name="level">Warn</xsl:with-param>
625
+ <xsl:with-param name="source" select="$refname"/>
626
+ <xsl:with-param name="context-desc">meta source</xsl:with-param>
627
+ <xsl:with-param name="message">
628
+ <xsl:text>no source fallback given, so inserted a fixme</xsl:text>
629
+ </xsl:with-param>
630
+ </xsl:call-template>
631
+ </xsl:if>
632
+ </xsl:otherwise>
633
+ </xsl:choose>
634
+ </xsl:template>
635
+
636
+ <!-- ==================================================================== -->
637
+ <doc:template name="get.refentry.source.name" xmlns="">
638
+ <refpurpose>Gets source-name metadata for a refentry</refpurpose>
639
+ <refdescription id="get.refentry.source.name-desc">
640
+ <para>A "source name" is one part of a (potentially) two-part
641
+ <replaceable>Name</replaceable>&#160;<replaceable>Version</replaceable>
642
+ source field. For more details, see the documentation for the
643
+ <function>get.refentry.source</function> template.</para>
644
+ </refdescription>
645
+ <refparameter id="get.refentry.source.name-params">
646
+ <variablelist>
647
+ <varlistentry>
648
+ <term>refname</term>
649
+ <listitem>
650
+ <para>The first <tag>refname</tag> in the refentry</para>
651
+ </listitem>
652
+ </varlistentry>
653
+ <varlistentry>
654
+ <term>info</term>
655
+ <listitem>
656
+ <para>A set of info nodes (from a <tag>refentry</tag>
657
+ element and its ancestors)</para>
658
+ </listitem>
659
+ </varlistentry>
660
+ <varlistentry>
661
+ <term>prefs</term>
662
+ <listitem>
663
+ <para>A node containing users preferences (from global
664
+ stylesheet parameters)</para>
665
+ </listitem>
666
+ </varlistentry>
667
+ </variablelist>
668
+ </refparameter>
669
+ <refreturn id="get.refentry.source.name-returns">
670
+ <para>Depending on what output method is used for the
671
+ current stylesheet, either returns a text node or possibly an element
672
+ node, containing "source name" data.</para>
673
+ </refreturn>
674
+ </doc:template>
675
+ <xsl:template name="get.refentry.source.name">
676
+ <xsl:param name="refname"/>
677
+ <xsl:param name="info"/>
678
+ <xsl:param name="prefs"/>
679
+ <xsl:choose>
680
+ <!-- * if profiling is enabled for source.name, and the -->
681
+ <!-- * source.name profile is non-empty, use it -->
682
+ <xsl:when test="not($prefs/@profileEnabled = 0) and
683
+ not($prefs/@profile = '')">
684
+ <xsl:call-template name="evaluate.info.profile">
685
+ <xsl:with-param name="profile" select="$prefs/@profile"/>
686
+ <xsl:with-param name="info" select="$info"/>
687
+ </xsl:call-template>
688
+ </xsl:when>
689
+ <xsl:otherwise>
690
+ <!-- * either profiling for source.name is not enabled, or-->
691
+ <!-- * the source.name profile is empty; so we need to look -->
692
+ <!-- * for a name to use -->
693
+ <xsl:choose>
694
+ <xsl:when test="d:refmeta/d:refmiscinfo[@class = 'source' or @class = 'software']">
695
+ <xsl:apply-templates
696
+ select="d:refmeta/d:refmiscinfo[@class = 'source' or @class='software'][1]/node()"/>
697
+ </xsl:when>
698
+ <xsl:otherwise>
699
+ <xsl:choose>
700
+ <xsl:when test="$info/d:productname">
701
+ <xsl:call-template name="set.refentry.metadata">
702
+ <xsl:with-param name="refname" select="$refname"/>
703
+ <xsl:with-param
704
+ name="info"
705
+ select="($info[d:productname])[last()]"/>
706
+ <xsl:with-param
707
+ name="contents"
708
+ select="(($info[d:productname])[last()]/d:productname)[1]"/>
709
+ <xsl:with-param name="context">source</xsl:with-param>
710
+ </xsl:call-template>
711
+ </xsl:when>
712
+ <xsl:when test="$info/d:corpname">
713
+ <xsl:call-template name="set.refentry.metadata">
714
+ <xsl:with-param name="refname" select="$refname"/>
715
+ <xsl:with-param
716
+ name="info"
717
+ select="($info[d:corpname])[last()]"/>
718
+ <xsl:with-param
719
+ name="contents"
720
+ select="(($info[d:corpname])[last()]/d:corpname)[1]"/>
721
+ <xsl:with-param name="context">source</xsl:with-param>
722
+ <xsl:with-param name="preferred">productname</xsl:with-param>
723
+ </xsl:call-template>
724
+ </xsl:when>
725
+ <xsl:when test="$info/d:corpcredit">
726
+ <xsl:call-template name="set.refentry.metadata">
727
+ <xsl:with-param name="refname" select="$refname"/>
728
+ <xsl:with-param
729
+ name="info"
730
+ select="($info[d:corpcredit])[last()]"/>
731
+ <xsl:with-param
732
+ name="contents"
733
+ select="(($info[d:corpcredit])[last()]/d:corpcredit)[1]"/>
734
+ <xsl:with-param name="context">source</xsl:with-param>
735
+ <xsl:with-param name="preferred">productname</xsl:with-param>
736
+ </xsl:call-template>
737
+ </xsl:when>
738
+ <xsl:when test="$info/d:corpauthor">
739
+ <xsl:call-template name="set.refentry.metadata">
740
+ <xsl:with-param name="refname" select="$refname"/>
741
+ <xsl:with-param
742
+ name="info"
743
+ select="($info[d:corpauthor])[last()]"/>
744
+ <xsl:with-param
745
+ name="contents"
746
+ select="(($info[d:corpauthor])[last()]/d:corpauthor)[1]"/>
747
+ <xsl:with-param name="context">source</xsl:with-param>
748
+ <xsl:with-param name="preferred">productname</xsl:with-param>
749
+ </xsl:call-template>
750
+ </xsl:when>
751
+ <xsl:when test="$info//d:orgname">
752
+ <xsl:call-template name="set.refentry.metadata">
753
+ <xsl:with-param name="refname" select="$refname"/>
754
+ <xsl:with-param
755
+ name="info"
756
+ select="($info[//d:orgname])[last()]"/>
757
+ <xsl:with-param
758
+ name="contents"
759
+ select="(($info[//d:orgname])[last()]//d:orgname)[1]"/>
760
+ <xsl:with-param name="context">source</xsl:with-param>
761
+ <xsl:with-param name="preferred">productname</xsl:with-param>
762
+ </xsl:call-template>
763
+ </xsl:when>
764
+ <xsl:when test="$info//d:publishername">
765
+ <xsl:call-template name="set.refentry.metadata">
766
+ <xsl:with-param name="refname" select="$refname"/>
767
+ <xsl:with-param
768
+ name="info"
769
+ select="($info[//d:publishername])[last()]"/>
770
+ <xsl:with-param
771
+ name="contents"
772
+ select="(($info[//d:publishername])[last()]//d:publishername)[1]"/>
773
+ <xsl:with-param name="context">source</xsl:with-param>
774
+ <xsl:with-param name="preferred">productname</xsl:with-param>
775
+ </xsl:call-template>
776
+ </xsl:when>
777
+ </xsl:choose>
778
+ </xsl:otherwise>
779
+ </xsl:choose>
780
+ </xsl:otherwise>
781
+ </xsl:choose>
782
+ </xsl:template>
783
+
784
+ <xsl:template name="report.missing.source.name">
785
+ <xsl:param name="refname"/>
786
+ <xsl:call-template name="log.message">
787
+ <xsl:with-param name="level">Note</xsl:with-param>
788
+ <xsl:with-param name="source" select="$refname"/>
789
+ <xsl:with-param name="context-desc">meta source</xsl:with-param>
790
+ <xsl:with-param name="message">
791
+ <xsl:text>no *info/productname or alternative</xsl:text>
792
+ </xsl:with-param>
793
+ </xsl:call-template>
794
+ <xsl:call-template name="log.message">
795
+ <xsl:with-param name="level">Note</xsl:with-param>
796
+ <xsl:with-param name="source" select="$refname"/>
797
+ <xsl:with-param name="context-desc">meta source</xsl:with-param>
798
+ <xsl:with-param name="message">
799
+ <xsl:text>see http://docbook.sf.net/el/productname</xsl:text>
800
+ </xsl:with-param>
801
+ </xsl:call-template>
802
+ <xsl:call-template name="log.message">
803
+ <xsl:with-param name="level">Note</xsl:with-param>
804
+ <xsl:with-param name="source" select="$refname"/>
805
+ <xsl:with-param name="context-desc">meta source</xsl:with-param>
806
+ <xsl:with-param name="message">
807
+ <xsl:text>no refentry/refmeta/refmiscinfo@class=source</xsl:text>
808
+ </xsl:with-param>
809
+ </xsl:call-template>
810
+ <xsl:call-template name="log.message">
811
+ <xsl:with-param name="level">Note</xsl:with-param>
812
+ <xsl:with-param name="source" select="$refname"/>
813
+ <xsl:with-param name="context-desc">meta source</xsl:with-param>
814
+ <xsl:with-param name="message">
815
+ <xsl:text>see http://docbook.sf.net/el/refmiscinfo</xsl:text>
816
+ </xsl:with-param>
817
+ </xsl:call-template>
818
+ </xsl:template>
819
+
820
+ <!-- ==================================================================== -->
821
+ <doc:template name="get.refentry.version" xmlns="">
822
+ <refpurpose>Gets version metadata for a refentry</refpurpose>
823
+ <refdescription id="get.refentry.version-desc">
824
+ <para>A "version" is one part of a (potentially) two-part
825
+ <replaceable>Name</replaceable>&#160;<replaceable>Version</replaceable>
826
+ source field. For more details, see the documentation for the
827
+ <function>get.refentry.source</function> template.</para>
828
+ </refdescription>
829
+ <refparameter id="get.refentry.version-params">
830
+ <variablelist>
831
+ <varlistentry>
832
+ <term>refname</term>
833
+ <listitem>
834
+ <para>The first <tag>refname</tag> in the refentry</para>
835
+ </listitem>
836
+ </varlistentry>
837
+ <varlistentry>
838
+ <term>info</term>
839
+ <listitem>
840
+ <para>A set of info nodes (from a <tag>refentry</tag>
841
+ element and its ancestors)</para>
842
+ </listitem>
843
+ </varlistentry>
844
+ <varlistentry>
845
+ <term>prefs</term>
846
+ <listitem>
847
+ <para>A node containing users preferences (from global
848
+ stylesheet parameters)</para>
849
+ </listitem>
850
+ </varlistentry>
851
+ </variablelist>
852
+ </refparameter>
853
+ <refreturn id="get.refentry.version-returns">
854
+ <para>Depending on what output method is used for the
855
+ current stylesheet, either returns a text node or possibly an element
856
+ node, containing "version" data.</para>
857
+ </refreturn>
858
+ </doc:template>
859
+ <xsl:template name="get.refentry.version">
860
+ <xsl:param name="refname"/>
861
+ <xsl:param name="info"/>
862
+ <xsl:param name="prefs"/>
863
+ <xsl:choose>
864
+ <!-- * if profiling is enabled for version, and the -->
865
+ <!-- * version profile is non-empty, use it -->
866
+ <xsl:when test="not($prefs/@profileEnabled = 0) and
867
+ not($prefs/@profile = '')">
868
+ <xsl:call-template name="evaluate.info.profile">
869
+ <xsl:with-param name="profile" select="$prefs/@profile"/>
870
+ <xsl:with-param name="info" select="$info"/>
871
+ </xsl:call-template>
872
+ </xsl:when>
873
+ <xsl:otherwise>
874
+ <!-- * either profiling for source.name is not enabled, or-->
875
+ <!-- * the source.name profile is empty; so we need to look -->
876
+ <!-- * for a name to use -->
877
+ <xsl:choose>
878
+ <xsl:when test="d:refmeta/d:refmiscinfo[@class = 'version']">
879
+ <xsl:apply-templates
880
+ select="d:refmeta/d:refmiscinfo[@class = 'version'][1]/node()"/>
881
+ </xsl:when>
882
+ <xsl:otherwise>
883
+ <xsl:choose>
884
+ <xsl:when test="$info/d:productnumber">
885
+ <xsl:call-template name="set.refentry.metadata">
886
+ <xsl:with-param name="refname" select="$refname"/>
887
+ <xsl:with-param
888
+ name="info"
889
+ select="($info[d:productnumber])[last()]"/>
890
+ <xsl:with-param
891
+ name="contents"
892
+ select="(($info[d:productnumber])[last()]/d:productnumber)[1]"/>
893
+ <xsl:with-param name="context">version</xsl:with-param>
894
+ </xsl:call-template>
895
+ </xsl:when>
896
+ <xsl:when test="$info/d:edition">
897
+ <xsl:call-template name="set.refentry.metadata">
898
+ <xsl:with-param name="refname" select="$refname"/>
899
+ <xsl:with-param
900
+ name="info"
901
+ select="($info[d:edition])[last()]"/>
902
+ <xsl:with-param
903
+ name="contents"
904
+ select="(($info[d:edition])[last()]/d:edition)[1]"/>
905
+ <xsl:with-param name="context">version</xsl:with-param>
906
+ <xsl:with-param name="preferred">productnumber</xsl:with-param>
907
+ </xsl:call-template>
908
+ </xsl:when>
909
+ <xsl:when test="$info/d:releaseinfo">
910
+ <xsl:call-template name="set.refentry.metadata">
911
+ <xsl:with-param name="refname" select="$refname"/>
912
+ <xsl:with-param
913
+ name="info"
914
+ select="($info[d:releaseinfo])[last()]"/>
915
+ <xsl:with-param
916
+ name="contents"
917
+ select="(($info[d:releaseinfo])[last()]/d:releaseinfo)[1]"/>
918
+ <xsl:with-param name="context">version</xsl:with-param>
919
+ <xsl:with-param name="preferred">productnumber</xsl:with-param>
920
+ </xsl:call-template>
921
+ </xsl:when>
922
+ </xsl:choose>
923
+ </xsl:otherwise>
924
+ </xsl:choose>
925
+ </xsl:otherwise>
926
+ </xsl:choose>
927
+ </xsl:template>
928
+
929
+ <xsl:template name="report.missing.version">
930
+ <xsl:param name="refname"/>
931
+ <xsl:call-template name="log.message">
932
+ <xsl:with-param name="level">Note</xsl:with-param>
933
+ <xsl:with-param name="source" select="$refname"/>
934
+ <xsl:with-param name="context-desc">meta version</xsl:with-param>
935
+ <xsl:with-param name="message">
936
+ <xsl:text>no *info/productnumber or alternative</xsl:text>
937
+ </xsl:with-param>
938
+ </xsl:call-template>
939
+ <xsl:call-template name="log.message">
940
+ <xsl:with-param name="level">Note</xsl:with-param>
941
+ <xsl:with-param name="source" select="$refname"/>
942
+ <xsl:with-param name="context-desc">meta version</xsl:with-param>
943
+ <xsl:with-param name="message">
944
+ <xsl:text>see http://docbook.sf.net/el/productnumber</xsl:text>
945
+ </xsl:with-param>
946
+ </xsl:call-template>
947
+ <xsl:call-template name="log.message">
948
+ <xsl:with-param name="level">Note</xsl:with-param>
949
+ <xsl:with-param name="source" select="$refname"/>
950
+ <xsl:with-param name="context-desc">meta version</xsl:with-param>
951
+ <xsl:with-param name="message">
952
+ <xsl:text>no refentry/refmeta/refmiscinfo@class=version</xsl:text>
953
+ </xsl:with-param>
954
+ </xsl:call-template>
955
+ <xsl:call-template name="log.message">
956
+ <xsl:with-param name="level">Note</xsl:with-param>
957
+ <xsl:with-param name="source" select="$refname"/>
958
+ <xsl:with-param name="context-desc">meta version</xsl:with-param>
959
+ <xsl:with-param name="message">
960
+ <xsl:text>see http://docbook.sf.net/el/refmiscinfo</xsl:text>
961
+ </xsl:with-param>
962
+ </xsl:call-template>
963
+ </xsl:template>
964
+
965
+ <!-- ==================================================================== -->
966
+ <doc:template name="get.refentry.manual" xmlns="">
967
+ <refpurpose>Gets source metadata for a refentry</refpurpose>
968
+ <refdescription id="get.refentry.manual-desc">
969
+ <para>The <literal>man(7)</literal> man page describes this as "the
970
+ title of the manual (e.g., <citetitle>Linux Programmer's
971
+ Manual</citetitle>)". Here are some examples from existing man pages:
972
+ <itemizedlist>
973
+ <listitem>
974
+ <para><citetitle>dpkg utilities</citetitle>
975
+ (<command>dpkg-name</command>)</para>
976
+ </listitem>
977
+ <listitem>
978
+ <para><citetitle>User Contributed Perl Documentation</citetitle>
979
+ (<command>GET</command>)</para>
980
+ </listitem>
981
+ <listitem>
982
+ <para><citetitle>GNU Development Tools</citetitle>
983
+ (<command>ld</command>)</para>
984
+ </listitem>
985
+ <listitem>
986
+ <para><citetitle>Emperor Norton Utilities</citetitle>
987
+ (<command>ddate</command>)</para>
988
+ </listitem>
989
+ <listitem>
990
+ <para><citetitle>Debian GNU/Linux manual</citetitle>
991
+ (<command>faked</command>)</para>
992
+ </listitem>
993
+ <listitem>
994
+ <para><citetitle>GIMP Manual Pages</citetitle>
995
+ (<command>gimp</command>)</para>
996
+ </listitem>
997
+ <listitem>
998
+ <para><citetitle>KDOC Documentation System</citetitle>
999
+ (<command>qt2kdoc</command>)</para>
1000
+ </listitem>
1001
+ </itemizedlist>
1002
+ </para>
1003
+
1004
+ <para>The <literal>solbook(5)</literal> man page describes
1005
+ something very much like what <literal>man(7)</literal> calls
1006
+ "manual", except that <literal>solbook(5)</literal> names it
1007
+ "sectdesc" and describes it like this:
1008
+ <blockquote>
1009
+ <para>This is the section title of the reference page; for
1010
+ example <literal>User Commands</literal>.</para>
1011
+ </blockquote>
1012
+ </para>
1013
+
1014
+ </refdescription>
1015
+ <refparameter id="get.refentry.manual-params">
1016
+ <variablelist>
1017
+ <varlistentry>
1018
+ <term>refname</term>
1019
+ <listitem>
1020
+ <para>The first <tag>refname</tag> in the refentry</para>
1021
+ </listitem>
1022
+ </varlistentry>
1023
+ <varlistentry>
1024
+ <term>info</term>
1025
+ <listitem>
1026
+ <para>A set of info nodes (from a <tag>refentry</tag>
1027
+ element and its ancestors)</para>
1028
+ </listitem>
1029
+ </varlistentry>
1030
+ <varlistentry>
1031
+ <term>prefs</term>
1032
+ <listitem>
1033
+ <para>A node containing users preferences (from global
1034
+ stylesheet parameters)</para>
1035
+ </listitem>
1036
+ </varlistentry>
1037
+ </variablelist>
1038
+ </refparameter>
1039
+ <refreturn id="get.refentry.manual-returns">
1040
+ <para>Returns a <tag>manual</tag> node.</para>
1041
+ </refreturn>
1042
+ </doc:template>
1043
+ <xsl:template name="get.refentry.manual">
1044
+ <xsl:param name="refname"/>
1045
+ <xsl:param name="info"/>
1046
+ <xsl:param name="prefs"/>
1047
+ <xsl:variable name="Manual">
1048
+ <xsl:choose>
1049
+ <!-- * if profiling is enabled for manual, and the manual -->
1050
+ <!-- * profile is non-empty, use it -->
1051
+ <xsl:when test="not($prefs/@profileEnabled = 0) and
1052
+ not($prefs/@profile = '')">
1053
+ <xsl:call-template name="evaluate.info.profile">
1054
+ <xsl:with-param name="profile" select="$prefs/@profile"/>
1055
+ <xsl:with-param name="info" select="$info"/>
1056
+ </xsl:call-template>
1057
+ </xsl:when>
1058
+ <xsl:otherwise>
1059
+ <xsl:choose>
1060
+ <xsl:when test="d:refmeta/d:refmiscinfo[@class = 'manual' or @class = 'sectdesc']">
1061
+ <xsl:apply-templates
1062
+ select="d:refmeta/d:refmiscinfo[@class = 'manual' or @class = 'sectdesc'][1]/node()"/>
1063
+ </xsl:when>
1064
+ <xsl:otherwise>
1065
+ <!-- * only in the case of choosing appropriate -->
1066
+ <!-- * "manual" content do we select the furthest -->
1067
+ <!-- * (first) matching element instead of the -->
1068
+ <!-- * closest (last) matching one -->
1069
+ <xsl:choose>
1070
+ <xsl:when test="ancestor::*/d:title">
1071
+ <xsl:call-template name="set.refentry.metadata">
1072
+ <xsl:with-param name="refname" select="$refname"/>
1073
+ <xsl:with-param
1074
+ name="info"
1075
+ select="(ancestor::*[d:title])[1]"/>
1076
+ <xsl:with-param
1077
+ name="contents"
1078
+ select="(ancestor::*[d:title])[1]/d:title"/>
1079
+ <xsl:with-param name="context">manual</xsl:with-param>
1080
+ </xsl:call-template>
1081
+ </xsl:when>
1082
+ <xsl:when test="$info/d:title">
1083
+ <xsl:call-template name="set.refentry.metadata">
1084
+ <xsl:with-param name="refname" select="$refname"/>
1085
+ <xsl:with-param
1086
+ name="info"
1087
+ select="($info[d:title])[1]"/>
1088
+ <xsl:with-param
1089
+ name="contents"
1090
+ select="(($info[d:title])[1]/d:title)[1]"/>
1091
+ <xsl:with-param name="context">manual</xsl:with-param>
1092
+ </xsl:call-template>
1093
+ </xsl:when>
1094
+ <xsl:otherwise>
1095
+ </xsl:otherwise>
1096
+ </xsl:choose>
1097
+ </xsl:otherwise>
1098
+ </xsl:choose>
1099
+ </xsl:otherwise>
1100
+ </xsl:choose>
1101
+ </xsl:variable>
1102
+ <xsl:choose>
1103
+ <xsl:when test="not($Manual = '')">
1104
+ <xsl:copy-of select="$Manual"/>
1105
+ </xsl:when>
1106
+ <!-- * if no Manual, use contents of specified fallback (if any) -->
1107
+ <xsl:when test="not($prefs/@fallback = '')">
1108
+ <xsl:variable name="manual.fallback">
1109
+ <xsl:call-template name="evaluate.info.profile">
1110
+ <xsl:with-param name="profile" select="$prefs/@fallback"/>
1111
+ <xsl:with-param name="info" select="$info"/>
1112
+ </xsl:call-template>
1113
+ </xsl:variable>
1114
+ <!-- * At this point, we know that we don't have properly marked-up -->
1115
+ <!-- * manual metadata, so even if we do have manual fallback -->
1116
+ <!-- * content, we still report to the user that it should be -->
1117
+ <!-- * marked up properly instead. -->
1118
+ <xsl:if test="$refentry.meta.get.quietly = 0">
1119
+ <xsl:call-template name="report.missing.manual">
1120
+ <xsl:with-param name="refname" select="$refname"/>
1121
+ </xsl:call-template>
1122
+ </xsl:if>
1123
+ <xsl:choose>
1124
+ <xsl:when test="not($manual.fallback = '')">
1125
+ <xsl:value-of select="$manual.fallback"/>
1126
+ <xsl:if test="$refentry.meta.get.quietly = 0">
1127
+ <xsl:call-template name="log.message">
1128
+ <xsl:with-param name="level">Warn</xsl:with-param>
1129
+ <xsl:with-param name="source" select="$refname"/>
1130
+ <xsl:with-param name="context-desc">meta manual</xsl:with-param>
1131
+ <xsl:with-param name="message">
1132
+ <xsl:text>using</xsl:text>
1133
+ <xsl:text> "</xsl:text>
1134
+ <xsl:value-of select="$manual.fallback"/>
1135
+ <xsl:text>" </xsl:text>
1136
+ <xsl:text>for "manual"</xsl:text>
1137
+ </xsl:with-param>
1138
+ </xsl:call-template>
1139
+ </xsl:if>
1140
+ </xsl:when>
1141
+ <xsl:otherwise>
1142
+ <!-- * we have nothing appropriate to use for manual, and no fallback -->
1143
+ <!-- * content, so report insert a fixme -->
1144
+ <xsl:text>[FIXME: manual]</xsl:text>
1145
+ <xsl:if test="$refentry.meta.get.quietly = 0">
1146
+ <xsl:call-template name="log.message">
1147
+ <xsl:with-param name="level">Warn</xsl:with-param>
1148
+ <xsl:with-param name="source" select="$refname"/>
1149
+ <xsl:with-param name="context-desc">meta manual</xsl:with-param>
1150
+ <xsl:with-param name="message">
1151
+ <xsl:text>no fallback for manual, so inserted a fixme</xsl:text>
1152
+ </xsl:with-param>
1153
+ </xsl:call-template>
1154
+ </xsl:if>
1155
+ </xsl:otherwise>
1156
+ </xsl:choose>
1157
+ </xsl:when>
1158
+ <xsl:otherwise>
1159
+ <!-- * we have nothing appropriate to use for manual, and no fallback -->
1160
+ <!-- * given, so insert a fixme -->
1161
+ <xsl:text>[FIXME: manual]</xsl:text>
1162
+ <xsl:if test="$refentry.meta.get.quietly = 0">
1163
+ <xsl:call-template name="log.message">
1164
+ <xsl:with-param name="level">Warn</xsl:with-param>
1165
+ <xsl:with-param name="source" select="$refname"/>
1166
+ <xsl:with-param name="context-desc">meta manual</xsl:with-param>
1167
+ <xsl:with-param name="message">
1168
+ <xsl:text>no manual fallback given, so inserted a fixme</xsl:text>
1169
+ </xsl:with-param>
1170
+ </xsl:call-template>
1171
+ </xsl:if>
1172
+ </xsl:otherwise>
1173
+ </xsl:choose>
1174
+ </xsl:template>
1175
+
1176
+ <xsl:template name="report.missing.manual">
1177
+ <xsl:param name="refname"/>
1178
+ <xsl:call-template name="log.message">
1179
+ <xsl:with-param name="level">Note</xsl:with-param>
1180
+ <xsl:with-param name="source" select="$refname"/>
1181
+ <xsl:with-param name="context-desc">meta manual</xsl:with-param>
1182
+ <xsl:with-param name="message">
1183
+ <xsl:text>no titled ancestor of refentry</xsl:text>
1184
+ </xsl:with-param>
1185
+ </xsl:call-template>
1186
+ <xsl:call-template name="log.message">
1187
+ <xsl:with-param name="level">Note</xsl:with-param>
1188
+ <xsl:with-param name="source" select="$refname"/>
1189
+ <xsl:with-param name="context-desc">meta manual</xsl:with-param>
1190
+ <xsl:with-param name="message">
1191
+ <xsl:text>no refentry/refmeta/refmiscinfo@class=manual</xsl:text>
1192
+ </xsl:with-param>
1193
+ </xsl:call-template>
1194
+ <xsl:call-template name="log.message">
1195
+ <xsl:with-param name="level">Note</xsl:with-param>
1196
+ <xsl:with-param name="source" select="$refname"/>
1197
+ <xsl:with-param name="context-desc">meta manual</xsl:with-param>
1198
+ <xsl:with-param name="message">
1199
+ <xsl:text>see http://docbook.sf.net/el/refmiscinfo</xsl:text>
1200
+ </xsl:with-param>
1201
+ </xsl:call-template>
1202
+ </xsl:template>
1203
+ <!-- ====================================================================== -->
1204
+ <doc:template name="get.refentry.metadata.prefs" xmlns="">
1205
+ <refpurpose>Gets user preferences for refentry metadata gathering</refpurpose>
1206
+ <refdescription id="get.refentry.metadata.prefs-desc">
1207
+ <para>The DocBook XSL stylesheets include several user-configurable
1208
+ global stylesheet parameters for controlling <tag>refentry</tag>
1209
+ metadata gathering. Those parameters are not read directly by the
1210
+ other <tag>refentry</tag> metadata-gathering
1211
+ templates. Instead, they are read only by the
1212
+ <function>get.refentry.metadata.prefs</function> template,
1213
+ which assembles them into a structure that is then passed to
1214
+ the other <tag>refentry</tag> metadata-gathering
1215
+ templates.</para>
1216
+
1217
+ <para>So the, <function>get.refentry.metadata.prefs</function>
1218
+ template is the only interface to collecting stylesheet parameters for
1219
+ controlling <tag>refentry</tag> metadata gathering.</para>
1220
+ </refdescription>
1221
+ <refparameter id="get.refentry.metadata.prefs-params">
1222
+ <para>There are no local parameters for this template; however, it
1223
+ does rely on a number of global parameters.</para>
1224
+ </refparameter>
1225
+ <refreturn id="get.refentry.metadata.prefs-returns">
1226
+ <para>Returns a <tag>manual</tag> node.</para>
1227
+ </refreturn>
1228
+ </doc:template>
1229
+ <xsl:template name="get.refentry.metadata.prefs">
1230
+ <DatePrefs>
1231
+ <xsl:attribute name="profile">
1232
+ <xsl:value-of select="$refentry.date.profile"/>
1233
+ </xsl:attribute>
1234
+ <xsl:attribute name="profileEnabled">
1235
+ <xsl:value-of select="$refentry.date.profile.enabled"/>
1236
+ </xsl:attribute>
1237
+ </DatePrefs>
1238
+ <SourcePrefs>
1239
+ <xsl:attribute name="fallback">
1240
+ <xsl:value-of select="$refentry.source.fallback.profile"/>
1241
+ </xsl:attribute>
1242
+ <Name>
1243
+ <xsl:attribute name="profile">
1244
+ <xsl:value-of select="$refentry.source.name.profile"/>
1245
+ </xsl:attribute>
1246
+ <xsl:attribute name="profileEnabled">
1247
+ <xsl:value-of select="$refentry.source.name.profile.enabled"/>
1248
+ </xsl:attribute>
1249
+ <xsl:attribute name="suppress">
1250
+ <xsl:value-of select="$refentry.source.name.suppress"/>
1251
+ </xsl:attribute>
1252
+ </Name>
1253
+ <Version>
1254
+ <xsl:attribute name="profile">
1255
+ <xsl:value-of select="$refentry.version.profile"/>
1256
+ </xsl:attribute>
1257
+ <xsl:attribute name="profileEnabled">
1258
+ <xsl:value-of select="$refentry.version.profile.enabled"/>
1259
+ </xsl:attribute>
1260
+ <xsl:attribute name="suppress">
1261
+ <xsl:value-of select="$refentry.version.suppress"/>
1262
+ </xsl:attribute>
1263
+ </Version>
1264
+ </SourcePrefs>
1265
+ <ManualPrefs>
1266
+ <xsl:attribute name="fallback">
1267
+ <xsl:value-of select="$refentry.manual.fallback.profile"/>
1268
+ </xsl:attribute>
1269
+ <xsl:attribute name="profile">
1270
+ <xsl:value-of select="$refentry.manual.profile"/>
1271
+ </xsl:attribute>
1272
+ <xsl:attribute name="profileEnabled">
1273
+ <xsl:value-of select="$refentry.manual.profile.enabled"/>
1274
+ </xsl:attribute>
1275
+ </ManualPrefs>
1276
+ </xsl:template>
1277
+
1278
+ <!-- ====================================================================== -->
1279
+ <doc:template name="set.refentry.metadata" xmlns="">
1280
+ <refpurpose>Sets content of a refentry metadata item</refpurpose>
1281
+ <refdescription id="set.refentry.metadata-desc">
1282
+ <para>The <function>set.refentry.metadata</function> template is
1283
+ called each time a suitable source element is found for a certain
1284
+ metadata field.</para>
1285
+ </refdescription>
1286
+ <refparameter id="set.refentry.metadata-params">
1287
+ <variablelist>
1288
+ <varlistentry>
1289
+ <term>refname</term>
1290
+ <listitem>
1291
+ <para>The first <tag>refname</tag> in the refentry</para>
1292
+ </listitem>
1293
+ </varlistentry>
1294
+ <varlistentry>
1295
+ <term>info</term>
1296
+ <listitem>
1297
+ <para>A single *info node that contains the selected source element.</para>
1298
+ </listitem>
1299
+ </varlistentry>
1300
+ <varlistentry>
1301
+ <term>contents</term>
1302
+ <listitem>
1303
+ <para>A node containing the selected source element.</para>
1304
+ </listitem>
1305
+ </varlistentry>
1306
+ <varlistentry>
1307
+ <term>context</term>
1308
+ <listitem>
1309
+ <para>A string describing the metadata context in which the
1310
+ <function>set.refentry.metadata</function> template was
1311
+ called: either "date", "source", "version", or "manual".</para>
1312
+ </listitem>
1313
+ </varlistentry>
1314
+ </variablelist>
1315
+ </refparameter>
1316
+ <refreturn id="set.refentry.metadata-returns">
1317
+ <para>Returns formatted contents of a selected source element.</para></refreturn>
1318
+ </doc:template>
1319
+ <xsl:template name="set.refentry.metadata">
1320
+ <xsl:param name="refname"/>
1321
+ <xsl:param name="info"/>
1322
+ <xsl:param name="contents"/>
1323
+ <xsl:param name="context"/>
1324
+ <xsl:param name="preferred"/>
1325
+ <!-- * <xsl:if test="not($preferred = '')"> -->
1326
+ <!-- * <xsl:if test="$refentry.meta.get.quietly = 0"> -->
1327
+ <!-- * <xsl:call-template name="log.message"> -->
1328
+ <!-- * <xsl:with-param name="level">Note</xsl:with-param> -->
1329
+ <!-- * <xsl:with-param name="source" select="$refname"/> -->
1330
+ <!-- * <xsl:with-param name="context-desc" select="concat('meta ', $context)"/> -->
1331
+ <!-- * <xsl:with-param name="message" select="concat('No ', $preferred)"/> -->
1332
+ <!-- * </xsl:call-template> -->
1333
+ <!-- * <xsl:call-template name="log.message"> -->
1334
+ <!-- * <xsl:with-param name="level">Note</xsl:with-param> -->
1335
+ <!-- * <xsl:with-param name="source" select="$refname"/> -->
1336
+ <!-- * <xsl:with-param name="context-desc" select="concat('meta ', $context)"/> -->
1337
+ <!-- * <xsl:with-param name="message"> -->
1338
+ <!-- * <xsl:text>no refentry/refmeta/refmiscinfo@class=</xsl:text> -->
1339
+ <!-- * <xsl:value-of select="$context"/> -->
1340
+ <!-- * </xsl:with-param> -->
1341
+ <!-- * </xsl:call-template> -->
1342
+ <!-- * <xsl:call-template name="log.message"> -->
1343
+ <!-- * <xsl:with-param name="level">Note</xsl:with-param> -->
1344
+ <!-- * <xsl:with-param name="source" select="$refname"/> -->
1345
+ <!-- * <xsl:with-param name="context-desc" select="concat('meta ', $context)"/> -->
1346
+ <!-- * <xsl:with-param name="message" select="concat('Using ', local-name($contents))"/> -->
1347
+ <!-- * </xsl:call-template> -->
1348
+ <!-- * </xsl:if> -->
1349
+ <!-- * </xsl:if> -->
1350
+ <xsl:value-of select="$contents"/>
1351
+ </xsl:template>
1352
+
1353
+ </xsl:stylesheet>