]> git.evergreen-ils.org Git - working/Evergreen.git/blob - stylesheets/styleguide/docbook-xsl-1.75.2/template/titlepage.xml
stylesheet changes.
[working/Evergreen.git] / stylesheets / styleguide / docbook-xsl-1.75.2 / template / titlepage.xml
1 <?xml version="1.0"?>\r
2 \r
3 <reference xml:id="template"><?dbhtml dir="template"?><?dbhtml filename="index.html"?>\r
4   \r
5   \r
6   <info>\r
7     <title>Titlepage Template Stylesheet Reference</title>\r
8     <releaseinfo role="meta">\r
9       $Id: titlepage.xsl 7058 2007-07-17 13:59:29Z xmldoc $\r
10     </releaseinfo>\r
11   </info>\r
12   <partintro xml:id="intro_partintro">\r
13     <title>Introduction</title>\r
14     \r
15 <para>This is technical reference documentation for the\r
16       “titlepage” templates in the DocBook XSL Stylesheets.</para>\r
17 \r
18     \r
19 <para>This is not intended to be user documentation.  It is\r
20       provided for developers writing customization layers for the\r
21       stylesheets.</para>\r
22 \r
23   </partintro>\r
24 \r
25 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="templates">\r
26 <refnamediv>\r
27 <refname>t:templates</refname>\r
28 <refpurpose>Construct a stylesheet for the templates provided</refpurpose>\r
29 </refnamediv>\r
30 <refsynopsisdiv>\r
31 <synopsis>&lt;xsl:template match="t:templates"/&gt;</synopsis>\r
32 </refsynopsisdiv>\r
33 <refsect1><title>Description</title>\r
34 \r
35 <para>The <literal>t:templates</literal> element is the root of a\r
36 set of templates. This template creates an appropriate\r
37 <literal>xsl:stylesheet</literal> for the templates.</para>\r
38 \r
39 \r
40 \r
41 <para>If the <literal>t:templates</literal> element has a\r
42 <literal>base-stylesheet</literal> attribute, an\r
43 <literal>xsl:import</literal> statement is constructed for it.</para>\r
44 \r
45 </refsect1></refentry>\r
46 \r
47 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="star">\r
48 <refnamediv>\r
49 <refname>xsl:*</refname>\r
50 <refpurpose>Copy xsl: elements straight through</refpurpose>\r
51 </refnamediv>\r
52 <refsynopsisdiv>\r
53 <synopsis>&lt;xsl:template match="xsl:*"/&gt;</synopsis>\r
54 </refsynopsisdiv>\r
55 <refsect1><title>Description</title>\r
56 \r
57 <para>This template simply copies the xsl: elements\r
58 straight through into the result tree.</para>\r
59 \r
60 </refsect1></refentry>\r
61 \r
62 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="titlepage">\r
63 <refnamediv>\r
64 <refname>t:titlepage</refname>\r
65 <refpurpose>Create the templates necessary to construct a title page</refpurpose>\r
66 </refnamediv>\r
67 <refsynopsisdiv>\r
68 <synopsis>&lt;xsl:template match="t:titlepage"/&gt;</synopsis>\r
69 </refsynopsisdiv>\r
70 <refsect1><title>Description</title>\r
71 \r
72 <para>The <literal>t:titlepage</literal> element creates a set of\r
73 templates for processing the titlepage for an element. The\r
74 <quote>root</quote> of this template set is the template named\r
75 <quote><literal>wrapper.titlepage</literal></quote>. That is the\r
76 template that should be called to generate the title page.\r
77 </para>\r
78 \r
79 \r
80 \r
81 <para>The <literal>t:titlepage</literal> element has three attributes:\r
82 \r
83 \r
84 <variablelist>\r
85 <varlistentry><term>element</term>\r
86 <listitem>\r
87 <para>The name of the source document element for which\r
88 these templates apply. In other words, to make a title page for the\r
89 <tag>article</tag> element, set the\r
90 <tag class="attribute">element</tag> attribute to\r
91 <quote><literal>article</literal></quote>. This attribute is required.\r
92 </para>\r
93 </listitem>\r
94 </varlistentry>\r
95 <varlistentry><term>wrapper</term>\r
96 <listitem>\r
97 <para>The entire title page can be wrapped with an element.\r
98 This attribute identifies that element.\r
99 </para>\r
100 </listitem>\r
101 </varlistentry>\r
102 <varlistentry><term>class</term>\r
103 <listitem>\r
104 <para>If the <tag class="attribute">class</tag> attribute\r
105 is set, a <tag class="attribute">class</tag> attribute with this\r
106 value will be added to the wrapper element that surrounds the entire\r
107 title page.\r
108 </para>\r
109 </listitem>\r
110 </varlistentry>\r
111 </variablelist>\r
112 \r
113 </para>\r
114 \r
115 \r
116 \r
117 <para>Any other attributes are copied through literally to the\r
118 wrapper element.</para>\r
119 \r
120 \r
121 \r
122 <para>The content of a <literal>t:titlepage</literal> is one or\r
123 more <literal>t:titlepage-content</literal>,\r
124 <literal>t:titlepage-separator</literal>, and\r
125 <literal>t:titlepage-before</literal> elements.</para>\r
126 \r
127 \r
128 \r
129 <para>Each of these elements may be provided for the <quote>recto</quote>\r
130 and <quote>verso</quote> sides of the title page.</para>\r
131 \r
132 \r
133 </refsect1></refentry>\r
134 \r
135 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="attr_star_in_copy.literal.atts">\r
136 <refnamediv>\r
137 <refname>@* (in copy.literal.atts mode)</refname>\r
138 <refpurpose>Copy t:titlepage attributes</refpurpose>\r
139 </refnamediv>\r
140 <refsynopsisdiv>\r
141 <synopsis>&lt;xsl:template match="@*" mode="copy.literal.atts"/&gt;</synopsis>\r
142 </refsynopsisdiv>\r
143 <refsect1><title>Description</title>\r
144 \r
145 <para>This template copies all of the <quote>other</quote> attributes\r
146 from a <literal>t:titlepage</literal> element onto the specified\r
147 wrapper.</para>\r
148 \r
149 </refsect1></refentry>\r
150 \r
151 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="titlepage-content">\r
152 <refnamediv>\r
153 <refname>t:titlepage-content</refname>\r
154 <refpurpose>Create templates for the content of one side of a title page</refpurpose>\r
155 </refnamediv>\r
156 <refsynopsisdiv>\r
157 <synopsis>&lt;xsl:template match="t:titlepage-content"/&gt;</synopsis>\r
158 </refsynopsisdiv>\r
159 <refsect1><title>Description</title>\r
160 \r
161 <para>The title page content, that is, the elements from the source\r
162 document that are rendered on the title page, can be controlled independently\r
163 for the recto and verso sides of the title page.</para>\r
164 \r
165 \r
166 \r
167 <para>The <literal>t:titlepage-content</literal> element has two attributes:\r
168 \r
169 \r
170 <variablelist>\r
171 <varlistentry><term>side</term>\r
172 <listitem>\r
173 <para>Identifies the side of the page to which this title\r
174 page content applies. The\r
175 <tag class="attribute">side</tag> attribute is required and\r
176 must be set to either \r
177 <quote><literal>recto</literal></quote> or\r
178 <quote><literal>verso</literal></quote>. In addition, you must specify\r
179 exactly one <literal>t:titlepage-content</literal> for each side\r
180 within each <literal>t:titlepage</literal>.</para>\r
181 \r
182 </listitem>\r
183 </varlistentry>\r
184 <varlistentry><term>order</term>\r
185 <listitem>\r
186 <para>Indicates how the order of the elements presented on\r
187 the title page is determined. If the\r
188 <tag class="attribute">order</tag> is\r
189 <quote><literal>document</literal></quote>, the elements are presented\r
190 in document order. Otherwise (if the\r
191 <tag class="attribute">order</tag> is\r
192 <quote><literal>stylesheet</literal></quote>), the elements are presented\r
193 in the order that they appear in the template (and consequently in\r
194 the stylesheet).</para>\r
195 \r
196 </listitem>\r
197 </varlistentry>\r
198 </variablelist>\r
199 \r
200 </para>\r
201 \r
202 \r
203 \r
204 <para>The content of a <literal>t:titlepage-content</literal> element is\r
205 a list of element names. These names should be unqualified.  They identify\r
206 the elements in the source document that should appear on the title page.\r
207 </para>\r
208 \r
209 \r
210 \r
211 <para>Each element may have a single attribute:\r
212 <tag class="attribute">predicate</tag>. The value of this\r
213 attribute is used as a predicate for the expression that matches\r
214 the element on which it occurs.</para>\r
215 \r
216 \r
217 \r
218 <para>In other words, to put only the first three authors on the\r
219 recto-side of a title\r
220 page, you could specify:\r
221 \r
222 <screen>\r
223   &lt;t:titlepage-contents side="recto"&gt;\r
224     &lt;!-- other titlepage elements --&gt;\r
225     &lt;author predicate="[count(previous-sibling::author)&lt;2]"/&gt;\r
226     &lt;!-- other titlepage elements --&gt;\r
227   &lt;/t:titlepage-contents&gt;\r
228 </screen>\r
229 </para>\r
230 \r
231 \r
232 \r
233 <para>Usually, the elements so named are empty. But it is possible to\r
234 make one level of selection within them. Suppose that you want to\r
235 process <literal>authorgroup</literal> elements on the title page, but\r
236 you want to select only proper authors, editors, or corporate authors,\r
237 not collaborators or other credited authors.</para>\r
238 \r
239 \r
240 \r
241 <para>In that case, you can put a <literal>t:or</literal> group inside\r
242 the <literal>authorgroup</literal> element:\r
243 \r
244 <screen>\r
245   &lt;t:titlepage-contents side="recto"&gt;\r
246     &lt;!-- other titlepage elements --&gt;\r
247     &lt;authorgroup&gt;\r
248       &lt;t:or&gt;\r
249         &lt;author/&gt;\r
250         &lt;editor/&gt;\r
251         &lt;corpauthor/&gt;\r
252       &lt;/t:or&gt;\r
253     &lt;/authorgroup&gt;\r
254     &lt;!-- other titlepage elements --&gt;\r
255   &lt;/t:titlepage-contents&gt;\r
256 </screen>\r
257 </para>\r
258 \r
259 \r
260 \r
261 <para>This will have the effect of automatically generating a template\r
262 for processing <literal>authorgroup</literal>s in the title page mode,\r
263 selecting only the specified children. If you need more complex processing,\r
264 you'll have to construct the templates by hand.</para>\r
265 \r
266 \r
267 </refsect1></refentry>\r
268 \r
269 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="titlepage-separator">\r
270 <refnamediv>\r
271 <refname>t:titlepage-separator</refname>\r
272 <refpurpose>Create templates for the separator</refpurpose>\r
273 </refnamediv>\r
274 <refsynopsisdiv>\r
275 <synopsis>&lt;xsl:template match="t:titlepage-separator"/&gt;</synopsis>\r
276 </refsynopsisdiv>\r
277 <refsect1><title>Description</title>\r
278 \r
279 <para>The title page is separated from the content which follows it by\r
280 the markup specified in the <literal>t:titlepage-separator</literal>\r
281 element.</para>\r
282 \r
283 </refsect1></refentry>\r
284 \r
285 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="titlepage-before">\r
286 <refnamediv>\r
287 <refname>t:titlepage-before</refname>\r
288 <refpurpose>Create templates for what precedes a title page</refpurpose>\r
289 </refnamediv>\r
290 <refsynopsisdiv>\r
291 <synopsis>&lt;xsl:template match="t:titlepage-before"/&gt;</synopsis>\r
292 </refsynopsisdiv>\r
293 <refsect1><title>Description</title>\r
294 \r
295 <para>Each side of the title page is preceded by the markup specified\r
296 in the <literal>t:titlepage-before</literal> element for that\r
297 side.</para>\r
298 \r
299 </refsect1></refentry>\r
300 \r
301 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="star_in_copy">\r
302 <refnamediv>\r
303 <refname>* (in copy mode)</refname>\r
304 <refpurpose>Copy elements</refpurpose>\r
305 </refnamediv>\r
306 <refsynopsisdiv>\r
307 <synopsis>&lt;xsl:template match="*" mode="copy"/&gt;</synopsis>\r
308 </refsynopsisdiv>\r
309 <refsect1><title>Description</title>\r
310 \r
311 <para>This template simply copies the elements that it applies to\r
312 straight through into the result tree.</para>\r
313 \r
314 </refsect1></refentry>\r
315 \r
316 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="attr_star_in_copy">\r
317 <refnamediv>\r
318 <refname>@* (in copy mode)</refname>\r
319 <refpurpose>Copy attributes</refpurpose>\r
320 </refnamediv>\r
321 <refsynopsisdiv>\r
322 <synopsis>&lt;xsl:template match="@*" mode="copy"/&gt;</synopsis>\r
323 </refsynopsisdiv>\r
324 <refsect1><title>Description</title>\r
325 \r
326 <para>This template simply copies the attributes that it applies to\r
327 straight through into the result tree.</para>\r
328 \r
329 </refsect1></refentry>\r
330 \r
331 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="attr_star_in_document.order">\r
332 <refnamediv>\r
333 <refname>* (in document.order mode)</refname>\r
334 <refpurpose>Create rules to process titlepage elements in document order</refpurpose>\r
335 </refnamediv>\r
336 <refsynopsisdiv>\r
337 <synopsis>&lt;xsl:template match="*" mode="document.order"/&gt;</synopsis>\r
338 </refsynopsisdiv>\r
339 <refsect1><title>Description</title>\r
340 \r
341 <para>This template is called to process all of the children of the\r
342 <literal>t:titlepage-content</literal> element. It creates the hairy\r
343 select expression necessary to process each of those elements in\r
344 the title page.</para>\r
345 \r
346 \r
347 \r
348 <para>Note that this template automatically handles the case where\r
349 some DocBook elements, like title and subtitle, can occur both inside\r
350 the *info elements where metadata is usually stored and outside.\r
351 </para>\r
352 \r
353 \r
354 \r
355 <para>It also automatically calculates the name for the *info container\r
356 and handles elements that have historically had containers with different\r
357 names.</para>\r
358 \r
359 \r
360 </refsect1></refentry>\r
361 \r
362 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="star_in_document.order">\r
363 <refnamediv>\r
364 <refname>* (in document.order mode)</refname>\r
365 <refpurpose>Create rules to process titlepage elements in stylesheet order</refpurpose>\r
366 </refnamediv>\r
367 <refsynopsisdiv>\r
368 <synopsis>&lt;xsl:template match="*" mode="document.order"/&gt;</synopsis>\r
369 </refsynopsisdiv>\r
370 <refsect1><title>Description</title>\r
371 \r
372 <para>This template is called to process all of the children of the\r
373 <literal>t:titlepage-content</literal> element. It creates the set\r
374 of <literal>xsl:apply-templates</literal> elements necessary\r
375 process each of those elements in the title page.</para>\r
376 \r
377 \r
378 \r
379 <para>Note that this template automatically handles the case where\r
380 some DocBook elements, like title and subtitle, can occur both inside\r
381 the *info elements where metadata is usually stored and outside.\r
382 </para>\r
383 \r
384 \r
385 \r
386 <para>It also automatically calculates the name for the *info container\r
387 and handles elements that have historically had containers with different\r
388 names.</para>\r
389 \r
390 \r
391 </refsect1></refentry>\r
392 \r
393 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="star_in_titlepage.specialrules">\r
394 <refnamediv>\r
395 <refname>* (in titlepage.specialrules mode)</refname>\r
396 <refpurpose>Create templates for special rules</refpurpose>\r
397 </refnamediv>\r
398 <refsynopsisdiv>\r
399 <synopsis>&lt;xsl:template match="*" mode="titlepage.specialrules"/&gt;</synopsis>\r
400 </refsynopsisdiv>\r
401 <refsect1><title>Description</title>\r
402 \r
403 <para>This template is called to process all of the descendants of the\r
404 <literal>t:titlepage-content</literal> element that require special\r
405 processing. At present, that's just <literal>t:or</literal> elements.\r
406 </para>\r
407 \r
408 </refsect1></refentry>\r
409 \r
410 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="star_in_titlepage.subrules">\r
411 <refnamediv>\r
412 <refname>* (in titlepage.subrules mode)</refname>\r
413 <refpurpose>Create template for individual special rules</refpurpose>\r
414 </refnamediv>\r
415 <refsynopsisdiv>\r
416 <synopsis>&lt;xsl:template match="*" mode="titlepage.subrules"/&gt;</synopsis>\r
417 </refsynopsisdiv>\r
418 <refsect1><title>Description</title>\r
419 \r
420 <para>This template is called to process the children of special\r
421 template elements.\r
422 </para>\r
423 \r
424 </refsect1></refentry>\r
425 \r
426 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="or">\r
427 <refnamediv>\r
428 <refname>t:or</refname>\r
429 <refpurpose>Process the t:or special rule</refpurpose>\r
430 </refnamediv>\r
431 <refsynopsisdiv>\r
432 <synopsis>&lt;xsl:template match="t:or"/&gt;&lt;xsl:template match="t:or" mode="titlepage.subrules"/&gt;</synopsis>\r
433 </refsynopsisdiv>\r
434 <refsect1><title>Description</title>\r
435 \r
436 <para>This template processes t:or.</para>\r
437 \r
438 </refsect1></refentry>\r
439 \r
440 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="or_in_titlepage.subrules">\r
441 <refnamediv>\r
442 <refname>t:or (in titlepage.subrules mode)</refname>\r
443 <refpurpose>Process the t:or special rule in\r
444 titlepage.subrules mode</refpurpose>\r
445 </refnamediv>\r
446 <refsynopsisdiv>\r
447 <synopsis>&lt;xsl:template match="t:or" mode="titlepage.subrules"/&gt;</synopsis>\r
448 </refsynopsisdiv>\r
449 <refsect1><title>Description</title>\r
450 \r
451 <para>The titlepage.subrules mode doesn't apply to t:or, so just\r
452 reprocess this node in the normal mode.</para>\r
453 \r
454 </refsect1></refentry>\r
455 \r
456 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.element-or-list">\r
457 <refnamediv>\r
458 <refname>element-or-list</refname>\r
459 <refpurpose>Construct the "or-list" used in the select attribute for\r
460 special rules.</refpurpose>\r
461 </refnamediv>\r
462 <refsynopsisdiv>\r
463 <synopsis>&lt;xsl:template name="element-or-list"&gt;\r
464 &lt;xsl:param name="elements" select="*"/&gt;\r
465 &lt;xsl:param name="element.count" select="count($elements)"/&gt;\r
466 &lt;xsl:param name="count" select="1"/&gt;\r
467 &lt;xsl:param name="orlist"/&gt;\r
468   ...\r
469 &lt;/xsl:template&gt;</synopsis>\r
470 </refsynopsisdiv>\r
471 <refsect1><title>Description</title>\r
472 \r
473 <para>Walk through each of the children of t:or, producing the\r
474 text of the select attribute.</para>\r
475 \r
476 </refsect1></refentry>\r
477 </reference>\r
478 \r