]> git.evergreen-ils.org Git - working/Evergreen.git/blob - stylesheets/evergreen_docbook_files/docbook-xsl-1.75.2/params/glossary.collection.xml
Add stylesheets for our evergreen docbook site.
[working/Evergreen.git] / stylesheets / evergreen_docbook_files / docbook-xsl-1.75.2 / params / glossary.collection.xml
1 <refentry xmlns="http://docbook.org/ns/docbook"\r
2           xmlns:xlink="http://www.w3.org/1999/xlink"\r
3           xmlns:xi="http://www.w3.org/2001/XInclude"\r
4           xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"\r
5           xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
6           version="5.0" xml:id="glossary.collection">\r
7 <refmeta>\r
8 <refentrytitle>glossary.collection</refentrytitle>\r
9 <refmiscinfo class="other" otherclass="datatype">string</refmiscinfo>\r
10 </refmeta>\r
11 <refnamediv>\r
12 <refname>glossary.collection</refname>\r
13 <refpurpose>Name of the glossary collection file</refpurpose>\r
14 </refnamediv>\r
15 \r
16 <refsynopsisdiv>\r
17 <src:fragment xml:id="glossary.collection.frag">\r
18 <xsl:param name="glossary.collection"></xsl:param>\r
19 </src:fragment>\r
20 </refsynopsisdiv>\r
21 \r
22 <refsection><info><title>Description</title></info>\r
23 \r
24 <para>Glossaries maintained independently across a set of documents\r
25 are likely to become inconsistent unless considerable effort is\r
26 expended to keep them in sync. It makes much more sense, usually, to\r
27 store all of the glossary entries in a single place and simply\r
28 <quote>extract</quote> the ones you need in each document.</para>\r
29 \r
30 <para>That's the purpose of the\r
31 <parameter>glossary.collection</parameter> parameter. To setup a global\r
32 glossary <quote>database</quote>, follow these steps:</para>\r
33 \r
34 <refsection><info><title>Setting Up the Glossary Database</title></info>\r
35 \r
36 <para>First, create a stand-alone glossary document that contains all of\r
37 the entries that you wish to reference. Make sure that each glossary\r
38 entry has an ID.</para>\r
39 \r
40 <para>Here's an example glossary:</para>\r
41 \r
42 <informalexample>\r
43 <programlisting>\r
44 &lt;?xml version="1.0" encoding="utf-8"?&gt;\r
45 &lt;!DOCTYPE glossary\r
46   PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"\r
47   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"&gt;\r
48 &lt;glossary&gt;\r
49 &lt;glossaryinfo&gt;\r
50 &lt;editor&gt;&lt;firstname&gt;Eric&lt;/firstname&gt;&lt;surname&gt;Raymond&lt;/surname&gt;&lt;/editor&gt;\r
51 &lt;title&gt;Jargon File 4.2.3 (abridged)&lt;/title&gt;\r
52 &lt;releaseinfo&gt;Just some test data&lt;/releaseinfo&gt;\r
53 &lt;/glossaryinfo&gt;\r
54 \r
55 &lt;glossdiv&gt;&lt;title&gt;0&lt;/title&gt;\r
56 \r
57 &lt;glossentry&gt;\r
58 &lt;glossterm&gt;0&lt;/glossterm&gt;\r
59 &lt;glossdef&gt;\r
60 &lt;para&gt;Numeric zero, as opposed to the letter `O' (the 15th letter of\r
61 the English alphabet). In their unmodified forms they look a lot\r
62 alike, and various kluges invented to make them visually distinct have\r
63 compounded the confusion. If your zero is center-dotted and letter-O\r
64 is not, or if letter-O looks almost rectangular but zero looks more\r
65 like an American football stood on end (or the reverse), you're\r
66 probably looking at a modern character display (though the dotted zero\r
67 seems to have originated as an option on IBM 3270 controllers). If\r
68 your zero is slashed but letter-O is not, you're probably looking at\r
69 an old-style ASCII graphic set descended from the default typewheel on\r
70 the venerable ASR-33 Teletype (Scandinavians, for whom /O is a letter,\r
71 curse this arrangement). (Interestingly, the slashed zero long\r
72 predates computers; Florian Cajori's monumental "A History of\r
73 Mathematical Notations" notes that it was used in the twelfth and\r
74 thirteenth centuries.) If letter-O has a slash across it and the zero\r
75 does not, your display is tuned for a very old convention used at IBM\r
76 and a few other early mainframe makers (Scandinavians curse &lt;emphasis&gt;this&lt;/emphasis&gt;\r
77 arrangement even more, because it means two of their letters collide).\r
78 Some Burroughs/Unisys equipment displays a zero with a &lt;emphasis&gt;reversed&lt;/emphasis&gt;\r
79 slash. Old CDC computers rendered letter O as an unbroken oval and 0\r
80 as an oval broken at upper right and lower left. And yet another\r
81 convention common on early line printers left zero unornamented but\r
82 added a tail or hook to the letter-O so that it resembled an inverted\r
83 Q or cursive capital letter-O (this was endorsed by a draft ANSI\r
84 standard for how to draw ASCII characters, but the final standard\r
85 changed the distinguisher to a tick-mark in the upper-left corner).\r
86 Are we sufficiently confused yet?&lt;/para&gt;\r
87 &lt;/glossdef&gt;\r
88 &lt;/glossentry&gt;\r
89 \r
90 &lt;glossentry&gt;\r
91 &lt;glossterm&gt;1TBS&lt;/glossterm&gt;\r
92 &lt;glossdef&gt;\r
93 &lt;para role="accidence"&gt;\r
94 &lt;phrase role="pronounce"&gt;&lt;/phrase&gt;\r
95 &lt;phrase role="partsofspeach"&gt;n&lt;/phrase&gt;\r
96 &lt;/para&gt;\r
97 &lt;para&gt;The "One True Brace Style"&lt;/para&gt;\r
98 &lt;glossseealso&gt;indent style&lt;/glossseealso&gt;\r
99 &lt;/glossdef&gt;\r
100 &lt;/glossentry&gt;\r
101 \r
102 &lt;!-- ... --&gt;\r
103 \r
104 &lt;/glossdiv&gt;\r
105 \r
106 &lt;!-- ... --&gt;\r
107 \r
108 &lt;/glossary&gt;</programlisting>\r
109 </informalexample>\r
110 \r
111 </refsection>\r
112 \r
113 <refsection><info><title>Marking Up Glossary Terms</title></info>\r
114 \r
115 <para>That takes care of the glossary database, now you have to get the entries\r
116 into your document. Unlike bibliography entries, which can be empty, creating\r
117 <quote>placeholder</quote> glossary entries would be very tedious. So instead,\r
118 support for <parameter>glossary.collection</parameter> relies on implicit linking.</para>\r
119 \r
120 <para>In your source document, simply use <tag>firstterm</tag> and\r
121 <tag>glossterm</tag> to identify the terms you wish to have included\r
122 in the glossary. The stylesheets assume that you will either set the\r
123 <tag class="attribute">baseform</tag> attribute correctly, or that the\r
124 content of the element exactly matches a term in your glossary.</para>\r
125 \r
126 <para>If you're using a <parameter>glossary.collection</parameter>, don't\r
127 make explicit links on the terms in your document.</para>\r
128 \r
129 <para>So, in your document, you might write things like this:</para>\r
130 \r
131 <informalexample>\r
132 <programlisting>&lt;para&gt;This is dummy text, without any real meaning.\r
133 The point is simply to reference glossary terms like &lt;glossterm&gt;0&lt;/glossterm&gt;\r
134 and the &lt;firstterm baseform="1TBS"&gt;One True Brace Style (1TBS)&lt;/firstterm&gt;.\r
135 The &lt;glossterm&gt;1TBS&lt;/glossterm&gt;, as you can probably imagine, is a nearly\r
136 religious issue.&lt;/para&gt;</programlisting>\r
137 </informalexample>\r
138 \r
139 <para>If you set the <parameter>firstterm.only.link</parameter> parameter,\r
140 only the terms marked with <tag>firstterm</tag> will be links.\r
141 Otherwise, all the terms will be linked.</para>\r
142 \r
143 </refsection>\r
144 \r
145 <refsection><info><title>Marking Up the Glossary</title></info>\r
146 \r
147 <para>The glossary itself has to be identified for the stylesheets. For lack\r
148 of a better choice, the <tag class="attribute">role</tag> is used.\r
149 To identify the glossary as the target for automatic processing, set\r
150 the role to <quote><literal>auto</literal></quote>. The title of this\r
151 glossary (and any other information from the <tag>glossaryinfo</tag>\r
152 that's rendered by your stylesheet) will be displayed, but the entries will\r
153 come from the database.\r
154 </para>\r
155 \r
156 <para>Unfortunately, the glossary can't be empty, so you must put in\r
157 at least one <tag>glossentry</tag>. The content of this entry\r
158 is irrelevant, it will not be rendered:</para>\r
159 \r
160 <informalexample>\r
161 <programlisting>&lt;glossary role="auto"&gt;\r
162 &lt;glossentry&gt;\r
163 &lt;glossterm&gt;Irrelevant&lt;/glossterm&gt;\r
164 &lt;glossdef&gt;\r
165 &lt;para&gt;If you can see this, the document was processed incorrectly. Use\r
166 the &lt;parameter&gt;glossary.collection&lt;/parameter&gt; parameter.&lt;/para&gt;\r
167 &lt;/glossdef&gt;\r
168 &lt;/glossentry&gt;\r
169 &lt;/glossary&gt;</programlisting>\r
170 </informalexample>\r
171 \r
172 <para>What about glossary divisions? If your glossary database has glossary\r
173 divisions <emphasis>and</emphasis> your automatic glossary contains at least\r
174 one <tag>glossdiv</tag>, the automic glossary will have divisions.\r
175 If the <tag>glossdiv</tag> is missing from either location, no divisions\r
176 will be rendered.</para>\r
177 \r
178 <para>Glossary entries (and divisions, if appropriate) in the glossary will\r
179 occur in precisely the order they occur in your database.</para>\r
180 \r
181 </refsection>\r
182 \r
183 <refsection><info><title>Formatting the Document</title></info>\r
184 \r
185 <para>Finally, when you are ready to format your document, simply set the\r
186 <parameter>glossary.collection</parameter> parameter (in either a\r
187 customization layer or directly through your processor's interface) to\r
188 point to your global glossary.</para>\r
189 \r
190 <para>The stylesheets will format the glossary in your document as if\r
191 all of the entries implicilty referenced appeared there literally.</para>\r
192 </refsection>\r
193 \r
194 <refsection><info><title>Limitations</title></info>\r
195 \r
196 <para>Glossary cross-references <emphasis>within the glossary</emphasis> are\r
197 not supported. For example, this <emphasis>will not</emphasis> work:</para>\r
198 \r
199 <informalexample>\r
200 <programlisting>&lt;glossentry&gt;\r
201 &lt;glossterm&gt;gloss-1&lt;/glossterm&gt;\r
202 &lt;glossdef&gt;&lt;para&gt;A description that references &lt;glossterm&gt;gloss-2&lt;/glossterm&gt;.&lt;/para&gt;\r
203 &lt;glossseealso&gt;gloss-2&lt;/glossseealso&gt;\r
204 &lt;/glossdef&gt;\r
205 &lt;/glossentry&gt;</programlisting>\r
206 </informalexample>\r
207 \r
208 <para>If you put glossary cross-references in your glossary that way,\r
209 you'll get the cryptic error: <computeroutput>Warning:\r
210 glossary.collection specified, but there are 0 automatic\r
211 glossaries</computeroutput>.</para>\r
212 \r
213 <para>Instead, you must do two things:</para>\r
214 \r
215 <orderedlist>\r
216 <listitem>\r
217 <para>Markup your glossary using <tag>glossseealso</tag>:</para>\r
218 \r
219 <informalexample>\r
220 <programlisting>&lt;glossentry&gt;\r
221 &lt;glossterm&gt;gloss-1&lt;/glossterm&gt;\r
222 &lt;glossdef&gt;&lt;para&gt;A description that references &lt;glossterm&gt;gloss-2&lt;/glossterm&gt;.&lt;/para&gt;\r
223 &lt;glossseealso&gt;gloss-2&lt;/glossseealso&gt;\r
224 &lt;/glossdef&gt;\r
225 &lt;/glossentry&gt;</programlisting>\r
226 </informalexample>\r
227 </listitem>\r
228 \r
229 <listitem>\r
230 <para>Make sure there is at least one <tag>glossterm</tag> reference to\r
231 <glossterm>gloss-2</glossterm> <emphasis>in your document</emphasis>. The\r
232 easiest way to do that is probably within a <tag>remark</tag> in your\r
233 automatic glossary:</para>\r
234 \r
235 <informalexample>\r
236 <programlisting>&lt;glossary role="auto"&gt;\r
237 &lt;remark&gt;Make sure there's a reference to &lt;glossterm&gt;gloss-2&lt;/glossterm&gt;.&lt;/remark&gt;\r
238 &lt;glossentry&gt;\r
239 &lt;glossterm&gt;Irrelevant&lt;/glossterm&gt;\r
240 &lt;glossdef&gt;\r
241 &lt;para&gt;If you can see this, the document was processed incorrectly. Use\r
242 the &lt;parameter&gt;glossary.collection&lt;/parameter&gt; parameter.&lt;/para&gt;\r
243 &lt;/glossdef&gt;\r
244 &lt;/glossentry&gt;\r
245 &lt;/glossary&gt;</programlisting>\r
246 </informalexample>\r
247 </listitem>\r
248 </orderedlist>\r
249 </refsection>\r
250 \r
251 </refsection>\r
252 </refentry>\r