]> git.stg.codes - stg.git/blob - doc/xslt/fo/refentry.xsl
Set output encoding to utf-8.
[stg.git] / doc / xslt / fo / refentry.xsl
1 <?xml version='1.0'?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
4                 xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
5                 version='1.0'>
6
7 <!-- ********************************************************************
8      $Id: refentry.xsl 8598 2010-03-20 09:59:03Z mzjn $
9      ********************************************************************
10
11      This file is part of the XSL DocBook Stylesheet distribution.
12      See ../README or http://docbook.sf.net/release/xsl/current/ for
13      copyright and other information.
14
15      ******************************************************************** -->
16
17 <!-- ==================================================================== -->
18
19 <xsl:template match="reference">
20    <xsl:if test="not(partintro)">
21     <xsl:variable name="id">
22       <xsl:call-template name="object.id"/>
23     </xsl:variable>
24     <xsl:variable name="master-reference">
25       <xsl:call-template name="select.pagemaster"/>
26     </xsl:variable>
27
28     <fo:page-sequence hyphenate="{$hyphenate}"
29                       master-reference="{$master-reference}">
30       <xsl:attribute name="language">
31         <xsl:call-template name="l10n.language"/>
32       </xsl:attribute>
33       <xsl:attribute name="format">
34         <xsl:call-template name="page.number.format">
35           <xsl:with-param name="master-reference" select="$master-reference"/>
36         </xsl:call-template>
37       </xsl:attribute>
38
39       <xsl:attribute name="initial-page-number">
40         <xsl:call-template name="initial.page.number">
41           <xsl:with-param name="master-reference" select="$master-reference"/>
42         </xsl:call-template>
43       </xsl:attribute>
44
45       <xsl:attribute name="force-page-count">
46         <xsl:call-template name="force.page.count">
47           <xsl:with-param name="master-reference" select="$master-reference"/>
48         </xsl:call-template>
49       </xsl:attribute>
50
51       <xsl:attribute name="hyphenation-character">
52         <xsl:call-template name="gentext">
53           <xsl:with-param name="key" select="'hyphenation-character'"/>
54         </xsl:call-template>
55       </xsl:attribute>
56       <xsl:attribute name="hyphenation-push-character-count">
57         <xsl:call-template name="gentext">
58           <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
59         </xsl:call-template>
60       </xsl:attribute>
61       <xsl:attribute name="hyphenation-remain-character-count">
62         <xsl:call-template name="gentext">
63           <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
64         </xsl:call-template>
65       </xsl:attribute>
66
67       <xsl:apply-templates select="." mode="running.head.mode">
68         <xsl:with-param name="master-reference" select="$master-reference"/>
69       </xsl:apply-templates>
70       <xsl:apply-templates select="." mode="running.foot.mode">
71         <xsl:with-param name="master-reference" select="$master-reference"/>
72       </xsl:apply-templates>
73
74       <fo:flow flow-name="xsl-region-body">
75         <xsl:call-template name="set.flow.properties">
76           <xsl:with-param name="element" select="local-name(.)"/>
77           <xsl:with-param name="master-reference" select="$master-reference"/>
78         </xsl:call-template>
79
80         <fo:block id="{$id}">
81           <xsl:call-template name="reference.titlepage"/>
82         </fo:block>
83         <!-- Create one page sequence if no pagebreaks needed -->
84         <xsl:if test="$refentry.pagebreak = 0">
85           <xsl:apply-templates select="refentry"/>
86         </xsl:if>
87       </fo:flow>
88     </fo:page-sequence>
89   </xsl:if>
90   <xsl:apply-templates select="partintro"/>
91   <xsl:if test="$refentry.pagebreak != 0">
92     <xsl:apply-templates select="refentry"/>
93   </xsl:if>
94 </xsl:template>
95
96 <xsl:template match="reference" mode="reference.titlepage.mode">
97   <xsl:call-template name="reference.titlepage"/>
98 </xsl:template>
99
100 <xsl:template match="reference/partintro">
101   <xsl:variable name="id">
102     <xsl:call-template name="object.id">
103       <xsl:with-param name="object" select="ancestor::reference"/>
104     </xsl:call-template>
105   </xsl:variable>
106   <xsl:variable name="master-reference">
107     <xsl:call-template name="select.pagemaster"/>
108   </xsl:variable>
109
110   <fo:page-sequence hyphenate="{$hyphenate}"
111                     master-reference="{$master-reference}">
112     <xsl:attribute name="language">
113       <xsl:call-template name="l10n.language"/>
114     </xsl:attribute>
115     <xsl:attribute name="format">
116       <xsl:call-template name="page.number.format">
117         <xsl:with-param name="master-reference" select="$master-reference"/>
118       </xsl:call-template>
119     </xsl:attribute>
120
121     <xsl:attribute name="initial-page-number">
122       <xsl:call-template name="initial.page.number">
123         <xsl:with-param name="master-reference" select="$master-reference"/>
124       </xsl:call-template>
125     </xsl:attribute>
126
127     <xsl:attribute name="force-page-count">
128       <xsl:call-template name="force.page.count">
129         <xsl:with-param name="master-reference" select="$master-reference"/>
130       </xsl:call-template>
131     </xsl:attribute>
132
133     <xsl:attribute name="hyphenation-character">
134       <xsl:call-template name="gentext">
135         <xsl:with-param name="key" select="'hyphenation-character'"/>
136       </xsl:call-template>
137     </xsl:attribute>
138     <xsl:attribute name="hyphenation-push-character-count">
139       <xsl:call-template name="gentext">
140         <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
141       </xsl:call-template>
142     </xsl:attribute>
143     <xsl:attribute name="hyphenation-remain-character-count">
144       <xsl:call-template name="gentext">
145         <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
146       </xsl:call-template>
147     </xsl:attribute>
148
149     <xsl:apply-templates select="." mode="running.head.mode">
150       <xsl:with-param name="master-reference" select="$master-reference"/>
151     </xsl:apply-templates>
152     <xsl:apply-templates select="." mode="running.foot.mode">
153       <xsl:with-param name="master-reference" select="$master-reference"/>
154     </xsl:apply-templates>
155
156     <fo:flow flow-name="xsl-region-body">
157       <xsl:call-template name="set.flow.properties">
158         <xsl:with-param name="element" select="local-name(.)"/>
159         <xsl:with-param name="master-reference" select="$master-reference"/>
160       </xsl:call-template>
161       <fo:block id="{$id}">
162         <xsl:apply-templates select=".." mode="reference.titlepage.mode"/>
163       </fo:block>
164       <xsl:if test="title">
165         <xsl:call-template name="partintro.titlepage"/>
166       </xsl:if>
167       <xsl:apply-templates/>
168       <!-- Create one page sequence if no pagebreaks needed -->
169       <xsl:if test="$refentry.pagebreak = 0">
170         <xsl:apply-templates select="../refentry"/>
171       </xsl:if>
172     </fo:flow>
173   </fo:page-sequence>
174 </xsl:template>
175
176 <xsl:template match="reference/docinfo|refentry/refentryinfo"></xsl:template>
177 <xsl:template match="reference/info"></xsl:template>
178 <xsl:template match="reference/title"></xsl:template>
179 <xsl:template match="reference/subtitle"></xsl:template>
180
181 <!-- ==================================================================== -->
182
183 <xsl:template match="refentry">
184   <xsl:variable name="id">
185     <xsl:call-template name="object.id"/>
186   </xsl:variable>
187
188   <xsl:variable name="master-reference">
189     <xsl:call-template name="select.pagemaster"/>
190   </xsl:variable>
191
192   <xsl:variable name="refentry.content">
193     <fo:block id="{$id}">
194       <xsl:apply-templates/>
195     </fo:block>
196   </xsl:variable>
197
198   <xsl:choose>
199     <xsl:when test="not(parent::*) or 
200                     (parent::reference and $refentry.pagebreak != 0) or 
201                     parent::part">
202       <!-- make a page sequence -->
203       <fo:page-sequence hyphenate="{$hyphenate}"
204                         master-reference="{$master-reference}">
205         <xsl:attribute name="language">
206           <xsl:call-template name="l10n.language"/>
207         </xsl:attribute>
208         <xsl:attribute name="format">
209           <xsl:call-template name="page.number.format">
210             <xsl:with-param name="master-reference" select="$master-reference"/>
211           </xsl:call-template>
212         </xsl:attribute>
213
214         <xsl:attribute name="initial-page-number">
215           <xsl:call-template name="initial.page.number">
216             <xsl:with-param name="master-reference" select="$master-reference"/>
217           </xsl:call-template>
218         </xsl:attribute>
219
220         <xsl:attribute name="force-page-count">
221           <xsl:call-template name="force.page.count">
222             <xsl:with-param name="master-reference" select="$master-reference"/>
223           </xsl:call-template>
224         </xsl:attribute>
225
226         <xsl:attribute name="hyphenation-character">
227           <xsl:call-template name="gentext">
228             <xsl:with-param name="key" select="'hyphenation-character'"/>
229           </xsl:call-template>
230         </xsl:attribute>
231         <xsl:attribute name="hyphenation-push-character-count">
232           <xsl:call-template name="gentext">
233             <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
234           </xsl:call-template>
235         </xsl:attribute>
236         <xsl:attribute name="hyphenation-remain-character-count">
237           <xsl:call-template name="gentext">
238             <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
239           </xsl:call-template>
240         </xsl:attribute>
241
242         <xsl:apply-templates select="." mode="running.head.mode">
243           <xsl:with-param name="master-reference" select="$master-reference"/>
244         </xsl:apply-templates>
245         <xsl:apply-templates select="." mode="running.foot.mode">
246           <xsl:with-param name="master-reference" select="$master-reference"/>
247         </xsl:apply-templates>
248
249         <fo:flow flow-name="xsl-region-body">
250           <xsl:call-template name="set.flow.properties">
251             <xsl:with-param name="element" select="local-name(.)"/>
252             <xsl:with-param name="master-reference" select="$master-reference"/>
253           </xsl:call-template>
254
255           <xsl:copy-of select="$refentry.content"/>
256         </fo:flow>
257       </fo:page-sequence>
258     </xsl:when>
259     <xsl:otherwise>
260       <fo:block>
261         <xsl:if test="$refentry.pagebreak != 0">
262           <xsl:attribute name="break-before">page</xsl:attribute>
263         </xsl:if>
264         <xsl:copy-of select="$refentry.content"/>
265       </fo:block>
266     </xsl:otherwise>
267   </xsl:choose>
268 </xsl:template>
269
270 <xsl:template match="refmeta">
271   <xsl:apply-templates select=".//indexterm"/>
272 </xsl:template>
273
274 <xsl:template match="manvolnum">
275   <xsl:if test="$refentry.xref.manvolnum != 0">
276     <xsl:text>(</xsl:text>
277     <xsl:apply-templates/>
278     <xsl:text>)</xsl:text>
279   </xsl:if>
280 </xsl:template>
281
282 <xsl:template match="refmiscinfo">
283 </xsl:template>
284
285 <xsl:template match="refentrytitle">
286   <xsl:call-template name="inline.charseq"/>
287 </xsl:template>
288
289 <xsl:template match="refnamediv">
290   <xsl:variable name="id">
291     <xsl:call-template name="object.id"/>
292   </xsl:variable>
293
294   <fo:block id="{$id}">
295
296     <!-- if refentry.generate.name is non-zero, then we need to generate a -->
297     <!-- localized "Name" subheading for this refnamdiv (unless it has a -->
298     <!-- preceding sibling that is a refnamediv, in which case we have already -->
299     <!-- generated a "Name" subheading, so we don't need to do it again -->
300     <xsl:if test="$refentry.generate.name != 0">
301         <xsl:choose>
302           <xsl:when test="preceding-sibling::refnamediv">
303             <!-- no generated title on secondary refnamedivs! -->
304           </xsl:when>
305           <xsl:otherwise>
306             <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
307                       xsl:use-attribute-sets="refnamediv.titlepage.recto.style"
308                       font-family="{$title.fontset}">
309               <!-- Contents of what is now the format.refentry.subheading -->
310               <!-- template were formerly intended to be used only to -->
311               <!-- process those subsections of Refentry that have "real" -->
312               <!-- title children. So as a kludge to get around the fact -->
313               <!-- that the template still basically "expects" to be -->
314               <!-- processing that kind of a node, when we call the -->
315               <!-- template to process generated titles, we must call it -->
316               <!-- with values for the "offset" and "section" parameters -->
317               <!-- that are different from the default values in the -->
318               <!-- format.refentry.subheading template itself. Because -->
319               <!-- those defaults are the values appropriate for processing -->
320               <!-- "real" title nodes. -->
321               <xsl:call-template name="format.refentry.subheading">
322                 <xsl:with-param name="section" select="self::*"/>
323                 <xsl:with-param name="offset" select="1"/>
324                 <xsl:with-param name="gentext.key" select="'RefName'"/>
325               </xsl:call-template>
326             </fo:block>
327           </xsl:otherwise>
328         </xsl:choose>
329       </xsl:if>
330
331       <xsl:if test="$refentry.generate.title != 0">
332   <xsl:variable name="section.level">
333     <xsl:call-template name="refentry.level">
334       <xsl:with-param name="node" select="ancestor::refentry"/>
335     </xsl:call-template>
336   </xsl:variable>
337
338   <xsl:variable name="reftitle">
339         <xsl:choose>
340           <xsl:when test="../refmeta/refentrytitle">
341             <xsl:apply-templates select="../refmeta/refentrytitle"/>
342           </xsl:when>
343           <xsl:otherwise>
344             <xsl:apply-templates select="refname[1]"/>
345           </xsl:otherwise>
346         </xsl:choose>
347   </xsl:variable>
348
349   <!-- xsl:use-attribute-sets takes only a Qname, not a variable -->
350     <xsl:choose>
351       <xsl:when test="preceding-sibling::refnamediv">
352         <!-- no title on secondary refnamedivs! -->
353       </xsl:when>
354       <xsl:when test="$section.level = 1">
355         <fo:block xsl:use-attribute-sets="refentry.title.properties">
356           <fo:block xsl:use-attribute-sets="section.title.level1.properties">
357             <xsl:value-of select="$reftitle"/>
358           </fo:block>
359         </fo:block>
360       </xsl:when>
361       <xsl:when test="$section.level = 2">
362         <fo:block xsl:use-attribute-sets="refentry.title.properties">
363           <fo:block xsl:use-attribute-sets="section.title.level2.properties">
364             <xsl:value-of select="$reftitle"/>
365           </fo:block>
366         </fo:block>
367       </xsl:when>
368       <xsl:when test="$section.level = 3">
369         <fo:block xsl:use-attribute-sets="refentry.title.properties">
370           <fo:block xsl:use-attribute-sets="section.title.level3.properties">
371             <xsl:value-of select="$reftitle"/>
372           </fo:block>
373         </fo:block>
374       </xsl:when>
375       <xsl:when test="$section.level = 4">
376         <fo:block xsl:use-attribute-sets="refentry.title.properties">
377           <fo:block xsl:use-attribute-sets="section.title.level4.properties">
378             <xsl:value-of select="$reftitle"/>
379           </fo:block>
380         </fo:block>
381       </xsl:when>
382       <xsl:when test="$section.level = 5">
383         <fo:block xsl:use-attribute-sets="refentry.title.properties">
384           <fo:block xsl:use-attribute-sets="section.title.level5.properties">
385             <xsl:value-of select="$reftitle"/>
386           </fo:block>
387         </fo:block>
388       </xsl:when>
389       <xsl:otherwise>
390         <fo:block xsl:use-attribute-sets="refentry.title.properties">
391           <fo:block xsl:use-attribute-sets="section.title.level6.properties">
392             <xsl:value-of select="$reftitle"/>
393           </fo:block>
394         </fo:block>
395       </xsl:otherwise>
396     </xsl:choose>
397     </xsl:if>
398
399     <fo:block>
400       <xsl:if test="not(following-sibling::refnamediv)">
401         <xsl:attribute name="space-after">1em</xsl:attribute>
402       </xsl:if>
403       <xsl:apply-templates/>
404     </fo:block>
405   </fo:block>
406 </xsl:template>
407
408 <xsl:template match="refname">
409   <xsl:if test="not(preceding-sibling::refdescriptor)">
410     <xsl:apply-templates/>
411     <xsl:if test="following-sibling::refname">
412       <xsl:text>, </xsl:text>
413     </xsl:if>
414   </xsl:if>
415 </xsl:template>
416
417 <xsl:template match="refpurpose">
418   <xsl:if test="node()">
419     <xsl:text> </xsl:text>
420     <xsl:call-template name="dingbat">
421       <xsl:with-param name="dingbat">em-dash</xsl:with-param>
422     </xsl:call-template>
423     <xsl:text> </xsl:text>
424     <xsl:apply-templates/>
425   </xsl:if>
426 </xsl:template>
427
428 <xsl:template match="refdescriptor">
429   <xsl:apply-templates/>
430 </xsl:template>
431
432 <xsl:template match="refclass">
433   <xsl:if test="$refclass.suppress = 0">
434   <fo:block font-weight="bold">
435     <xsl:if test="@role">
436       <xsl:value-of select="@role"/>
437       <xsl:text>: </xsl:text>
438     </xsl:if>
439     <xsl:apply-templates/>
440   </fo:block>
441   </xsl:if>
442 </xsl:template>
443
444 <xsl:template match="refsynopsisdiv">
445   <xsl:variable name="id">
446     <xsl:call-template name="object.id"/>
447   </xsl:variable>
448
449   <fo:block id="{$id}">
450     <xsl:if test="not(refsynopsisdivinfo/title|docinfo/title|info/title|title)">
451       <!-- * if we there is no appropriate title for this Refsynopsisdiv, -->
452       <!-- * then we need to call format.refentry.subheading to generate one -->
453       <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
454                 xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style"
455                 font-family="{$title.fontset}">
456         <!-- Contents of what is now the format.refentry.subheading -->
457         <!-- template were formerly intended to be used only to -->
458         <!-- process those subsections of Refentry that have "real" -->
459         <!-- title children. So as a kludge to get around the fact -->
460         <!-- that the template still basically "expects" to be -->
461         <!-- processing that kind of a node, when we call the -->
462         <!-- template to process generated titles, we must call it -->
463         <!-- with values for the "offset" and "section" parameters -->
464         <!-- that are different from the default values in the -->
465         <!-- format.refentry.subheading template itself. Because -->
466         <!-- those defaults are the values appropriate for processing -->
467         <!-- "real" title nodes. -->
468         <xsl:call-template name="format.refentry.subheading">
469           <xsl:with-param name="section" select="parent::*"/>
470           <xsl:with-param name="offset" select="1"/>
471           <xsl:with-param name="gentext.key" select="'RefSynopsisDiv'"/>
472         </xsl:call-template>
473       </fo:block>
474     </xsl:if>
475     <xsl:call-template name="refsynopsisdiv.titlepage"/>
476     <xsl:apply-templates/>
477   </fo:block>
478 </xsl:template>
479
480 <xsl:template match="refsection">
481   <xsl:variable name="id">
482     <xsl:call-template name="object.id"/>
483   </xsl:variable>
484
485   <fo:block id="{$id}">
486     <xsl:call-template name="refsection.titlepage"/>
487     <xsl:apply-templates/>
488   </fo:block>
489 </xsl:template>
490
491 <xsl:template match="refsect1">
492   <xsl:variable name="id">
493     <xsl:call-template name="object.id"/>
494   </xsl:variable>
495
496   <fo:block id="{$id}">
497     <xsl:call-template name="refsect1.titlepage"/>
498     <xsl:apply-templates/>
499   </fo:block>
500 </xsl:template>
501
502 <xsl:template match="refsect2">
503   <xsl:variable name="id">
504     <xsl:call-template name="object.id"/>
505   </xsl:variable>
506
507   <fo:block id="{$id}">
508     <xsl:call-template name="refsect2.titlepage"/>
509     <xsl:apply-templates/>
510   </fo:block>
511 </xsl:template>
512
513 <xsl:template match="refsect3">
514   <xsl:variable name="id">
515     <xsl:call-template name="object.id"/>
516   </xsl:variable>
517
518   <fo:block id="{$id}">
519     <xsl:call-template name="refsect3.titlepage"/>
520     <xsl:apply-templates/>
521   </fo:block>
522 </xsl:template>
523
524 <xsl:template match="refsynopsisdiv/title
525                      |refsection/title
526                      |refsect1/title
527                      |refsect2/title
528                      |refsect3/title">
529   <!-- nop; titlepage.mode instead -->
530 </xsl:template>
531
532 <xsl:template match="refsynopsisdiv/title
533                      |refsection/title
534                      |refsect1/title
535                      |refsect2/title
536                      |refsect3/title
537                      |refsynopsisdiv/info/title
538                      |refsection/info/title
539                      |refsect1/info/title
540                      |refsect2/info/title
541                      |refsect3/info/title"
542               mode="titlepage.mode"
543               priority="2">
544   <xsl:call-template name="format.refentry.subheading"/>
545 </xsl:template>
546
547 <xsl:template name="format.refentry.subheading">
548 <!-- This template is now called to process generated titles for -->
549 <!-- Refnamediv and Refsynopsisdiv, as well as "real" titles for -->
550 <!-- Refsynopsisdiv, Refsection, and Refsect[1-3]. -->
551 <!-- -->
552 <!-- But the contents of this template were formerly intended to be used -->
553 <!-- only to process those subsections of Refentry that have "real" title -->
554 <!-- children. So as a kludge to get around the fact that the template -->
555 <!-- still basically "expects" to be processing that kind of a node, the -->
556 <!-- "offset" parameter was added and the "section" variable was changed to -->
557 <!-- a parameter so that when called for a generated title on a Refnamediv -->
558 <!-- or Refsynopsisdiv, we can call it like this: -->
559 <!-- -->
560 <!--     <xsl:call-template name="format.refentry.subheading"> -->
561 <!--       <xsl:with-param name="section" select="self::*"/> -->
562 <!--       <xsl:with-param name="offset" select="1"/> -->
563 <!--       <xsl:with-param name="gentext.key" select="'RefName'"/> -->
564 <!--     </xsl:call-template> -->
565 <!-- -->
566   <xsl:param name="section" 
567              select="(ancestor::refsynopsisdiv 
568                      |ancestor::refsection
569                      |ancestor::refsect1
570                      |ancestor::refsect2
571                      |ancestor::refsect3)[last()]"/>
572   <xsl:param name="offset" select="0"/>
573   <xsl:param name="gentext.key"/>
574
575   <fo:block keep-with-next.within-column="always">
576     <xsl:variable name="id">
577       <xsl:call-template name="object.id">
578         <xsl:with-param name="object" select="$section"/>
579       </xsl:call-template>
580     </xsl:variable>
581
582     <xsl:variable name="level">
583       <xsl:call-template name="section.level">
584         <xsl:with-param name="node" select="$section"/>
585       </xsl:call-template>
586     </xsl:variable>
587
588     <xsl:variable name="title">
589       <!-- If we have a non-empty value for the $gentext.key param, then we -->
590       <!-- generate an appropriate title here. Otherwise, we have a real -->
591       <!-- title child, so we copy contents of that to the result tree. -->
592       <xsl:choose>
593         <xsl:when test="$gentext.key != ''">
594           <xsl:call-template name="gentext">
595             <xsl:with-param name="key" select="$gentext.key"/>
596           </xsl:call-template>
597         </xsl:when>
598         <xsl:otherwise>
599           <xsl:apply-templates select="$section" mode="object.title.markup">
600             <xsl:with-param name="allow-anchors" select="1"/>
601           </xsl:apply-templates>
602         </xsl:otherwise>
603       </xsl:choose>
604     </xsl:variable>
605
606     <xsl:if test="$passivetex.extensions != 0">
607       <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" 
608                       fotex-bookmark-level="{$level + 2 + $offset}" 
609                       fotex-bookmark-label="{$id}">
610         <xsl:value-of select="$title"/>
611       </fotex:bookmark>
612     </xsl:if>
613
614     <xsl:if test="$axf.extensions != 0">
615       <xsl:attribute name="axf:outline-level">
616         <xsl:value-of select="count(ancestor::*)-1 + $offset"/>
617       </xsl:attribute>
618       <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
619       <xsl:attribute name="axf:outline-title">
620         <xsl:value-of select="$title"/>
621       </xsl:attribute>
622     </xsl:if>
623
624     <xsl:call-template name="section.heading">
625       <xsl:with-param name="level" select="$level + $offset"/>
626       <xsl:with-param name="title" select="$title"/>
627     </xsl:call-template>
628   </fo:block>
629 </xsl:template>
630
631 <xsl:template match="refsectioninfo|refsection/info"></xsl:template>
632 <xsl:template match="refsect1info|refsect1/info"></xsl:template>
633 <xsl:template match="refsect2info|refsect2/info"></xsl:template>
634 <xsl:template match="refsect3info|refsect3/info"></xsl:template>
635
636 <!-- ==================================================================== -->
637
638 </xsl:stylesheet>