Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 9f452694b2d23dacae7f9cc757f9be50 > files > 24

docbook-style-xsl-1.78.1-1.fc17.noarch.rpm

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>get.refentry.metadata</title><link rel="stylesheet" type="text/css" href="../reference.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="../index.html" title="DocBook XSL Stylesheets: Reference Documentation"><link rel="up" href="refentry.html" title="Common » Refentry Metadata Template Reference"><link rel="prev" href="refentry.html" title="Common » Refentry Metadata Template Reference"><link rel="next" href="template.get.refentry.title.html" title="get.refentry.title"><link rel="copyright" href="copyright.html" title="License"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">get.refentry.metadata</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="refentry.html">Prev</a> </td><th width="60%" align="center">Common » Refentry Metadata Template Reference</th><td width="20%" align="right"> <a accesskey="n" href="template.get.refentry.title.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="template.get.refentry.metadata"></a><div class="titlepage"></div>
<div class="refnamediv"><h2>get.refentry.metadata</h2><p>
get.refentry.metadata
 &#8212; Gathers metadata from a refentry and its ancestors
</p></div>
<div class="refsynopsisdiv"><h2>Synopsis</h2>
<pre class="synopsis">&lt;xsl:template name="get.refentry.metadata"&gt;
&lt;xsl:param name="refname"/&gt;
&lt;xsl:param name="info"/&gt;
&lt;xsl:param name="prefs"/&gt;
  ...
&lt;/xsl:template&gt;</pre>
</div>
<div class="refsect1"><a name="idp9801760"></a><h2>Description</h2>
    
<p>Reference documentation for particular commands, functions,
    etc., is sometimes viewed in isolation from its greater "context". For
    example, users view Unix man pages as, well, individual pages, not as
    part of a "book" of some kind. Therefore, it is sometimes necessary to
    embed "context" information in output for each <a href="http://docbook.org/tdg5/en/html/refentry.html"><code class="sgmltag-element">refentry</code></a>.</p>


    
<p>However, one problem is that different users mark up that
    context information in different ways. Often (usually), the
    context information is not actually part of the content of the
    <a href="http://docbook.org/tdg5/en/html/refentry.html"><code class="sgmltag-element">refentry</code></a> itself, but instead part of the content of a
    parent or ancestor element to the <a href="http://docbook.org/tdg5/en/html/refentry.html"><code class="sgmltag-element">refentry</code></a>. And
    even then, DocBook provides a variety of elements that users might
    potentially use to mark up the same kind of information. One user
    might use the <a href="http://docbook.org/tdg5/en/html/productnumber.html"><code class="sgmltag-element">productnumber</code></a> element to mark up version
    information about a particular product, while another might use
    the <a href="http://docbook.org/tdg5/en/html/releaseinfo.html"><code class="sgmltag-element">releaseinfo</code></a> element.</p>


    
<p>Taking all that in mind, the
    <code class="function">get.refentry.metadata</code> template tries to gather
    metadata from a <a href="http://docbook.org/tdg5/en/html/refentry.html"><code class="sgmltag-element">refentry</code></a> element and its ancestor
    elements in an intelligent and user-configurable way. The basic
    mechanism used in the XPath expressions throughout this stylesheet
    is to select the relevant metadata from the *info element that is
    closest to the actual <a href="http://docbook.org/tdg5/en/html/refentry.html"><code class="sgmltag-element">refentry</code></a> &#8211; either on the
    <a href="http://docbook.org/tdg5/en/html/refentry.html"><code class="sgmltag-element">refentry</code></a> itself, or on its nearest ancestor.</p>


    <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
      
<p>The <code class="function">get.refentry.metadata</code>
        template is actually just sort of a "driver" template; it
        calls other templates that do the actual data collection,
        then returns the data as a set.</p>

    </div>

  </div><div class="refsect1"><a name="idp9808928"></a><h2>Parameters</h2>
    
<div class="variablelist"><dl class="variablelist"><dt><span class="term">refname</span></dt><dd>
          
<p>The first <a href="http://docbook.org/tdg5/en/html/refname.html"><code class="sgmltag-element">refname</code></a> in the refentry</p>

        </dd><dt><span class="term">info</span></dt><dd>
          
<p>A set of info nodes (from a <a href="http://docbook.org/tdg5/en/html/refentry.html"><code class="sgmltag-element">refentry</code></a>
          element and its ancestors)</p>

        </dd><dt><span class="term">prefs</span></dt><dd>
          
<p>A node containing user preferences (from global
          stylesheet parameters)</p>

        </dd></dl></div>

  </div><div class="refsect1"><a name="idp9816192"></a><h2>Returns</h2>
    
<p>Returns a node set with the following elements. The
    descriptions are verbatim from the <code class="literal">man(7)</code> man
    page.
    
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">title</span></dt><dd>
          
<p>the title of the man page (e.g., <code class="literal">MAN</code>)</p>

        </dd><dt><span class="term">section</span></dt><dd>
          
<p>the section number the man page should be placed in (e.g.,
          <code class="literal">7</code>)</p>

        </dd><dt><span class="term">date</span></dt><dd>
          
<p>the date of the last revision</p>

        </dd><dt><span class="term">source</span></dt><dd>
          
<p>the source of the command</p>

        </dd><dt><span class="term">manual</span></dt><dd>
          
<p>the title of the manual (e.g., <em class="citetitle">Linux
          Programmer's Manual</em>)</p>

        </dd></dl></div><p>

    </p>

  </div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="refentry.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="refentry.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="template.get.refentry.title.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Common » Refentry Metadata Template Reference </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> get.refentry.title</td></tr></table></div></body></html>