refentry.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781
  1. <?xml version="1.0"?>
  2. <reference xml:id="refentry">
  3. <info>
  4. <title>Common » Refentry Metadata Template Reference</title>
  5. <releaseinfo role="meta">
  6. $Id: refentry.xsl 7867 2008-03-07 09:54:25Z xmldoc $
  7. </releaseinfo>
  8. </info>
  9. <partintro xml:id="partintro">
  10. <title>Introduction</title>
  11. <para>This is technical reference documentation for the “refentry
  12. metadata” templates in the DocBook XSL Stylesheets.</para>
  13. <para>This is not intended to be user documentation. It is provided
  14. for developers writing customization layers for the stylesheets.</para>
  15. <note>
  16. <para>Currently, only the manpages stylesheets make use of these
  17. templates. They are, however, potentially useful elsewhere.</para>
  18. </note>
  19. </partintro>
  20. <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.get.refentry.metadata">
  21. <refnamediv>
  22. <refname>get.refentry.metadata</refname>
  23. <refpurpose>Gathers metadata from a refentry and its ancestors</refpurpose>
  24. </refnamediv>
  25. <refsynopsisdiv>
  26. <synopsis>&lt;xsl:template name="get.refentry.metadata"&gt;
  27. &lt;xsl:param name="refname"/&gt;
  28. &lt;xsl:param name="info"/&gt;
  29. &lt;xsl:param name="prefs"/&gt;
  30. ...
  31. &lt;/xsl:template&gt;</synopsis>
  32. </refsynopsisdiv>
  33. <refsect1><title>Description</title>
  34. <para>Reference documentation for particular commands, functions,
  35. etc., is sometimes viewed in isolation from its greater "context". For
  36. example, users view Unix man pages as, well, individual pages, not as
  37. part of a "book" of some kind. Therefore, it is sometimes necessary to
  38. embed "context" information in output for each <tag>refentry</tag>.</para>
  39. <para>However, one problem is that different users mark up that
  40. context information in different ways. Often (usually), the
  41. context information is not actually part of the content of the
  42. <tag>refentry</tag> itself, but instead part of the content of a
  43. parent or ancestor element to the <tag>refentry</tag>. And
  44. even then, DocBook provides a variety of elements that users might
  45. potentially use to mark up the same kind of information. One user
  46. might use the <tag>productnumber</tag> element to mark up version
  47. information about a particular product, while another might use
  48. the <tag>releaseinfo</tag> element.</para>
  49. <para>Taking all that in mind, the
  50. <function>get.refentry.metadata</function> template tries to gather
  51. metadata from a <tag>refentry</tag> element and its ancestor
  52. elements in an intelligent and user-configurable way. The basic
  53. mechanism used in the XPath expressions throughout this stylesheet
  54. is to select the relevant metadata from the *info element that is
  55. closest to the actual <tag>refentry</tag> – either on the
  56. <tag>refentry</tag> itself, or on its nearest ancestor.</para>
  57. <note>
  58. <para>The <function>get.refentry.metadata</function>
  59. template is actually just sort of a "driver" template; it
  60. calls other templates that do the actual data collection,
  61. then returns the data as a set.</para>
  62. </note>
  63. </refsect1><refsect1><title>Parameters</title>
  64. <variablelist>
  65. <varlistentry>
  66. <term>refname</term>
  67. <listitem>
  68. <para>The first <tag>refname</tag> in the refentry</para>
  69. </listitem>
  70. </varlistentry>
  71. <varlistentry>
  72. <term>info</term>
  73. <listitem>
  74. <para>A set of info nodes (from a <tag>refentry</tag>
  75. element and its ancestors)</para>
  76. </listitem>
  77. </varlistentry>
  78. <varlistentry>
  79. <term>prefs</term>
  80. <listitem>
  81. <para>A node containing user preferences (from global
  82. stylesheet parameters)</para>
  83. </listitem>
  84. </varlistentry>
  85. </variablelist>
  86. </refsect1><refsect1><title>Returns</title>
  87. <para>Returns a node set with the following elements. The
  88. descriptions are verbatim from the <literal>man(7)</literal> man
  89. page.
  90. <variablelist>
  91. <varlistentry>
  92. <term>title</term>
  93. <listitem>
  94. <para>the title of the man page (e.g., <literal>MAN</literal>)</para>
  95. </listitem>
  96. </varlistentry>
  97. <varlistentry>
  98. <term>section</term>
  99. <listitem>
  100. <para>the section number the man page should be placed in (e.g.,
  101. <literal>7</literal>)</para>
  102. </listitem>
  103. </varlistentry>
  104. <varlistentry>
  105. <term>date</term>
  106. <listitem>
  107. <para>the date of the last revision</para>
  108. </listitem>
  109. </varlistentry>
  110. <varlistentry>
  111. <term>source</term>
  112. <listitem>
  113. <para>the source of the command</para>
  114. </listitem>
  115. </varlistentry>
  116. <varlistentry>
  117. <term>manual</term>
  118. <listitem>
  119. <para>the title of the manual (e.g., <citetitle>Linux
  120. Programmer's Manual</citetitle>)</para>
  121. </listitem>
  122. </varlistentry>
  123. </variablelist>
  124. </para>
  125. </refsect1></refentry>
  126. <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.get.refentry.title">
  127. <refnamediv>
  128. <refname>get.refentry.title</refname>
  129. <refpurpose>Gets title metadata for a refentry</refpurpose>
  130. </refnamediv>
  131. <refsynopsisdiv>
  132. <synopsis>&lt;xsl:template name="get.refentry.title"&gt;
  133. &lt;xsl:param name="refname"/&gt;
  134. ...
  135. &lt;/xsl:template&gt;</synopsis>
  136. </refsynopsisdiv>
  137. <refsect1><title>Description</title>
  138. <para>The <literal>man(7)</literal> man page describes this as "the
  139. title of the man page (e.g., <literal>MAN</literal>). This differs
  140. from <tag>refname</tag> in that, if the <tag>refentry</tag> has a
  141. <tag>refentrytitle</tag>, we use that as the <tag>title</tag>;
  142. otherwise, we just use first <tag>refname</tag> in the first
  143. <tag>refnamediv</tag> in the source.</para>
  144. </refsect1><refsect1><title>Parameters</title>
  145. <variablelist>
  146. <varlistentry>
  147. <term>refname</term>
  148. <listitem>
  149. <para>The first <tag>refname</tag> in the refentry</para>
  150. </listitem>
  151. </varlistentry>
  152. </variablelist>
  153. </refsect1><refsect1><title>Returns</title>
  154. <para>Returns a <tag>title</tag> node.</para>
  155. </refsect1></refentry>
  156. <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.get.refentry.section">
  157. <refnamediv>
  158. <refname>get.refentry.section</refname>
  159. <refpurpose>Gets section metadata for a refentry</refpurpose>
  160. </refnamediv>
  161. <refsynopsisdiv>
  162. <synopsis>&lt;xsl:template name="get.refentry.section"&gt;
  163. &lt;xsl:param name="refname"/&gt;
  164. &lt;xsl:param name="quiet" select="0"/&gt;
  165. ...
  166. &lt;/xsl:template&gt;</synopsis>
  167. </refsynopsisdiv>
  168. <refsect1><title>Description</title>
  169. <para>The <literal>man(7)</literal> man page describes this as "the
  170. section number the man page should be placed in (e.g.,
  171. <literal>7</literal>)". If we do not find a <tag>manvolnum</tag>
  172. specified in the source, and we find that the <tag>refentry</tag> is
  173. for a function, we use the section number <literal>3</literal>
  174. ["Library calls (functions within program libraries)"]; otherwise, we
  175. default to using <literal>1</literal> ["Executable programs or shell
  176. commands"].</para>
  177. </refsect1><refsect1><title>Parameters</title>
  178. <variablelist>
  179. <varlistentry>
  180. <term>refname</term>
  181. <listitem>
  182. <para>The first <tag>refname</tag> in the refentry</para>
  183. </listitem>
  184. </varlistentry>
  185. <varlistentry>
  186. <term>quiet</term>
  187. <listitem>
  188. <para>If non-zero, no "missing" message is emitted</para>
  189. </listitem>
  190. </varlistentry>
  191. </variablelist>
  192. </refsect1><refsect1><title>Returns</title>
  193. <para>Returns a string representing a section number.</para>
  194. </refsect1></refentry>
  195. <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.get.refentry.date">
  196. <refnamediv>
  197. <refname>get.refentry.date</refname>
  198. <refpurpose>Gets date metadata for a refentry</refpurpose>
  199. </refnamediv>
  200. <refsynopsisdiv>
  201. <synopsis>&lt;xsl:template name="get.refentry.date"&gt;
  202. &lt;xsl:param name="refname"/&gt;
  203. &lt;xsl:param name="info"/&gt;
  204. &lt;xsl:param name="prefs"/&gt;
  205. ...
  206. &lt;/xsl:template&gt;</synopsis>
  207. </refsynopsisdiv>
  208. <refsect1><title>Description</title>
  209. <para>The <literal>man(7)</literal> man page describes this as "the
  210. date of the last revision". If we cannot find a date in the source, we
  211. generate one.</para>
  212. </refsect1><refsect1><title>Parameters</title>
  213. <variablelist>
  214. <varlistentry>
  215. <term>refname</term>
  216. <listitem>
  217. <para>The first <tag>refname</tag> in the refentry</para>
  218. </listitem>
  219. </varlistentry>
  220. <varlistentry>
  221. <term>info</term>
  222. <listitem>
  223. <para>A set of info nodes (from a <tag>refentry</tag>
  224. element and its ancestors)</para>
  225. </listitem>
  226. </varlistentry>
  227. <varlistentry>
  228. <term>prefs</term>
  229. <listitem>
  230. <para>A node containing users preferences (from global stylesheet parameters)</para>
  231. </listitem>
  232. </varlistentry>
  233. </variablelist>
  234. </refsect1><refsect1><title>Returns</title>
  235. <para>Returns a <tag>date</tag> node.</para>
  236. </refsect1></refentry>
  237. <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.get.refentry.source">
  238. <refnamediv>
  239. <refname>get.refentry.source</refname>
  240. <refpurpose>Gets source metadata for a refentry</refpurpose>
  241. </refnamediv>
  242. <refsynopsisdiv>
  243. <synopsis>&lt;xsl:template name="get.refentry.source"&gt;
  244. &lt;xsl:param name="refname"/&gt;
  245. &lt;xsl:param name="info"/&gt;
  246. &lt;xsl:param name="prefs"/&gt;
  247. ...
  248. &lt;/xsl:template&gt;</synopsis>
  249. </refsynopsisdiv>
  250. <refsect1><title>Description</title>
  251. <para>The <literal>man(7)</literal> man page describes this as "the
  252. source of the command", and provides the following examples:
  253. <itemizedlist>
  254. <listitem>
  255. <para>For binaries, use something like: GNU, NET-2, SLS
  256. Distribution, MCC Distribution.</para>
  257. </listitem>
  258. <listitem>
  259. <para>For system calls, use the version of the kernel that you are
  260. currently looking at: Linux 0.99.11.</para>
  261. </listitem>
  262. <listitem>
  263. <para>For library calls, use the source of the function: GNU, BSD
  264. 4.3, Linux DLL 4.4.1.</para>
  265. </listitem>
  266. </itemizedlist>
  267. </para>
  268. <para>The <literal>solbook(5)</literal> man page describes
  269. something very much like what <literal>man(7)</literal> calls
  270. "source", except that <literal>solbook(5)</literal> names it
  271. "software" and describes it like this:
  272. <blockquote>
  273. <para>This is the name of the software product that the topic
  274. discussed on the reference page belongs to. For example UNIX
  275. commands are part of the <literal>SunOS x.x</literal>
  276. release.</para>
  277. </blockquote>
  278. </para>
  279. <para>In practice, there are many pages that simply have a version
  280. number in the "source" field. So, it looks like what we have is a
  281. two-part field,
  282. <replaceable>Name</replaceable> <replaceable>Version</replaceable>,
  283. where:
  284. <variablelist>
  285. <varlistentry>
  286. <term>Name</term>
  287. <listitem>
  288. <para>product name (e.g., BSD) or org. name (e.g., GNU)</para>
  289. </listitem>
  290. </varlistentry>
  291. <varlistentry>
  292. <term>Version</term>
  293. <listitem>
  294. <para>version name</para>
  295. </listitem>
  296. </varlistentry>
  297. </variablelist>
  298. Each part is optional. If the <replaceable>Name</replaceable> is a
  299. product name, then the <replaceable>Version</replaceable> is probably
  300. the version of the product. Or there may be no
  301. <replaceable>Name</replaceable>, in which case, if there is a
  302. <replaceable>Version</replaceable>, it is probably the version of the
  303. item itself, not the product it is part of. Or, if the
  304. <replaceable>Name</replaceable> is an organization name, then there
  305. probably will be no <replaceable>Version</replaceable>.
  306. </para>
  307. </refsect1><refsect1><title>Parameters</title>
  308. <variablelist>
  309. <varlistentry>
  310. <term>refname</term>
  311. <listitem>
  312. <para>The first <tag>refname</tag> in the refentry</para>
  313. </listitem>
  314. </varlistentry>
  315. <varlistentry>
  316. <term>info</term>
  317. <listitem>
  318. <para>A set of info nodes (from a <tag>refentry</tag>
  319. element and its ancestors)</para>
  320. </listitem>
  321. </varlistentry>
  322. <varlistentry>
  323. <term>prefs</term>
  324. <listitem>
  325. <para>A node containing users preferences (from global
  326. stylesheet parameters)</para>
  327. </listitem>
  328. </varlistentry>
  329. </variablelist>
  330. </refsect1><refsect1><title>Returns</title>
  331. <para>Returns a <tag>source</tag> node.</para>
  332. </refsect1></refentry>
  333. <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.get.refentry.source.name">
  334. <refnamediv>
  335. <refname>get.refentry.source.name</refname>
  336. <refpurpose>Gets source-name metadata for a refentry</refpurpose>
  337. </refnamediv>
  338. <refsynopsisdiv>
  339. <synopsis>&lt;xsl:template name="get.refentry.source.name"&gt;
  340. &lt;xsl:param name="refname"/&gt;
  341. &lt;xsl:param name="info"/&gt;
  342. &lt;xsl:param name="prefs"/&gt;
  343. ...
  344. &lt;/xsl:template&gt;</synopsis>
  345. </refsynopsisdiv>
  346. <refsect1><title>Description</title>
  347. <para>A "source name" is one part of a (potentially) two-part
  348. <replaceable>Name</replaceable> <replaceable>Version</replaceable>
  349. source field. For more details, see the documentation for the
  350. <function>get.refentry.source</function> template.</para>
  351. </refsect1><refsect1><title>Parameters</title>
  352. <variablelist>
  353. <varlistentry>
  354. <term>refname</term>
  355. <listitem>
  356. <para>The first <tag>refname</tag> in the refentry</para>
  357. </listitem>
  358. </varlistentry>
  359. <varlistentry>
  360. <term>info</term>
  361. <listitem>
  362. <para>A set of info nodes (from a <tag>refentry</tag>
  363. element and its ancestors)</para>
  364. </listitem>
  365. </varlistentry>
  366. <varlistentry>
  367. <term>prefs</term>
  368. <listitem>
  369. <para>A node containing users preferences (from global
  370. stylesheet parameters)</para>
  371. </listitem>
  372. </varlistentry>
  373. </variablelist>
  374. </refsect1><refsect1><title>Returns</title>
  375. <para>Depending on what output method is used for the
  376. current stylesheet, either returns a text node or possibly an element
  377. node, containing "source name" data.</para>
  378. </refsect1></refentry>
  379. <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.get.refentry.version">
  380. <refnamediv>
  381. <refname>get.refentry.version</refname>
  382. <refpurpose>Gets version metadata for a refentry</refpurpose>
  383. </refnamediv>
  384. <refsynopsisdiv>
  385. <synopsis>&lt;xsl:template name="get.refentry.version"&gt;
  386. &lt;xsl:param name="refname"/&gt;
  387. &lt;xsl:param name="info"/&gt;
  388. &lt;xsl:param name="prefs"/&gt;
  389. ...
  390. &lt;/xsl:template&gt;</synopsis>
  391. </refsynopsisdiv>
  392. <refsect1><title>Description</title>
  393. <para>A "version" is one part of a (potentially) two-part
  394. <replaceable>Name</replaceable> <replaceable>Version</replaceable>
  395. source field. For more details, see the documentation for the
  396. <function>get.refentry.source</function> template.</para>
  397. </refsect1><refsect1><title>Parameters</title>
  398. <variablelist>
  399. <varlistentry>
  400. <term>refname</term>
  401. <listitem>
  402. <para>The first <tag>refname</tag> in the refentry</para>
  403. </listitem>
  404. </varlistentry>
  405. <varlistentry>
  406. <term>info</term>
  407. <listitem>
  408. <para>A set of info nodes (from a <tag>refentry</tag>
  409. element and its ancestors)</para>
  410. </listitem>
  411. </varlistentry>
  412. <varlistentry>
  413. <term>prefs</term>
  414. <listitem>
  415. <para>A node containing users preferences (from global
  416. stylesheet parameters)</para>
  417. </listitem>
  418. </varlistentry>
  419. </variablelist>
  420. </refsect1><refsect1><title>Returns</title>
  421. <para>Depending on what output method is used for the
  422. current stylesheet, either returns a text node or possibly an element
  423. node, containing "version" data.</para>
  424. </refsect1></refentry>
  425. <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.get.refentry.manual">
  426. <refnamediv>
  427. <refname>get.refentry.manual</refname>
  428. <refpurpose>Gets source metadata for a refentry</refpurpose>
  429. </refnamediv>
  430. <refsynopsisdiv>
  431. <synopsis>&lt;xsl:template name="get.refentry.manual"&gt;
  432. &lt;xsl:param name="refname"/&gt;
  433. &lt;xsl:param name="info"/&gt;
  434. &lt;xsl:param name="prefs"/&gt;
  435. ...
  436. &lt;/xsl:template&gt;</synopsis>
  437. </refsynopsisdiv>
  438. <refsect1><title>Description</title>
  439. <para>The <literal>man(7)</literal> man page describes this as "the
  440. title of the manual (e.g., <citetitle>Linux Programmer's
  441. Manual</citetitle>)". Here are some examples from existing man pages:
  442. <itemizedlist>
  443. <listitem>
  444. <para><citetitle>dpkg utilities</citetitle>
  445. (<command>dpkg-name</command>)</para>
  446. </listitem>
  447. <listitem>
  448. <para><citetitle>User Contributed Perl Documentation</citetitle>
  449. (<command>GET</command>)</para>
  450. </listitem>
  451. <listitem>
  452. <para><citetitle>GNU Development Tools</citetitle>
  453. (<command>ld</command>)</para>
  454. </listitem>
  455. <listitem>
  456. <para><citetitle>Emperor Norton Utilities</citetitle>
  457. (<command>ddate</command>)</para>
  458. </listitem>
  459. <listitem>
  460. <para><citetitle>Debian GNU/Linux manual</citetitle>
  461. (<command>faked</command>)</para>
  462. </listitem>
  463. <listitem>
  464. <para><citetitle>GIMP Manual Pages</citetitle>
  465. (<command>gimp</command>)</para>
  466. </listitem>
  467. <listitem>
  468. <para><citetitle>KDOC Documentation System</citetitle>
  469. (<command>qt2kdoc</command>)</para>
  470. </listitem>
  471. </itemizedlist>
  472. </para>
  473. <para>The <literal>solbook(5)</literal> man page describes
  474. something very much like what <literal>man(7)</literal> calls
  475. "manual", except that <literal>solbook(5)</literal> names it
  476. "sectdesc" and describes it like this:
  477. <blockquote>
  478. <para>This is the section title of the reference page; for
  479. example <literal>User Commands</literal>.</para>
  480. </blockquote>
  481. </para>
  482. </refsect1><refsect1><title>Parameters</title>
  483. <variablelist>
  484. <varlistentry>
  485. <term>refname</term>
  486. <listitem>
  487. <para>The first <tag>refname</tag> in the refentry</para>
  488. </listitem>
  489. </varlistentry>
  490. <varlistentry>
  491. <term>info</term>
  492. <listitem>
  493. <para>A set of info nodes (from a <tag>refentry</tag>
  494. element and its ancestors)</para>
  495. </listitem>
  496. </varlistentry>
  497. <varlistentry>
  498. <term>prefs</term>
  499. <listitem>
  500. <para>A node containing users preferences (from global
  501. stylesheet parameters)</para>
  502. </listitem>
  503. </varlistentry>
  504. </variablelist>
  505. </refsect1><refsect1><title>Returns</title>
  506. <para>Returns a <tag>manual</tag> node.</para>
  507. </refsect1></refentry>
  508. <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.get.refentry.metadata.prefs">
  509. <refnamediv>
  510. <refname>get.refentry.metadata.prefs</refname>
  511. <refpurpose>Gets user preferences for refentry metadata gathering</refpurpose>
  512. </refnamediv>
  513. <refsynopsisdiv>
  514. <synopsis>&lt;xsl:template name="get.refentry.metadata.prefs"/&gt;</synopsis>
  515. </refsynopsisdiv>
  516. <refsect1><title>Description</title>
  517. <para>The DocBook XSL stylesheets include several user-configurable
  518. global stylesheet parameters for controlling <tag>refentry</tag>
  519. metadata gathering. Those parameters are not read directly by the
  520. other <tag>refentry</tag> metadata-gathering
  521. templates. Instead, they are read only by the
  522. <function>get.refentry.metadata.prefs</function> template,
  523. which assembles them into a structure that is then passed to
  524. the other <tag>refentry</tag> metadata-gathering
  525. templates.</para>
  526. <para>So the, <function>get.refentry.metadata.prefs</function>
  527. template is the only interface to collecting stylesheet parameters for
  528. controlling <tag>refentry</tag> metadata gathering.</para>
  529. </refsect1><refsect1><title>Parameters</title>
  530. <para>There are no local parameters for this template; however, it
  531. does rely on a number of global parameters.</para>
  532. </refsect1><refsect1><title>Returns</title>
  533. <para>Returns a <tag>manual</tag> node.</para>
  534. </refsect1></refentry>
  535. <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.set.refentry.metadata">
  536. <refnamediv>
  537. <refname>set.refentry.metadata</refname>
  538. <refpurpose>Sets content of a refentry metadata item</refpurpose>
  539. </refnamediv>
  540. <refsynopsisdiv>
  541. <synopsis>&lt;xsl:template name="set.refentry.metadata"&gt;
  542. &lt;xsl:param name="refname"/&gt;
  543. &lt;xsl:param name="info"/&gt;
  544. &lt;xsl:param name="contents"/&gt;
  545. &lt;xsl:param name="context"/&gt;
  546. &lt;xsl:param name="preferred"/&gt;
  547. ...
  548. &lt;/xsl:template&gt;</synopsis>
  549. </refsynopsisdiv>
  550. <refsect1><title>Description</title>
  551. <para>The <function>set.refentry.metadata</function> template is
  552. called each time a suitable source element is found for a certain
  553. metadata field.</para>
  554. </refsect1><refsect1><title>Parameters</title>
  555. <variablelist>
  556. <varlistentry>
  557. <term>refname</term>
  558. <listitem>
  559. <para>The first <tag>refname</tag> in the refentry</para>
  560. </listitem>
  561. </varlistentry>
  562. <varlistentry>
  563. <term>info</term>
  564. <listitem>
  565. <para>A single *info node that contains the selected source element.</para>
  566. </listitem>
  567. </varlistentry>
  568. <varlistentry>
  569. <term>contents</term>
  570. <listitem>
  571. <para>A node containing the selected source element.</para>
  572. </listitem>
  573. </varlistentry>
  574. <varlistentry>
  575. <term>context</term>
  576. <listitem>
  577. <para>A string describing the metadata context in which the
  578. <function>set.refentry.metadata</function> template was
  579. called: either "date", "source", "version", or "manual".</para>
  580. </listitem>
  581. </varlistentry>
  582. </variablelist>
  583. </refsect1><refsect1><title>Returns</title>
  584. <para>Returns formatted contents of a selected source element.</para>
  585. </refsect1></refentry>
  586. </reference>