Sophie

Sophie

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

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

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>copyright.years</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="base.html" title="Common » Base Template Reference"><link rel="prev" href="template.check.idref.targets.html" title="check.idref.targets"><link rel="next" href="template.find.path.params.html" title="find.path.params"><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">copyright.years</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="template.check.idref.targets.html">Prev</a> </td><th width="60%" align="center">Common » Base Template Reference</th><td width="20%" align="right"> <a accesskey="n" href="template.find.path.params.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="template.copyright.years"></a><div class="titlepage"></div>
<div class="refnamediv"><h2>copyright.years</h2><p>
copyright.years
 &#8212; Print a set of years with collapsed ranges
</p></div>
<div class="refsynopsisdiv"><h2>Synopsis</h2>
<pre class="synopsis">&lt;xsl:template name="copyright.years"&gt;
&lt;xsl:param name="years"/&gt;
&lt;xsl:param name="print.ranges" select="1"/&gt;
&lt;xsl:param name="single.year.ranges" select="0"/&gt;
&lt;xsl:param name="firstyear" select="0"/&gt;
&lt;xsl:param name="nextyear" select="0"/&gt;
  ...
&lt;/xsl:template&gt;</pre>
</div>
<div class="refsect1"><a name="idp9724384"></a><h2>Description</h2>

<p>This template prints a list of year elements with consecutive
years printed as a range. In other words:</p>


<pre class="screen">&lt;year&gt;1992&lt;/year&gt;
&lt;year&gt;1993&lt;/year&gt;
&lt;year&gt;1994&lt;/year&gt;</pre>


<p>is printed <span class="quote">&#8220;<span class="quote">1992-1994</span>&#8221;</span>, whereas:</p>


<pre class="screen">&lt;year&gt;1992&lt;/year&gt;
&lt;year&gt;1994&lt;/year&gt;</pre>


<p>is printed <span class="quote">&#8220;<span class="quote">1992, 1994</span>&#8221;</span>.</p>



<p>This template assumes that all the year elements contain only
decimal year numbers, that the elements are sorted in increasing
numerical order, that there are no duplicates, and that all the years
are expressed in full <span class="quote">&#8220;<span class="quote">century+year</span>&#8221;</span>
(<span class="quote">&#8220;<span class="quote">1999</span>&#8221;</span> not <span class="quote">&#8220;<span class="quote">99</span>&#8221;</span>) notation.</p>

</div><div class="refsect1"><a name="idp9724512"></a><h2>Parameters</h2>

<div class="variablelist"><dl class="variablelist"><dt><span class="term">years</span></dt><dd>

<p>The initial set of year elements.</p>

</dd><dt><span class="term">print.ranges</span></dt><dd>

<p>If non-zero, multi-year ranges are collapsed. If zero, all years
are printed discretely.</p>

</dd><dt><span class="term">single.year.ranges</span></dt><dd>

<p>If non-zero, two consecutive years will be printed as a range,
otherwise, they will be printed discretely. In other words, a single
year range is <span class="quote">&#8220;<span class="quote">1991-1992</span>&#8221;</span> but discretely it's
<span class="quote">&#8220;<span class="quote">1991, 1992</span>&#8221;</span>.</p>

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

</div><div class="refsect1"><a name="idp9737776"></a><h2>Returns</h2>

<p>This template returns the formatted list of years.</p>

</div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="template.check.idref.targets.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="base.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="template.find.path.params.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">check.idref.targets </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> find.path.params</td></tr></table></div></body></html>