~ubuntu-branches/ubuntu/lucid/gnome-doc-utils/lucid

« back to all changes in this revision

Viewing changes to xslt/docbook/common/db-format.xml.in

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-12-19 08:34:21 UTC
  • mto: (2.1.1 etch) (1.1.18 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20051219083421-k72rkh3n6vox1c0t
Tags: upstream-0.5.2
Import upstream version 0.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version='1.0' encoding='utf-8'?><!-- -*- indent-tabs-mode: nil -*- -->
2
 
<xsl:stylesheet version="1.0"
3
 
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4
 
                xmlns:msg="http://www.gnome.org/~shaunm/gnome-doc-utils/xsl-format"
5
 
                xmlns:_msg="http://www.gnome.org/~shaunm/gnome-doc-utils/xsl-format">
6
 
 
7
 
<title xmlns="http://www.gnome.org/~shaunm/xsldoc">Format Templates</title>
8
 
 
9
 
 
10
 
<!-- == format.citetitle =================================================== -->
11
 
 
12
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
13
 
  <name>format.citetitle</name>
14
 
  <purpose>
15
 
    Format a <xmltag>citetitle</xmltag> element
16
 
  </purpose>
17
 
  <parameter>
18
 
    <name>node</name>
19
 
    <purpose>
20
 
      The <sgmltag>citetitle</sgmltag> element to format
21
 
    </purpose>
22
 
  </parameter>
23
 
  <parameter>
24
 
    <name>role</name>
25
 
    <purpose>
26
 
      The role of the label, extracted from the
27
 
      <sgmltag class="attribute">pubwork</sgmltag> attribute
28
 
    </purpose>
29
 
  </parameter>
30
 
  <description>
31
 
    <para>This template used for formatting the <sgmltag>citetitle</sgmltag>
32
 
    element in DocBook.  The <sgmltag>citetitle</sgmltag> element has a
33
 
    <sgmltag class="attribute">pubwork</sgmltag> attribute that can be set
34
 
    to one of the following values:
35
 
    <literal>article</literal>,      <literal>bbs</literal>,
36
 
    <literal>book</literal>,         <literal>cdrom</literal>,
37
 
    <literal>chapter</literal>,      <literal>dvd</literal>,
38
 
    <literal>emailmessage</literal>, <literal>gopher</literal>,
39
 
    <literal>journal</literal>,      <literal>manuscript</literal>,
40
 
    <literal>newsposting</literal>,  <literal>part</literal>,
41
 
    <literal>refentry</literal>,     <literal>section</literal>,
42
 
    <literal>series</literal>,       <literal>set</literal>,
43
 
    <literal>webpage</literal>,      <literal>wiki</literal>.
44
 
    This template allows multiple role format strings, using the value of
45
 
    <sgmltag class="attribute">pubwork</sgmltag> as the role.  Translators
46
 
    can use this to customize the appearance of a cited title based on the
47
 
    type of document being cited.  The default formatting is as follows:</para>
48
 
    <programlisting><![CDATA[
49
 
<msg:msgstr role="article">“%t{node}”</msg:msgstr>
50
 
<msg:msgstr><i>%t{node}</i></msg:msgstr>]]></programlisting>
51
 
    <para>This puts the title of an article citation in quotes.  For all other
52
 
    types of works, the title is simply italicized.</para>
53
 
  </description>
54
 
  <section>
55
 
    <title>Arguments</title>
56
 
    <para>This is a format template constructed by
57
 
    <function role='xsl-template' moreinfo='refentry'>format2xsl</function>.
58
 
    The following arguments are available for translators:</para>
59
 
    <variablelist>
60
 
      <varlistentry>
61
 
        <term><parameter>node</parameter></term>
62
 
        <listitem><para>A template argument which processes the contents of
63
 
        the <sgmltag>citetitle</sgmltag> element.</para></listitem>
64
 
      </varlistentry>
65
 
    </variablelist>
66
 
  </section>
67
 
</template>
68
 
 
69
 
<xsl:template name="format.citetitle">
70
 
  <xsl:param name="node" select="."/>
71
 
  <xsl:param name="role"/>
72
 
  <msg:msg id="format.citetitle">
73
 
    <!--
74
 
    citetitle - The title of a cited work
75
 
    http://docbook.org/tdg/en/html/citetitle.html
76
 
 
77
 
    This template formats an inline title citation.  This template uses
78
 
    roles to specify the type of publication being cited, such as article
79
 
    or book.
80
 
 
81
 
    Read this: ghelp:gnome-doc-xslt#translating
82
 
    Then this: ghelp:gnome-doc-xslt#format.citetitle
83
 
    -->
84
 
    <_msg:msgstr>format.citetitle</_msg:msgstr>
85
 
    <msg:msgstr xml:lang="C">
86
 
      <msg:msgstr role="article">“%t{node}”</msg:msgstr>
87
 
      <msg:msgstr><i>%t{node}</i></msg:msgstr>
88
 
    </msg:msgstr>
89
 
  </msg:msg>
90
 
  <msg:arg name="node">
91
 
    <xsl:apply-templates select="$node/node()"/>
92
 
  </msg:arg>
93
 
</xsl:template>
94
 
 
95
 
 
96
 
<!-- == format.date ======================================================== -->
97
 
<!--
98
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
99
 
  <name>format.date</name>
100
 
  <purpose>
101
 
    Format a date
102
 
  </purpose>
103
 
  <parameter>
104
 
    <node>year</node>
105
 
    <purpose>
106
 
      The year in the Gregorian calendar
107
 
    </purpose>
108
 
  </parameter>
109
 
  <parameter>
110
 
    <name>month</name>
111
 
    <purpose>
112
 
      The number of the month
113
 
    </purpose>
114
 
  </parameter>
115
 
  <parameter>
116
 
    <name>day</name>
117
 
    <purpose>
118
 
      The number of the day in the month
119
 
    </purpose>
120
 
  </parameter>
121
 
</template>
122
 
 
123
 
<xsl:template name="format.date">
124
 
  <xsl:param name="year"/>
125
 
  <xsl:param name="month"/>
126
 
  <xsl:param name="day"/>
127
 
  <msg:msg id="format.date">
128
 
    <_msg:msgstr>format.date</_msg:msgstr>
129
 
    <msg:msgstr xml:lang="C">
130
 
      <xsl:template>
131
 
        <xsl:choose>
132
 
          <xsl:when test="$month =  1"><xsl:text>January </xsl:text></xsl:when>
133
 
          <xsl:when test="$month =  2"><xsl:text>February </xsl:text></xsl:when>
134
 
          <xsl:when test="$month =  3"><xsl:text>March </xsl:text></xsl:when>
135
 
          <xsl:when test="$month =  4"><xsl:text>April </xsl:text></xsl:when>
136
 
          <xsl:when test="$month =  5"><xsl:text>May </xsl:text></xsl:when>
137
 
          <xsl:when test="$month =  6"><xsl:text>June </xsl:text></xsl:when>
138
 
          <xsl:when test="$month =  7"><xsl:text>July </xsl:text></xsl:when>
139
 
          <xsl:when test="$month =  8"><xsl:text>August </xsl:text></xsl:when>
140
 
          <xsl:when test="$month =  9"><xsl:text>September </xsl:text></xsl:when>
141
 
          <xsl:when test="$month = 10"><xsl:text>October </xsl:text></xsl:when>
142
 
          <xsl:when test="$month = 11"><xsl:text>November </xsl:text></xsl:when>
143
 
          <xsl:when test="$month = 12"><xsl:text>December </xsl:text></xsl:when>
144
 
        </xsl:choose>
145
 
        <xsl:value-of select="$day"/>
146
 
        <xsl:text>, </xsl:text>
147
 
        <xsl:value-of select="$year"/>
148
 
      </xsl:template>
149
 
    </msg:msgstr>
150
 
  </msg:msg>
151
 
  <msg:arg name="year">
152
 
    <xsl:value-of select="$year"/>
153
 
  </msg:arg>
154
 
  <msg:arg name="month">
155
 
    <xsl:value-of select="$month"/>
156
 
  </msg:arg>
157
 
  <msg:arg name="day">
158
 
    <xsl:value-of select="$day"/>
159
 
  </msg:arg>
160
 
</xsl:template>
161
 
-->
162
 
 
163
 
 
164
 
<!-- == format.quote.outer ================================================= -->
165
 
 
166
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
167
 
  <name>format.quote.outer</name>
168
 
  <purpose>
169
 
    Format a <xmltag>quote</xmltag> element
170
 
  </purpose>
171
 
  <parameter>
172
 
    <name>node</name>
173
 
    <purpose>
174
 
      The <xmltag>quote</xmltag> element to format
175
 
    </purpose>
176
 
  </parameter>
177
 
  <section>
178
 
    <title>Arguments</title>
179
 
    <para>This is a format template constructed by
180
 
    <function role='xsl-template' moreinfo='refentry'>format2xsl</function>.
181
 
    The following arguments are available for translators:</para>
182
 
    <variablelist>
183
 
      <varlistentry>
184
 
        <term><parameter>node</parameter></term>
185
 
        <listitem><para>A template argument which processes the contents of
186
 
        the <sgmltag>quote</sgmltag> element.</para></listitem>
187
 
      </varlistentry>
188
 
    </variablelist>
189
 
  </section>
190
 
</template>
191
 
 
192
 
<xsl:template name="format.quote.outer">
193
 
  <xsl:param name="node" select="."/>
194
 
  <msg:msg id="format.quote.outer">
195
 
    <!-- 
196
 
    quote - An inline quotation
197
 
    http://docbook.org/tdg/en/html/quote.html
198
 
 
199
 
    This template formats an inline quotation.  The default
200
 
    rendering in the C locale is this: “%t{node}”
201
 
 
202
 
    Read this: ghelp:gnome-doc-xslt#translating
203
 
    Then this: ghelp:gnome-doc-xslt#format.quote.outer
204
 
    -->
205
 
    <_msg:msgstr>format.quote.outer</_msg:msgstr>
206
 
    <msg:msgstr xml:lang="C">“%t{node}”</msg:msgstr>
207
 
  </msg:msg>
208
 
  <msg:arg name="node">
209
 
    <xsl:apply-templates select="$node/node()"/>
210
 
  </msg:arg>
211
 
</xsl:template>
212
 
 
213
 
 
214
 
<!-- == format.quote.inner ================================================= -->
215
 
 
216
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
217
 
  <name>format.quote.inner</name>
218
 
  <purpose>
219
 
    Format a nested <xmltag>quote</xmltag> element
220
 
  </purpose>
221
 
  <parameter>
222
 
    <name>node</name>
223
 
    <purpose>
224
 
      The <xmltag>quote</xmltag> element to format
225
 
    </purpose>
226
 
  </parameter>
227
 
  <section>
228
 
    <title>Arguments</title>
229
 
    <para>This is a format template constructed by
230
 
    <function role='xsl-template' moreinfo='refentry'>format2xsl</function>.
231
 
    The following arguments are available for translators:</para>
232
 
    <variablelist>
233
 
      <varlistentry>
234
 
        <term><parameter>node</parameter></term>
235
 
        <listitem><para>A template argument which processes the contents of
236
 
        the <sgmltag>quote</sgmltag> element.</para></listitem>
237
 
      </varlistentry>
238
 
    </variablelist>
239
 
  </section>
240
 
</template>
241
 
 
242
 
<xsl:template name="format.quote.inner">
243
 
  <xsl:param name="node" select="."/>
244
 
  <msg:msg id="format.quote.inner">
245
 
    <!-- 
246
 
    quote - An inline quotation
247
 
    http://docbook.org/tdg/en/html/quote.html
248
 
 
249
 
    This template formats a nested inline quotation.  The default
250
 
    rendering in the C locale is this: ‘%t{node}’
251
 
 
252
 
    Read this: ghelp:gnome-doc-xslt#translating
253
 
    Then this: ghelp:gnome-doc-xslt#format.quote.inner
254
 
    -->
255
 
    <_msg:msgstr>format.quote.inner</_msg:msgstr>
256
 
    <msg:msgstr xml:lang="C">‘%t{node}’</msg:msgstr>
257
 
  </msg:msg>
258
 
  <msg:arg name="node">
259
 
    <xsl:apply-templates select="$node/node()"/>
260
 
  </msg:arg>
261
 
</xsl:template>
262
 
 
263
 
 
264
 
<!-- == format.appendix.label ============================================== -->
265
 
 
266
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
267
 
  <name>format.appendix.label</name>
268
 
  <purpose>
269
 
    Format the label for a <xmltag>appendix</xmltag> element
270
 
  </purpose>
271
 
  <parameter>
272
 
    <name>node</name>
273
 
    <purpose>
274
 
      The <xmltag>appendix</xmltag> element to format
275
 
    </purpose>
276
 
  </parameter>
277
 
  <parameter>
278
 
    <name>role</name>
279
 
    <purpose>
280
 
      The role of the label
281
 
    </purpose>
282
 
  </parameter>
283
 
  <section>
284
 
    <title>Arguments</title>
285
 
    <para>This is a format template constructed by
286
 
    <function role='xsl-template' moreinfo='refentry'>format2xsl</function>.
287
 
    The following arguments are available for translators:</para>
288
 
    <variablelist>
289
 
      <varlistentry>
290
 
        <term><parameter>number</parameter></term>
291
 
        <listitem><para>A template argument which extracts the number
292
 
        portion of the label.</para></listitem>
293
 
      </varlistentry>
294
 
      <varlistentry>
295
 
        <term><parameter>title</parameter></term>
296
 
        <listitem><para>A template argument which extracts the title
297
 
        of the element.</para></listitem>
298
 
      </varlistentry>
299
 
    </variablelist>
300
 
  </section>
301
 
</template>
302
 
 
303
 
<xsl:template name="format.appendix.label">
304
 
  <xsl:param name="node" select="."/>
305
 
  <xsl:param name="role"/>
306
 
  <msg:msg id="format.appendix.label">
307
 
    <!--
308
 
    appendix - An appendix in a book or article
309
 
    http://docbook.org/tdg/en/html/appendix.html
310
 
 
311
 
    This template formats the label of an appendix.  This tmeplate uses
312
 
    roles to mark different uses of the label.  The standard label roles
313
 
    ('header', 'li', and 'xref') should be defined, as well as any extra
314
 
    roles you would like supported for your locale.
315
 
 
316
 
    A simple rendering might look like this: Appendix %t{number}
317
 
 
318
 
    Read this: ghelp:gnome-doc-xslt#translating
319
 
    Then this: ghelp:gnome-doc-xslt#format.appendix.label
320
 
    -->
321
 
    <_msg:msgstr>format.appendix.label</_msg:msgstr>
322
 
    <msg:msgstr xml:lang="C">
323
 
      <msg:msgstr role="header">%t{number}.&#x2003;</msg:msgstr>
324
 
      <msg:msgstr role="li">%t{number}.&#x2002;</msg:msgstr>
325
 
      <msg:msgstr role="xref">Appendix %t{number} ― %t{title}</msg:msgstr>
326
 
      <msg:msgstr>Appendix %t{number}</msg:msgstr>
327
 
    </msg:msgstr>
328
 
  </msg:msg>
329
 
  <msg:arg name="number">
330
 
    <xsl:call-template name="db.label.number">
331
 
      <xsl:with-param name="node" select="$node"/>
332
 
    </xsl:call-template>
333
 
  </msg:arg>
334
 
  <msg:arg name="title">
335
 
    <xsl:call-template name="db.title">
336
 
      <xsl:with-param name="node" select="$node"/>
337
 
    </xsl:call-template>
338
 
  </msg:arg>
339
 
</xsl:template>
340
 
 
341
 
 
342
 
<!-- == format.chapter.label =============================================== -->
343
 
 
344
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
345
 
  <name>format.chapter.label</name>
346
 
  <purpose>
347
 
    Format the label for a <xmltag>chapter</xmltag> element
348
 
  </purpose>
349
 
  <parameter>
350
 
    <name>node</name>
351
 
    <purpose>
352
 
      The <xmltag>chapter</xmltag> element to format
353
 
    </purpose>
354
 
  </parameter>
355
 
  <parameter>
356
 
    <name>role</name>
357
 
    <purpose>
358
 
      The role of the label
359
 
    </purpose>
360
 
  </parameter>
361
 
  <section>
362
 
    <title>Arguments</title>
363
 
    <para>This is a format template constructed by
364
 
    <function role='xsl-template' moreinfo='refentry'>format2xsl</function>.
365
 
    The following arguments are available for translators:</para>
366
 
    <variablelist>
367
 
      <varlistentry>
368
 
        <term><parameter>number</parameter></term>
369
 
        <listitem><para>A template argument which extracts the number
370
 
        portion of the label.</para></listitem>
371
 
      </varlistentry>
372
 
      <varlistentry>
373
 
        <term><parameter>title</parameter></term>
374
 
        <listitem><para>A template argument which extracts the title
375
 
        of the element.</para></listitem>
376
 
      </varlistentry>
377
 
    </variablelist>
378
 
  </section>
379
 
</template>
380
 
 
381
 
<xsl:template name="format.chapter.label">
382
 
  <xsl:param name="node" select="."/>
383
 
  <xsl:param name="role"/>
384
 
  <msg:msg id="format.chapter.label">
385
 
    <!--
386
 
    chapter - A chapter, as of a book
387
 
    http://docbook.org/tdg/en/html/chapter.html
388
 
 
389
 
    This template formats the label of a chapter.  This tmeplate uses
390
 
    roles to mark different uses of the label.  The standard label roles
391
 
    ('header', 'li', and 'xref') should be defined, as well as any extra
392
 
    roles you would like supported for your locale.
393
 
 
394
 
    A simple rendering might look like this: Chapter %t{number}
395
 
 
396
 
    Read this: ghelp:gnome-doc-xslt#translating
397
 
    Then this: ghelp:gnome-doc-xslt#format.chapter.label
398
 
    -->
399
 
    <_msg:msgstr>format.chapter.label</_msg:msgstr>
400
 
    <msg:msgstr xml:lang="C">
401
 
      <msg:msgstr role="header">%t{number}.&#x2003;</msg:msgstr>
402
 
      <msg:msgstr role="li">%t{number}.&#x2002;</msg:msgstr>
403
 
      <msg:msgstr role="xref">Chapter %t{number} ― %t{title}</msg:msgstr>
404
 
      <msg:msgstr>Chapter %t{number}</msg:msgstr>
405
 
    </msg:msgstr>
406
 
  </msg:msg>
407
 
  <msg:arg name="number">
408
 
    <xsl:call-template name="db.label.number">
409
 
      <xsl:with-param name="node" select="$node"/>
410
 
    </xsl:call-template>
411
 
  </msg:arg>
412
 
  <msg:arg name="title">
413
 
    <xsl:call-template name="db.title">
414
 
      <xsl:with-param name="node" select="$node"/>
415
 
    </xsl:call-template>
416
 
  </msg:arg>
417
 
</xsl:template>
418
 
 
419
 
 
420
 
<!-- == format.example.label =============================================== -->
421
 
 
422
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
423
 
  <name>format.example.label</name>
424
 
  <purpose>
425
 
    Format the label for a <xmltag>example</xmltag> element
426
 
  </purpose>
427
 
  <parameter>
428
 
    <name>node</name>
429
 
    <purpose>
430
 
      The <xmltag>example</xmltag> element to format
431
 
    </purpose>
432
 
  </parameter>
433
 
  <parameter>
434
 
    <name>role</name>
435
 
    <purpose>
436
 
      The role of the label
437
 
    </purpose>
438
 
  </parameter>
439
 
  <section>
440
 
    <title>Arguments</title>
441
 
    <para>This is a format template constructed by
442
 
    <function role='xsl-template' moreinfo='refentry'>format2xsl</function>.
443
 
    The following arguments are available for translators:</para>
444
 
    <variablelist>
445
 
      <varlistentry>
446
 
        <term><parameter>number</parameter></term>
447
 
        <listitem><para>A template argument which extracts the number
448
 
        portion of the label.</para></listitem>
449
 
      </varlistentry>
450
 
      <varlistentry>
451
 
        <term><parameter>title</parameter></term>
452
 
        <listitem><para>A template argument which extracts the title
453
 
        of the element.</para></listitem>
454
 
      </varlistentry>
455
 
    </variablelist>
456
 
  </section>
457
 
</template>
458
 
 
459
 
<xsl:template name="format.example.label">
460
 
  <xsl:param name="node" select="."/>
461
 
  <xsl:param name="role"/>
462
 
  <msg:msg id="format.example.label">
463
 
    <!--
464
 
    example - A formal example, with a title
465
 
    http://docbook.org/tdg/en/html/example.html
466
 
 
467
 
    This template formats the label of an example.  This tmeplate uses
468
 
    roles to mark different uses of the label.  The standard label roles
469
 
    ('header', 'li', and 'xref') should be defined, as well as any extra
470
 
    roles you would like supported for your locale.
471
 
 
472
 
    A simple rendering might look like this: Example %t{number}
473
 
 
474
 
    Read this: ghelp:gnome-doc-xslt#translating
475
 
    Then this: ghelp:gnome-doc-xslt#format.example.label
476
 
    -->
477
 
    <_msg:msgstr>format.example.label</_msg:msgstr>
478
 
    <msg:msgstr xml:lang="C">
479
 
      <msg:msgstr role="header"><i>Example %t{number}</i>&#x2003;</msg:msgstr>
480
 
      <msg:msgstr>Example %t{number}</msg:msgstr>
481
 
    </msg:msgstr>
482
 
  </msg:msg>
483
 
  <msg:arg name="number">
484
 
    <xsl:call-template name="db.label.number">
485
 
      <xsl:with-param name="node" select="$node"/>
486
 
    </xsl:call-template>
487
 
  </msg:arg>
488
 
  <msg:arg name="title">
489
 
    <xsl:call-template name="db.title">
490
 
      <xsl:with-param name="node" select="$node"/>
491
 
    </xsl:call-template>
492
 
  </msg:arg>
493
 
</xsl:template>
494
 
 
495
 
 
496
 
<!-- == format.figure.label ================================================ -->
497
 
 
498
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
499
 
  <name>format.figure.label</name>
500
 
  <purpose>
501
 
    Format the label for a <xmltag>figure</xmltag> element
502
 
  </purpose>
503
 
  <parameter>
504
 
    <name>node</name>
505
 
    <purpose>
506
 
      The <xmltag>figure</xmltag> element to format
507
 
    </purpose>
508
 
  </parameter>
509
 
  <parameter>
510
 
    <name>role</name>
511
 
    <purpose>
512
 
      The role of the label
513
 
    </purpose>
514
 
  </parameter>
515
 
  <section>
516
 
    <title>Arguments</title>
517
 
    <para>This is a format template constructed by
518
 
    <function role='xsl-template' moreinfo='refentry'>format2xsl</function>.
519
 
    The following arguments are available for translators:</para>
520
 
    <variablelist>
521
 
      <varlistentry>
522
 
        <term><parameter>number</parameter></term>
523
 
        <listitem><para>A template argument which extracts the number
524
 
        portion of the label.</para></listitem>
525
 
      </varlistentry>
526
 
      <varlistentry>
527
 
        <term><parameter>title</parameter></term>
528
 
        <listitem><para>A template argument which extracts the title
529
 
        of the element.</para></listitem>
530
 
      </varlistentry>
531
 
    </variablelist>
532
 
  </section>
533
 
</template>
534
 
 
535
 
<xsl:template name="format.figure.label">
536
 
  <xsl:param name="node" select="."/>
537
 
  <xsl:param name="role"/>
538
 
  <msg:msg id="format.figure.label">
539
 
    <!--
540
 
    figure - A formal figure, generally an illustration, with a title
541
 
    http://docbook.org/tdg/en/html/figure.html
542
 
 
543
 
    This template formats the label of a figure.  This tmeplate uses
544
 
    roles to mark different uses of the label.  The standard label roles
545
 
    ('header', 'li', and 'xref') should be defined, as well as any extra
546
 
    roles you would like supported for your locale.
547
 
 
548
 
    A simple rendering might look like this: Figure %t{number}
549
 
 
550
 
    Read this: ghelp:gnome-doc-xslt#translating
551
 
    Then this: ghelp:gnome-doc-xslt#format.figure.label
552
 
    -->
553
 
    <_msg:msgstr>format.figure.label</_msg:msgstr>
554
 
    <msg:msgstr xml:lang="C">
555
 
      <msg:msgstr role="header"><i>Figure %t{number}</i>&#x2003;</msg:msgstr>
556
 
      <msg:msgstr>Figure %t{number}</msg:msgstr>
557
 
    </msg:msgstr>
558
 
  </msg:msg>
559
 
  <msg:arg name="number">
560
 
    <xsl:call-template name="db.label.number">
561
 
      <xsl:with-param name="node" select="$node"/>
562
 
    </xsl:call-template>
563
 
  </msg:arg>
564
 
  <msg:arg name="title">
565
 
    <xsl:call-template name="db.title">
566
 
      <xsl:with-param name="node" select="$node"/>
567
 
    </xsl:call-template>
568
 
  </msg:arg>
569
 
</xsl:template>
570
 
 
571
 
 
572
 
<!-- == format.manvolnum =================================================== -->
573
 
 
574
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
575
 
  <name>format.manvolnum</name>
576
 
  <purpose>
577
 
    Format a <xmltag>manvolnum</xmltag> element
578
 
  </purpose>
579
 
  <parameter>
580
 
    <name>node</name>
581
 
    <purpose>
582
 
      The <xmltag>manvolnum</xmltag> element to format
583
 
    </purpose>
584
 
  </parameter>
585
 
</template>
586
 
 
587
 
<xsl:template name="format.manvolnum">
588
 
  <xsl:param name="node" select="."/>
589
 
  <msg:msg id="format.manvolnum">
590
 
    <!--
591
 
    manvolnum - A reference volume number
592
 
    http://docbook.org/tdg/en/html/manvolnum.html
593
 
 
594
 
    This template formats the manvolnum element.  A manvolnum is typically
595
 
    a number or short string used to identify a sectionof man pages.  It
596
 
    is typically placed inside parenthesis, like so: (%t{node})
597
 
 
598
 
    Read this: ghelp:gnome-doc-xslt#translating
599
 
    Then this: ghelp:gnome-doc-xslt#format.manvolnum
600
 
    -->
601
 
    <_msg:msgstr>format.manvolnum</_msg:msgstr>
602
 
    <msg:msgstr xml:lang="C">(%t{node})</msg:msgstr>
603
 
  </msg:msg>
604
 
  <msg:arg name="node">
605
 
    <xsl:apply-templates select="$node/node()"/>
606
 
  </msg:arg>
607
 
</xsl:template>
608
 
 
609
 
 
610
 
<!-- == format.part.label ================================================== -->
611
 
 
612
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
613
 
  <name>format.part.label</name>
614
 
  <purpose>
615
 
    Format the label for a <xmltag>part</xmltag> element
616
 
  </purpose>
617
 
  <parameter>
618
 
    <name>node</name>
619
 
    <purpose>
620
 
      The <xmltag>part</xmltag> element to format
621
 
    </purpose>
622
 
  </parameter>
623
 
  <parameter>
624
 
    <name>role</name>
625
 
    <purpose>
626
 
      The role of the label
627
 
    </purpose>
628
 
  </parameter>
629
 
  <section>
630
 
    <title>Arguments</title>
631
 
    <para>This is a format template constructed by
632
 
    <function role='xsl-template' moreinfo='refentry'>format2xsl</function>.
633
 
    The following arguments are available for translators:</para>
634
 
    <variablelist>
635
 
      <varlistentry>
636
 
        <term><parameter>number</parameter></term>
637
 
        <listitem><para>A template argument which extracts the number
638
 
        portion of the label.</para></listitem>
639
 
      </varlistentry>
640
 
      <varlistentry>
641
 
        <term><parameter>title</parameter></term>
642
 
        <listitem><para>A template argument which extracts the title
643
 
        of the element.</para></listitem>
644
 
      </varlistentry>
645
 
    </variablelist>
646
 
  </section>
647
 
</template>
648
 
 
649
 
<xsl:template name="format.part.label">
650
 
  <xsl:param name="node" select="."/>
651
 
  <xsl:param name="role"/>
652
 
  <msg:msg id="format.chapter.label">
653
 
    <!--
654
 
    part - A division in a book
655
 
    http://docbook.org/tdg/en/html/part.html
656
 
 
657
 
    This template formats the label of a part.  This tmeplate uses
658
 
    roles to mark different uses of the label.  The standard label roles
659
 
    ('header', 'li', and 'xref') should be defined, as well as any extra
660
 
    roles you would like supported for your locale.
661
 
 
662
 
    A simple rendering might look like this: Part %t{number}
663
 
 
664
 
    Read this: ghelp:gnome-doc-xslt#translating
665
 
    Then this: ghelp:gnome-doc-xslt#format.part.label
666
 
    -->
667
 
    <_msg:msgstr>format.part.label</_msg:msgstr>
668
 
    <msg:msgstr xml:lang="C">
669
 
      <msg:msgstr role="header">%t{number}.&#x2003;</msg:msgstr>
670
 
      <msg:msgstr role="li">%t{number}.&#x2002;</msg:msgstr>
671
 
      <msg:msgstr role="xref">Part %t{number} ― %t{title}</msg:msgstr>
672
 
      <msg:msgstr>Part %t{number}</msg:msgstr>
673
 
    </msg:msgstr>
674
 
  </msg:msg>
675
 
  <msg:arg name="number">
676
 
    <xsl:call-template name="db.label.number">
677
 
      <xsl:with-param name="node" select="$node"/>
678
 
    </xsl:call-template>
679
 
  </msg:arg>
680
 
  <msg:arg name="title">
681
 
    <xsl:call-template name="db.title">
682
 
      <xsl:with-param name="node" select="$node"/>
683
 
    </xsl:call-template>
684
 
  </msg:arg>
685
 
</xsl:template>
686
 
 
687
 
 
688
 
<!-- == format.refentry.label ============================================== -->
689
 
 
690
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
691
 
  <name>format.refentry.label</name>
692
 
  <purpose>
693
 
    Format the label for a <xmltag>refentry</xmltag> element
694
 
  </purpose>
695
 
  <parameter>
696
 
    <name>node</name>
697
 
    <purpose>
698
 
      The <xmltag>refentry</xmltag> element to format
699
 
    </purpose>
700
 
  </parameter>
701
 
  <parameter>
702
 
    <name>role</name>
703
 
    <purpose>
704
 
      The role of the label
705
 
    </purpose>
706
 
  </parameter>
707
 
  <section>
708
 
    <title>Arguments</title>
709
 
    <para>This is a format template constructed by
710
 
    <function role='xsl-template' moreinfo='refentry'>format2xsl</function>.
711
 
    The following arguments are available for translators:</para>
712
 
    <variablelist>
713
 
      <varlistentry>
714
 
        <term><parameter>title</parameter></term>
715
 
        <listitem><para>A template argument which extracts the title
716
 
        of the element.</para></listitem>
717
 
      </varlistentry>
718
 
    </variablelist>
719
 
  </section>
720
 
</template>
721
 
 
722
 
<xsl:template name="format.refentry.label">
723
 
  <xsl:param name="node" select="."/>
724
 
  <xsl:param name="role"/>
725
 
  <msg:msg id="format.refentry.label">
726
 
    <!--
727
 
    refentry - A reference page (originally a UNIX man-style reference page)
728
 
    http://docbook.org/tdg/en/html/refentry.html
729
 
 
730
 
    This template formats the label of a refentry.  This tmeplate uses
731
 
    roles to mark different uses of the label.  The standard label roles
732
 
    ('header', 'li', and 'xref') should be defined, as well as any extra
733
 
    roles you would like supported for your locale.
734
 
 
735
 
    A simple rendering might look like this: %t{title}
736
 
 
737
 
    Note that unlike most other labelled elements, refentry is not numbered
738
 
    by the stylesheets.  Consequently, the number argument is not supported.
739
 
 
740
 
    Read this: ghelp:gnome-doc-xslt#translating
741
 
    Then this: ghelp:gnome-doc-xslt#format.refentry.label
742
 
    -->
743
 
    <_msg:msgstr>format.refentry.label</_msg:msgstr>
744
 
    <msg:msgstr xml:lang="C">
745
 
      <msg:msgstr role="xref">%t{title}</msg:msgstr>
746
 
      <msg:msgstr>%t{title}</msg:msgstr>
747
 
    </msg:msgstr>
748
 
  </msg:msg>
749
 
  <msg:arg name="title">
750
 
    <xsl:call-template name="db.title">
751
 
      <xsl:with-param name="node" select="$node"/>
752
 
    </xsl:call-template>
753
 
  </msg:arg>
754
 
</xsl:template>
755
 
 
756
 
 
757
 
<!-- == format.section.label =============================================== -->
758
 
 
759
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
760
 
  <name>format.section.label</name>
761
 
  <purpose>
762
 
    Format the label for a <xmltag>section</xmltag> element
763
 
  </purpose>
764
 
  <parameter>
765
 
    <name>node</name>
766
 
    <purpose>
767
 
      The <xmltag>section</xmltag> element to format
768
 
    </purpose>
769
 
  </parameter>
770
 
  <parameter>
771
 
    <name>role</name>
772
 
    <purpose>
773
 
      The role of the label
774
 
    </purpose>
775
 
  </parameter>
776
 
  <section>
777
 
    <title>Arguments</title>
778
 
    <para>This is a format template constructed by
779
 
    <function role='xsl-template' moreinfo='refentry'>format2xsl</function>.
780
 
    The following arguments are available for translators:</para>
781
 
    <variablelist>
782
 
      <varlistentry>
783
 
        <term><parameter>number</parameter></term>
784
 
        <listitem><para>A template argument which extracts the number
785
 
        portion of the label.</para></listitem>
786
 
      </varlistentry>
787
 
      <varlistentry>
788
 
        <term><parameter>title</parameter></term>
789
 
        <listitem><para>A template argument which extracts the title
790
 
        of the element.</para></listitem>
791
 
      </varlistentry>
792
 
    </variablelist>
793
 
  </section>
794
 
</template>
795
 
 
796
 
<xsl:template name="format.section.label">
797
 
  <xsl:param name="node" select="."/>
798
 
  <xsl:param name="role"/>
799
 
  <msg:msg id="format.section.label">
800
 
    <!--
801
 
    http://docbook.org/tdg/en/html/section.html
802
 
    http://docbook.org/tdg/en/html/sect1.html
803
 
    http://docbook.org/tdg/en/html/sect2.html
804
 
    http://docbook.org/tdg/en/html/sect3.html
805
 
    http://docbook.org/tdg/en/html/sect4.html
806
 
    http://docbook.org/tdg/en/html/sect5.html
807
 
    http://docbook.org/tdg/en/html/refsection.html
808
 
    http://docbook.org/tdg/en/html/refsect1.html
809
 
    http://docbook.org/tdg/en/html/refsect2.html
810
 
    http://docbook.org/tdg/en/html/refsect3.html
811
 
 
812
 
    This template formats the label of a section.  This tmeplate uses
813
 
    roles to mark different uses of the label.  The standard label roles
814
 
    ('header', 'li', and 'xref') should be defined, as well as any extra
815
 
    roles you would like supported for your locale.
816
 
 
817
 
    A simple rendering might look like this: Section %t{number}
818
 
 
819
 
    Read this: ghelp:gnome-doc-xslt#translating
820
 
    Then this: ghelp:gnome-doc-xslt#format.section.label
821
 
    -->
822
 
    <_msg:msgstr>format.section.label</_msg:msgstr>
823
 
    <msg:msgstr xml:lang="C">
824
 
      <msg:msgstr role="header">%t{number}.&#x2003;</msg:msgstr>
825
 
      <msg:msgstr role="li">%t{number}.&#x2002;</msg:msgstr>
826
 
      <msg:msgstr role="xref">Section %t{number} ― %t{title}</msg:msgstr>
827
 
      <msg:msgstr>Section %t{number}</msg:msgstr>
828
 
    </msg:msgstr>
829
 
  </msg:msg>
830
 
  <msg:arg name="number">
831
 
    <xsl:call-template name="db.label.number">
832
 
      <xsl:with-param name="node" select="$node"/>
833
 
    </xsl:call-template>
834
 
  </msg:arg>
835
 
  <msg:arg name="title">
836
 
    <xsl:call-template name="db.title">
837
 
      <xsl:with-param name="node" select="$node"/>
838
 
    </xsl:call-template>
839
 
  </msg:arg>
840
 
</xsl:template>
841
 
 
842
 
 
843
 
<!-- == format.table.label ================================================= -->
844
 
 
845
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
846
 
  <name>format.table.label</name>
847
 
  <purpose>
848
 
    Format the label for a <xmltag>table</xmltag> element
849
 
  </purpose>
850
 
  <parameter>
851
 
    <name>node</name>
852
 
    <purpose>
853
 
      The <xmltag>table</xmltag> element to format
854
 
    </purpose>
855
 
  </parameter>
856
 
  <parameter>
857
 
    <name>role</name>
858
 
    <purpose>
859
 
      The role of the label
860
 
    </purpose>
861
 
  </parameter>
862
 
  <section>
863
 
    <title>Arguments</title>
864
 
    <para>This is a format template constructed by
865
 
    <function role='xsl-template' moreinfo='refentry'>format2xsl</function>.
866
 
    The following arguments are available for translators:</para>
867
 
    <variablelist>
868
 
      <varlistentry>
869
 
        <term><parameter>number</parameter></term>
870
 
        <listitem><para>A template argument which extracts the number
871
 
        portion of the label.</para></listitem>
872
 
      </varlistentry>
873
 
      <varlistentry>
874
 
        <term><parameter>title</parameter></term>
875
 
        <listitem><para>A template argument which extracts the title
876
 
        of the element.</para></listitem>
877
 
      </varlistentry>
878
 
    </variablelist>
879
 
  </section>
880
 
</template>
881
 
 
882
 
<xsl:template name="format.table.label">
883
 
  <xsl:param name="node" select="."/>
884
 
  <xsl:param name="role"/>
885
 
  <msg:msg id="format.table.label">
886
 
    <!--
887
 
    table - A formal table in a document
888
 
    http://docbook.org/tdg/en/html/table.html
889
 
 
890
 
    This template formats the label of a table.  This tmeplate uses
891
 
    roles to mark different uses of the label.  The standard label roles
892
 
    ('header', 'li', and 'xref') should be defined, as well as any extra
893
 
    roles you would like supported for your locale.
894
 
 
895
 
    A simple rendering might look like this: Table %t{number}
896
 
 
897
 
    Read this: ghelp:gnome-doc-xslt#translating
898
 
    Then this: ghelp:gnome-doc-xslt#format.table.label
899
 
    -->
900
 
    <_msg:msgstr>format.table.label</_msg:msgstr>
901
 
    <msg:msgstr xml:lang="C">
902
 
      <msg:msgstr role="header"><i>Table %t{number}</i>&#x2003;</msg:msgstr>
903
 
      <msg:msgstr>Table %t{number}</msg:msgstr>
904
 
    </msg:msgstr>
905
 
  </msg:msg>
906
 
  <msg:arg name="number">
907
 
    <xsl:call-template name="db.label.number">
908
 
      <xsl:with-param name="node" select="$node"/>
909
 
    </xsl:call-template>
910
 
  </msg:arg>
911
 
  <msg:arg name="title">
912
 
    <xsl:call-template name="db.title">
913
 
      <xsl:with-param name="node" select="$node"/>
914
 
    </xsl:call-template>
915
 
  </msg:arg>
916
 
</xsl:template>
917
 
 
918
 
 
919
 
<!-- == format.example.number ============================================== -->
920
 
 
921
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
922
 
  <name>format.example.number</name>
923
 
  <purpose>
924
 
    Format the number for a <xmltag>example</xmltag> element
925
 
  </purpose>
926
 
  <parameter>
927
 
    <name>node</name>
928
 
    <purpose>
929
 
      The element for which to generate a number
930
 
    </purpose>
931
 
  </parameter>
932
 
</template>
933
 
 
934
 
<xsl:template name="format.example.number">
935
 
  <xsl:param name="node" select="."/>
936
 
  <msg:msg id="format.example.number">
937
 
    <!--
938
 
    example - A formal example, with a title
939
 
    http://docbook.org/tdg/en/html/example.html
940
 
 
941
 
    This template formats the number portion of the label for an example.
942
 
    The parent argument calls the number formatter for the enclosing
943
 
    chapter, and the number argument formats the number of the element
944
 
    itself.
945
 
 
946
 
    A simple rendering might look like this: %t{parent}-%1{number}
947
 
 
948
 
    Read this: ghelp:gnome-doc-xslt#translating
949
 
    Then this: ghelp:gnome-doc-xslt#format.example.number
950
 
    -->
951
 
    <_msg:msgstr>format.example.number</_msg:msgstr>
952
 
    <msg:msgstr xml:lang="C">%t{parent}-%1{number}</msg:msgstr>
953
 
  </msg:msg>
954
 
  <msg:arg name="parent">
955
 
    <xsl:call-template name="db.label.number">
956
 
      <xsl:with-param name="node" select="
957
 
                      $node/ancestor::appendix |
958
 
                      $node/ancestor::chapter  "/>
959
 
    </xsl:call-template>
960
 
  </msg:arg>
961
 
  <msg:arg name="number">
962
 
    <xsl:number level="any" count="example" from="chapter | appendix"/>
963
 
  </msg:arg>
964
 
</xsl:template>
965
 
 
966
 
 
967
 
<!-- == format.example.number.flat ========================================= -->
968
 
 
969
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
970
 
  <name>format.example.number.flat</name>
971
 
  <purpose>
972
 
    Format the number for a <xmltag>example</xmltag> element in a flat document
973
 
  </purpose>
974
 
  <parameter>
975
 
    <name>node</name>
976
 
    <purpose>
977
 
      The element for which to generate a number
978
 
    </purpose>
979
 
  </parameter>
980
 
</template>
981
 
 
982
 
<xsl:template name="format.example.number.flat">
983
 
  <xsl:param name="node" select="."/>
984
 
  <msg:msg id="format.example.number.flat">
985
 
    <!--
986
 
    example - A formal example, with a title
987
 
    http://docbook.org/tdg/en/html/example.html
988
 
 
989
 
    This template formats the number portion of the label for an example
990
 
    inside an article.  In articles, formal block elements use a flat
991
 
    numbering scheme, rather than being numbered by chapter.
992
 
 
993
 
    A simple rendering might look like this: %1{number}
994
 
 
995
 
    Read this: ghelp:gnome-doc-xslt#translating
996
 
    Then this: ghelp:gnome-doc-xslt#format.example.number.flat
997
 
    -->
998
 
    <_msg:msgstr>format.example.number.flat</_msg:msgstr>
999
 
    <msg:msgstr xml:lang="C">%1{number}</msg:msgstr>
1000
 
  </msg:msg>
1001
 
  <msg:arg name="number">
1002
 
    <xsl:number level="any" count="example" from="chapter | appendix"/>
1003
 
  </msg:arg>
1004
 
</xsl:template>
1005
 
 
1006
 
 
1007
 
<!-- == format.figure.number =============================================== -->
1008
 
 
1009
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
1010
 
  <name>format.figure.number</name>
1011
 
  <purpose>
1012
 
    Format the number for a <xmltag>figure</xmltag> element
1013
 
  </purpose>
1014
 
  <parameter>
1015
 
    <name>node</name>
1016
 
    <purpose>
1017
 
      The element for which to generate a number
1018
 
    </purpose>
1019
 
  </parameter>
1020
 
</template>
1021
 
 
1022
 
<xsl:template name="format.figure.number">
1023
 
  <xsl:param name="node" select="."/>
1024
 
  <msg:msg id="format.figure.number">
1025
 
    <!--
1026
 
    figure - A formal figure, generally an illustration, with a title
1027
 
    http://docbook.org/tdg/en/html/figure.html
1028
 
 
1029
 
    This template formats the number portion of the label for a figure.
1030
 
    The parent argument calls the number formatter for the enclosing
1031
 
    chapter, and the number argument formats the number of the element
1032
 
    itself.
1033
 
 
1034
 
    A simple rendering might look like this: %t{parent}-%1{number}
1035
 
 
1036
 
    Read this: ghelp:gnome-doc-xslt#translating
1037
 
    Then this: ghelp:gnome-doc-xslt#format.figure.number
1038
 
    -->
1039
 
    <_msg:msgstr>format.figure.number</_msg:msgstr>
1040
 
    <msg:msgstr xml:lang="C">%t{parent}-%1{number}</msg:msgstr>
1041
 
  </msg:msg>
1042
 
  <msg:arg name="parent">
1043
 
    <xsl:call-template name="db.label.number">
1044
 
      <xsl:with-param name="node" select="
1045
 
                      $node/ancestor::appendix |
1046
 
                      $node/ancestor::chapter  "/>
1047
 
    </xsl:call-template>
1048
 
  </msg:arg>
1049
 
  <msg:arg name="number">
1050
 
    <xsl:number level="any" count="figure" from="chapter | appendix"/>
1051
 
  </msg:arg>
1052
 
</xsl:template>
1053
 
 
1054
 
 
1055
 
<!-- == format.figure.number.flat ========================================== -->
1056
 
 
1057
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
1058
 
  <name>format.figure.number.flat</name>
1059
 
  <purpose>
1060
 
    Format the number for a <xmltag>figure</xmltag> element in a flat document
1061
 
  </purpose>
1062
 
  <parameter>
1063
 
    <name>node</name>
1064
 
    <purpose>
1065
 
      The element for which to generate a number
1066
 
    </purpose>
1067
 
  </parameter>
1068
 
</template>
1069
 
 
1070
 
<xsl:template name="format.figure.number.flat">
1071
 
  <xsl:param name="node" select="."/>
1072
 
  <msg:msg id="format.figure.number.flat">
1073
 
    <!--
1074
 
    figure - A formal figure, generally an illustration, with a title
1075
 
    http://docbook.org/tdg/en/html/figure.html
1076
 
 
1077
 
    This template formats the number portion of the label for a figure
1078
 
    inside an article.  In articles, formal block elements use a flat
1079
 
    numbering scheme, rather than being numbered by chapter.
1080
 
 
1081
 
    A simple rendering might look like this: %1{number}
1082
 
 
1083
 
    Read this: ghelp:gnome-doc-xslt#translating
1084
 
    Then this: ghelp:gnome-doc-xslt#format.figure.number.flat
1085
 
    -->
1086
 
    <_msg:msgstr>format.figure.number.flat</_msg:msgstr>
1087
 
    <msg:msgstr xml:lang="C">%1{number}</msg:msgstr>
1088
 
  </msg:msg>
1089
 
  <msg:arg name="number">
1090
 
    <xsl:number level="any" count="figure" from="chapter | appendix"/>
1091
 
  </msg:arg>
1092
 
</xsl:template>
1093
 
 
1094
 
 
1095
 
<!-- == format.part.number ================================================= -->
1096
 
 
1097
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
1098
 
  <name>format.part.number</name>
1099
 
  <purpose>
1100
 
    Format the number for a <xmltag>part</xmltag> element
1101
 
  </purpose>
1102
 
  <parameter>
1103
 
    <name>node</name>
1104
 
    <purpose>
1105
 
      The element for which to generate a number
1106
 
    </purpose>
1107
 
  </parameter>
1108
 
</template>
1109
 
 
1110
 
<xsl:template name="format.part.number">
1111
 
  <xsl:param name="node" select="."/>
1112
 
  <msg:msg id="format.part.number">
1113
 
    <!--
1114
 
    part - A division in a book
1115
 
    http://docbook.org/tdg/en/html/part.html
1116
 
 
1117
 
    This template formats the number portion of the label for a part.
1118
 
    A simple rendering might look like this: %I{number}
1119
 
 
1120
 
    Read this: ghelp:gnome-doc-xslt#translating
1121
 
    Then this: ghelp:gnome-doc-xslt#format.part.number
1122
 
    -->
1123
 
    <_msg:msgstr>format.part.number</_msg:msgstr>
1124
 
    <msg:msgstr xml:lang="C">%I{number}</msg:msgstr>
1125
 
  </msg:msg>
1126
 
  <msg:arg name="number">
1127
 
    <xsl:number value="count($node/preceding-sibling::part) + 1"/>
1128
 
  </msg:arg>
1129
 
</xsl:template>
1130
 
 
1131
 
 
1132
 
<!-- == format.table.number ================================================ -->
1133
 
 
1134
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
1135
 
  <name>format.table.number</name>
1136
 
  <purpose>
1137
 
    Format the number for a <xmltag>table</xmltag> element
1138
 
  </purpose>
1139
 
  <parameter>
1140
 
    <name>node</name>
1141
 
    <purpose>
1142
 
      The element for which to generate a number
1143
 
    </purpose>
1144
 
  </parameter>
1145
 
</template>
1146
 
 
1147
 
<xsl:template name="format.table.number">
1148
 
  <xsl:param name="node" select="."/>
1149
 
  <msg:msg id="format.table.number">
1150
 
    <!--
1151
 
    table - A formal table in a document
1152
 
    http://docbook.org/tdg/en/html/table.html
1153
 
 
1154
 
    This template formats the number portion of the label for a table.
1155
 
    The parent argument calls the number formatter for the enclosing
1156
 
    chapter, and the number argument formats the number of the element
1157
 
    itself.
1158
 
 
1159
 
    A simple rendering might look like this: %t{parent}-%1{number}
1160
 
 
1161
 
    Read this: ghelp:gnome-doc-xslt#translating
1162
 
    Then this: ghelp:gnome-doc-xslt#format.table.number
1163
 
    -->
1164
 
    <_msg:msgstr>format.table.number</_msg:msgstr>
1165
 
    <msg:msgstr xml:lang="C">%t{parent}-%1{number}</msg:msgstr>
1166
 
  </msg:msg>
1167
 
  <msg:arg name="parent">
1168
 
    <xsl:call-template name="db.label.number">
1169
 
      <xsl:with-param name="node" select="
1170
 
                      $node/ancestor::appendix |
1171
 
                      $node/ancestor::chapter  "/>
1172
 
    </xsl:call-template>
1173
 
  </msg:arg>
1174
 
  <msg:arg name="number">
1175
 
    <xsl:number level="any" count="table" from="chapter | appendix"/>
1176
 
  </msg:arg>
1177
 
</xsl:template>
1178
 
 
1179
 
 
1180
 
<!-- == format.table.number.flat =========================================== -->
1181
 
 
1182
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
1183
 
  <name>format.table.number.flat</name>
1184
 
  <purpose>
1185
 
    Format the number for a <xmltag>table</xmltag> element in a flat document
1186
 
  </purpose>
1187
 
  <parameter>
1188
 
    <name>node</name>
1189
 
    <purpose>
1190
 
      The element for which to generate a number
1191
 
    </purpose>
1192
 
  </parameter>
1193
 
</template>
1194
 
 
1195
 
<xsl:template name="format.table.number.flat">
1196
 
  <xsl:param name="node" select="."/>
1197
 
  <msg:msg id="format.table.number.flat">
1198
 
    <!--
1199
 
    table - A formal table in a document
1200
 
    http://docbook.org/tdg/en/html/table.html
1201
 
 
1202
 
    This template formats the number portion of the label for a table
1203
 
    inside an article.  In articles, formal block elements use a flat
1204
 
    numbering scheme, rather than being numbered by chapter.
1205
 
 
1206
 
    A simple rendering might look like this: %1{number}
1207
 
 
1208
 
    Read this: ghelp:gnome-doc-xslt#translating
1209
 
    Then this: ghelp:gnome-doc-xslt#format.table.number.flat
1210
 
    -->
1211
 
    <_msg:msgstr>format.table.number.flat</_msg:msgstr>
1212
 
    <msg:msgstr xml:lang="C">%1{number}</msg:msgstr>
1213
 
  </msg:msg>
1214
 
  <msg:arg name="number">
1215
 
    <xsl:number level="any" count="table" from="chapter | appendix"/>
1216
 
  </msg:arg>
1217
 
</xsl:template>
1218
 
 
1219
 
 
1220
 
<!-- == format.tooltip.glossentry ========================================== -->
1221
 
 
1222
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
1223
 
  <name>format.tooltip.glossentry</name>
1224
 
  <purpose>
1225
 
    Format the tooltip for a link to a <xmltag>glossentry</xmltag>
1226
 
  </purpose>
1227
 
  <parameter>
1228
 
    <name>node</name>
1229
 
    <purpose>
1230
 
      The <xmltag>glossentry</xmltag> element
1231
 
    </purpose>
1232
 
  </parameter>
1233
 
</template>
1234
 
 
1235
 
<xsl:template name="format.tooltip.glossentry">
1236
 
  <xsl:param name="node" select="."/>
1237
 
  <msg:msg id="format.tooltip.glossentry">
1238
 
    <!--
1239
 
    glossentry - An entry in a glossary or glosslist
1240
 
    http://docbook.org/tdg/en/html/glossentry.html
1241
 
 
1242
 
    This template formats a tooltip for links to glossentry elements.
1243
 
    The default rendering is: Read the definition for ‘%s{node}’
1244
 
 
1245
 
    Read this: ghelp:gnome-doc-xslt#translating
1246
 
    Then this: ghelp:gnome-doc-xslt#format.tooltip.glossentry
1247
 
    -->
1248
 
    <_msg:msgstr>format.tooltip.glossentry</_msg:msgstr>
1249
 
    <msg:msgstr xml:lang="C">Read the definition for ‘%s{node}’</msg:msgstr>
1250
 
  </msg:msg>
1251
 
  <msg:arg name="node">
1252
 
    <xsl:value-of select="normalize-space($node/glossterm)"/>
1253
 
  </msg:arg>
1254
 
</xsl:template>
1255
 
 
1256
 
 
1257
 
<!-- == format.tooltip.mailto ============================================== -->
1258
 
 
1259
 
<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
1260
 
  <name>format.tooltip.mailto</name>
1261
 
  <purpose>
1262
 
    Format the tooltip for a link to a
1263
 
    <systemitem role="protocol">mailto</systemitem> URI.
1264
 
  </purpose>
1265
 
  <parameter>
1266
 
    <name>node</name>
1267
 
    <purpose>
1268
 
      The source node
1269
 
    </purpose>
1270
 
  </parameter>
1271
 
  <parameter>
1272
 
    <name>address</name>
1273
 
    <purpose>
1274
 
      The email address
1275
 
    </purpose>
1276
 
  </parameter>
1277
 
</template>
1278
 
 
1279
 
<xsl:template name="format.tooltip.mailto">
1280
 
  <xsl:param name="node"/>
1281
 
  <xsl:param name="address"/>
1282
 
  <msg:msg id="format.tooltip.mailto">
1283
 
    <!--
1284
 
    This template formats a tooltip for mailto: links.
1285
 
    The default rendering is: Send email to ‘%s{address}’
1286
 
 
1287
 
    Read this: ghelp:gnome-doc-xslt#translating
1288
 
    Then this: ghelp:gnome-doc-xslt#format.tooltip.mailto
1289
 
    -->
1290
 
    <_msg:msgstr>format.tooltip.mailto</_msg:msgstr>
1291
 
    <msg:msgstr xml:lang="C">Send email to ‘%s{address}’</msg:msgstr>
1292
 
  </msg:msg>
1293
 
  <msg:arg name="address">
1294
 
    <xsl:value-of select="normalize-space($address)"/>
1295
 
  </msg:arg>
1296
 
</xsl:template>
1297
 
 
1298
 
</xsl:stylesheet>