Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > 6e019a662639ac6470f50dea3a4d8157 > files > 178

docbook-style-xsl-doc-1.79.2-4.mga7.noarch.rpm

<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <title>glossary.collection</title><link rel="stylesheet" type="text/css" href="../reference.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.2"><link rel="home" href="../index.html" title="DocBook XSL Stylesheets: Reference&nbsp;Documentation"><link rel="up" href="glossary.html" title="Glossary"><link rel="prev" href="firstterm.only.link.html" title="firstterm.only.link"><link rel="next" href="glossary.as.blocks.html" title="glossary.as.blocks"><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">glossary.collection</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="firstterm.only.link.html">Prev</a>&nbsp;</td><th width="60%" align="center">Glossary</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="glossary.as.blocks.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="glossary.collection"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">glossary.collection</span></h2><p>glossary.collection &#8212; Name of the glossary collection file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><a name="glossary.collection.frag"></a><pre class="programlisting">
&lt;xsl:param name="glossary.collection"&gt;&lt;/xsl:param&gt;
</pre></div><div class="refsection"><a name="d0e16806"></a><h2>Description</h2><p>Glossaries maintained independently across a set of documents
are likely to become inconsistent unless considerable effort is
expended to keep them in sync. It makes much more sense, usually, to
store all of the glossary entries in a single place and simply
<span class="quote">&#8220;<span class="quote">extract</span>&#8221;</span> the ones you need in each document.</p><p>That's the purpose of the
<em class="parameter"><code>glossary.collection</code></em> parameter. To setup a global
glossary <span class="quote">&#8220;<span class="quote">database</span>&#8221;</span>, follow these steps:</p><div class="refsection"><a name="d0e16823"></a><h3>Setting Up the Glossary Database</h3><p>First, create a stand-alone glossary document that contains all of
the entries that you wish to reference. Make sure that each glossary
entry has an ID.</p><p>Here's an example glossary:</p><div class="informalexample"><pre class="programlisting">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!DOCTYPE glossary
  PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
  "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"&gt;
&lt;glossary&gt;
&lt;glossaryinfo&gt;
&lt;editor&gt;&lt;firstname&gt;Eric&lt;/firstname&gt;&lt;surname&gt;Raymond&lt;/surname&gt;&lt;/editor&gt;
&lt;title&gt;Jargon File 4.2.3 (abridged)&lt;/title&gt;
&lt;releaseinfo&gt;Just some test data&lt;/releaseinfo&gt;
&lt;/glossaryinfo&gt;

&lt;glossdiv&gt;&lt;title&gt;0&lt;/title&gt;

&lt;glossentry&gt;
&lt;glossterm&gt;0&lt;/glossterm&gt;
&lt;glossdef&gt;
&lt;para&gt;Numeric zero, as opposed to the letter `O' (the 15th letter of
the English alphabet). In their unmodified forms they look a lot
alike, and various kluges invented to make them visually distinct have
compounded the confusion. If your zero is center-dotted and letter-O
is not, or if letter-O looks almost rectangular but zero looks more
like an American football stood on end (or the reverse), you're
probably looking at a modern character display (though the dotted zero
seems to have originated as an option on IBM 3270 controllers). If
your zero is slashed but letter-O is not, you're probably looking at
an old-style ASCII graphic set descended from the default typewheel on
the venerable ASR-33 Teletype (Scandinavians, for whom /O is a letter,
curse this arrangement). (Interestingly, the slashed zero long
predates computers; Florian Cajori's monumental "A History of
Mathematical Notations" notes that it was used in the twelfth and
thirteenth centuries.) If letter-O has a slash across it and the zero
does not, your display is tuned for a very old convention used at IBM
and a few other early mainframe makers (Scandinavians curse &lt;emphasis&gt;this&lt;/emphasis&gt;
arrangement even more, because it means two of their letters collide).
Some Burroughs/Unisys equipment displays a zero with a &lt;emphasis&gt;reversed&lt;/emphasis&gt;
slash. Old CDC computers rendered letter O as an unbroken oval and 0
as an oval broken at upper right and lower left. And yet another
convention common on early line printers left zero unornamented but
added a tail or hook to the letter-O so that it resembled an inverted
Q or cursive capital letter-O (this was endorsed by a draft ANSI
standard for how to draw ASCII characters, but the final standard
changed the distinguisher to a tick-mark in the upper-left corner).
Are we sufficiently confused yet?&lt;/para&gt;
&lt;/glossdef&gt;
&lt;/glossentry&gt;

&lt;glossentry&gt;
&lt;glossterm&gt;1TBS&lt;/glossterm&gt;
&lt;glossdef&gt;
&lt;para role="accidence"&gt;
&lt;phrase role="pronounce"&gt;&lt;/phrase&gt;
&lt;phrase role="partsofspeach"&gt;n&lt;/phrase&gt;
&lt;/para&gt;
&lt;para&gt;The "One True Brace Style"&lt;/para&gt;
&lt;glossseealso&gt;indent style&lt;/glossseealso&gt;
&lt;/glossdef&gt;
&lt;/glossentry&gt;

&lt;!-- ... --&gt;

&lt;/glossdiv&gt;

&lt;!-- ... --&gt;

&lt;/glossary&gt;</pre></div></div><div class="refsection"><a name="d0e16834"></a><h3>Marking Up Glossary Terms</h3><p>That takes care of the glossary database, now you have to get the entries
into your document. Unlike bibliography entries, which can be empty, creating
<span class="quote">&#8220;<span class="quote">placeholder</span>&#8221;</span> glossary entries would be very tedious. So instead,
support for <em class="parameter"><code>glossary.collection</code></em> relies on implicit linking.</p><p>In your source document, simply use <code class="sgmltag-element">firstterm</code> and
<code class="sgmltag-element">glossterm</code> to identify the terms you wish to have included
in the glossary. The stylesheets assume that you will either set the
<code class="sgmltag-attribute">baseform</code> attribute correctly, or that the
content of the element exactly matches a term in your glossary.</p><p>If you're using a <em class="parameter"><code>glossary.collection</code></em>, don't
make explicit links on the terms in your document.</p><p>So, in your document, you might write things like this:</p><div class="informalexample"><pre class="programlisting">&lt;para&gt;This is dummy text, without any real meaning.
The point is simply to reference glossary terms like &lt;glossterm&gt;0&lt;/glossterm&gt;
and the &lt;firstterm baseform="1TBS"&gt;One True Brace Style (1TBS)&lt;/firstterm&gt;.
The &lt;glossterm&gt;1TBS&lt;/glossterm&gt;, as you can probably imagine, is a nearly
religious issue.&lt;/para&gt;</pre></div><p>If you set the <em class="parameter"><code>firstterm.only.link</code></em> parameter,
only the terms marked with <code class="sgmltag-element">firstterm</code> will be links.
Otherwise, all the terms will be linked.</p></div><div class="refsection"><a name="d0e16875"></a><h3>Marking Up the Glossary</h3><p>The glossary itself has to be identified for the stylesheets. For lack
of a better choice, the <code class="sgmltag-attribute">role</code> is used.
To identify the glossary as the target for automatic processing, set
the role to <span class="quote">&#8220;<span class="quote"><code class="literal">auto</code></span>&#8221;</span>. The title of this
glossary (and any other information from the <code class="sgmltag-element">glossaryinfo</code>
that's rendered by your stylesheet) will be displayed, but the entries will
come from the database.
</p><p>Unfortunately, the glossary can't be empty, so you must put in
at least one <code class="sgmltag-element">glossentry</code>. The content of this entry
is irrelevant, it will not be rendered:</p><div class="informalexample"><pre class="programlisting">&lt;glossary role="auto"&gt;
&lt;glossentry&gt;
&lt;glossterm&gt;Irrelevant&lt;/glossterm&gt;
&lt;glossdef&gt;
&lt;para&gt;If you can see this, the document was processed incorrectly. Use
the &lt;parameter&gt;glossary.collection&lt;/parameter&gt; parameter.&lt;/para&gt;
&lt;/glossdef&gt;
&lt;/glossentry&gt;
&lt;/glossary&gt;</pre></div><p>What about glossary divisions? If your glossary database has glossary
divisions <span class="emphasis"><em>and</em></span> your automatic glossary contains at least
one <code class="sgmltag-element">glossdiv</code>, the automic glossary will have divisions.
If the <code class="sgmltag-element">glossdiv</code> is missing from either location, no divisions
will be rendered.</p><p>Glossary entries (and divisions, if appropriate) in the glossary will
occur in precisely the order they occur in your database.</p></div><div class="refsection"><a name="d0e16912"></a><h3>Formatting the Document</h3><p>Finally, when you are ready to format your document, simply set the
<em class="parameter"><code>glossary.collection</code></em> parameter (in either a
customization layer or directly through your processor's interface) to
point to your global glossary.</p><p>A relative path in the parameter is interpreted in one
of two ways:</p><div class="orderedlist"><ol class="orderedlist" type="a"><li class="listitem"><p>If the parameter <code class="literal">glossterm.auto.link</code>
    is set to zero, then the path is relative to the file containing
    the empty <code class="sgmltag-element">glossary</code> element in the document.</p></li><li class="listitem"><p>If the parameter <code class="literal">glossterm.auto.link</code>
    is set to non-zero, then the path is relative to the file containing
    the first inline <code class="sgmltag-element">glossterm</code> or
    <code class="sgmltag-element">firstterm</code> in the document to be linked.</p></li></ol></div><p>Once the collection file is opened by the first instance described
above, it stays open for the current document
and the relative path is not reinterpreted again.</p><p>The stylesheets will format the glossary in your document as if
all of the entries implicilty referenced appeared there literally.</p></div><div class="refsection"><a name="d0e16949"></a><h3>Limitations</h3><p>Glossary cross-references <span class="emphasis"><em>within the glossary</em></span> are
not supported. For example, this <span class="emphasis"><em>will not</em></span> work:</p><div class="informalexample"><pre class="programlisting">&lt;glossentry&gt;
&lt;glossterm&gt;gloss-1&lt;/glossterm&gt;
&lt;glossdef&gt;&lt;para&gt;A description that references &lt;glossterm&gt;gloss-2&lt;/glossterm&gt;.&lt;/para&gt;
&lt;glossseealso&gt;gloss-2&lt;/glossseealso&gt;
&lt;/glossdef&gt;
&lt;/glossentry&gt;</pre></div><p>If you put glossary cross-references in your glossary that way,
you'll get the cryptic error: <code class="computeroutput">Warning:
glossary.collection specified, but there are 0 automatic
glossaries</code>.</p><p>Instead, you must do two things:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Markup your glossary using <code class="sgmltag-element">glossseealso</code>:</p><div class="informalexample"><pre class="programlisting">&lt;glossentry&gt;
&lt;glossterm&gt;gloss-1&lt;/glossterm&gt;
&lt;glossdef&gt;&lt;para&gt;A description that references &lt;glossterm&gt;gloss-2&lt;/glossterm&gt;.&lt;/para&gt;
&lt;glossseealso&gt;gloss-2&lt;/glossseealso&gt;
&lt;/glossdef&gt;
&lt;/glossentry&gt;</pre></div></li><li class="listitem"><p>Make sure there is at least one <code class="sgmltag-element">glossterm</code> reference to
<em class="glossterm">gloss-2</em> <span class="emphasis"><em>in your document</em></span>. The
easiest way to do that is probably within a <code class="sgmltag-element">remark</code> in your
automatic glossary:</p><div class="informalexample"><pre class="programlisting">&lt;glossary role="auto"&gt;
&lt;remark&gt;Make sure there's a reference to &lt;glossterm&gt;gloss-2&lt;/glossterm&gt;.&lt;/remark&gt;
&lt;glossentry&gt;
&lt;glossterm&gt;Irrelevant&lt;/glossterm&gt;
&lt;glossdef&gt;
&lt;para&gt;If you can see this, the document was processed incorrectly. Use
the &lt;parameter&gt;glossary.collection&lt;/parameter&gt; parameter.&lt;/para&gt;
&lt;/glossdef&gt;
&lt;/glossentry&gt;
&lt;/glossary&gt;</pre></div></li></ol></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="firstterm.only.link.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="glossary.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="glossary.as.blocks.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">firstterm.only.link&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;glossary.as.blocks</td></tr></table></div></body></html>