1 <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
2 <xsl:output method="xml" indent="yes" />
3 <xsl:include href="file.xsl" />
5 <!-- ######################################################### -->
6 <!-- # Pagination # -->
7 <!-- ######################################################### -->
9 <xsl:template match="/">
10 <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
11 <xsl:call-template name="page-sequence-def" />
12 <xsl:call-template name="bookmarks" />
13 <xsl:call-template name="first-page" />
14 <xsl:call-template name="doc-introduction" />
15 <xsl:call-template name="book" />
19 <!-- Document Page Setup -->
20 <xsl:template name="page-sequence-def">
21 <fo:layout-master-set>
22 <fo:simple-page-master master-name="cover" page-height="29.7cm" page-width="21cm" margin-top="0.5cm" margin-bottom="0.5cm"
23 margin-left="2cm" margin-right="2cm">
24 <fo:region-body margin-top="2cm" />
25 </fo:simple-page-master>
26 <fo:simple-page-master master-name="leftPage" page-height="29.7cm" page-width="21cm" margin-top="1.2cm" margin-bottom="1.4cm"
27 margin-left="2cm" margin-right="2cm">
28 <fo:region-body margin-top="2cm" margin-bottom="1.5cm" />
29 <fo:region-before extent="1.2cm" />
30 <fo:region-after extent="1.3cm" />
31 </fo:simple-page-master>
32 <fo:simple-page-master master-name="rightPage" page-height="29.7cm" page-width="21cm" margin-top="1.2cm" margin-bottom="1.4cm"
33 margin-left="2cm" margin-right="2cm">
34 <fo:region-body margin-top="2cm" margin-bottom="1.5cm" />
35 <fo:region-before extent="1.2cm" />
36 <fo:region-after extent="1.3cm" />
37 </fo:simple-page-master>
38 <fo:page-sequence-master master-name="contents">
39 <fo:repeatable-page-master-alternatives>
40 <fo:conditional-page-master-reference master-reference="leftPage" odd-or-even="even" />
41 <fo:conditional-page-master-reference master-reference="rightPage" odd-or-even="odd" />
42 </fo:repeatable-page-master-alternatives>
43 </fo:page-sequence-master>
44 </fo:layout-master-set>
47 <!-- ######################################################### -->
48 <!-- # BOOKMARKS # -->
49 <!-- ######################################################### -->
51 <xsl:template name="bookmarks">
53 <xsl:apply-templates select="//section[@niv='1']/title" mode="book" />
56 <xsl:template mode="book" match="section/title">
57 <xsl:variable name="doc_level" select="../@niv" />
58 <fo:bookmark internal-destination="{generate-id(.)}">
60 <xsl:call-template name="title_num">
61 <xsl:with-param name="level" select="$doc_level" />
62 <xsl:with-param name="type" select="doc" />
65 <xsl:call-template name="title_bookmarks">
66 <xsl:with-param name="book_level">
67 <xsl:number value="$doc_level + 1" />
72 <xsl:template name="title_bookmarks">
73 <xsl:param name="book_level" select="2" />
74 <xsl:if test="..//section[@niv = $book_level]/title">
75 <xsl:for-each select="..//section[@niv = $book_level]/title">
76 <fo:bookmark internal-destination="{generate-id(.)}">
78 <xsl:call-template name="title_num">
79 <xsl:with-param name="level" select="../@niv" />
80 <xsl:with-param name="type" select="doc" />
83 <xsl:call-template name="title_bookmarks">
84 <xsl:with-param name="book_level">
85 <xsl:number value="$book_level + 1" />
93 <!-- ######################################################### -->
94 <!-- # FIRST PAGE # -->
95 <!-- ######################################################### -->
97 <!-- Release version -->
98 <xsl:template match="version">
99 <fo:block font-family="Helvetica" font-style="normal" font-weight="normal" font-size="20pt" text-align="right" space-after="5mm">
101 <xsl:value-of select="$release_num" />
102 <xsl:apply-templates /></fo:block>
105 <!-- Information copyright / footer -->
106 <xsl:template mode="footer" match="legal">
107 <fo:block font-family="Helvetica" font-size="8pt" text-align="right">
108 <xsl:apply-templates />
113 <xsl:template match="tool">
114 <fo:block font-family="Helvetica" font-style="normal" font-weight="normal" font-size="18pt" text-align="right">
115 <xsl:apply-templates />
120 <xsl:template match="logo">
121 <xsl:call-template name="image">
122 <xsl:with-param name="name" select="@namepdf" />
123 <xsl:with-param name="height">41pt</xsl:with-param>
124 <xsl:with-param name="width">61pt</xsl:with-param>
125 <xsl:with-param name="align">left</xsl:with-param>
130 <xsl:template mode="page" match="booktitle">
131 <fo:block font-family="Helvetica" font-style="normal" font-weight="bold" font-size="36pt">
132 <xsl:apply-templates />
134 <xsl:if test="../titleextension">
135 <fo:block font-family="Helvetica" font-style="normal" font-weight="bold" font-size="36pt">
136 <xsl:apply-templates select="../titleextension" />
142 <xsl:template match="date">
143 <fo:block font-family="Helvetica" font-style="normal" font-weight="normal" font-size="20pt" text-align="right">
144 <xsl:value-of select="$date" />
149 <xsl:template name="first-page">
150 <fo:page-sequence master-reference="cover">
151 <fo:flow flow-name="xsl-region-body">
152 <fo:block font-family="Helvetica" font-style="normal" font-weight="bold" font-size="36pt" text-align="center">Avertec
154 <fo:block space-after="3cm">
155 <fo:leader leader-pattern="rule" leader-length="17cm" rule-thickness="1pt" />
157 <fo:table table-layout="fixed" width="17cm">
158 <fo:table-column column-width="17cm" />
162 <fo:block text-align="right">
163 <xsl:apply-templates mode="page" select="//booktitle" />
165 <fo:block text-align="right" space-before="0.8cm" space-after="1.4cm">
166 <fo:external-graphic src="file:{$pictpdf}/Photo_yagle.jpg" height="260pt" width="auto"
167 content-height="220pt" content-width="auto" />
173 <fo:block space-after="0.1cm">
174 <xsl:apply-templates select="//tool" />
176 <fo:block space-after="2pt">
177 <xsl:apply-templates select="//version" />
179 <fo:block space-after="2.7cm">
180 <xsl:apply-templates select="//date" />
182 <fo:block space-after="0.6cm">
183 <xsl:apply-templates select="//logo" />
185 <fo:block font-family="Helvetica" font-size="14pt" font-style="normal" font-weight="normal" text-align="left"
186 space-after="2pt" break-after="page">
187 <xsl:value-of select="//legal" />
193 <!-- ######################################################### -->
194 <!-- # INTRODUCTION # -->
195 <!-- ######################################################### -->
198 <xsl:template match="introduction">
199 <fo:block break-before="page">
200 <xsl:apply-templates />
204 <xsl:template match="intro">
205 <fo:block font-size="15pt" font-family="Times" font-style="normal" font-weight="normal" text-align="justify">
206 <xsl:apply-templates />
208 <fo:block space-before="12.5cm" text-align="center" font-family="Helvetica" font-size="12pt" font-style="normal"
209 font-weight="normal">Documentation issued and compliant with Avertec Tools Release
210 <xsl:value-of select="$release_num" />.</fo:block>
211 <fo:block space-before="1cm" text-align="center" font-family="Helvetica" font-size="12pt" font-style="normal" font-weight="normal">
212 Please contact support@avertec.com for comments relating to this manual.</fo:block>
214 <xsl:template match="intro_title">
215 <fo:block text-align="right" space-after="40pt" font-family="Helvetica" font-style="normal" font-weight="bold" font-size="26pt"
217 <xsl:apply-templates />
221 <!-- Introduction page -->
222 <xsl:template name="doc-introduction">
223 <fo:page-sequence master-reference="contents" initial-page-number="0">
224 <fo:static-content flow-name="xsl-region-before">
225 <fo:block font-family="Helvetica" font-size="10pt" text-align="right">
226 <xsl:apply-templates mode="banner" select="//booktitle" />
228 <fo:block text-align='center'>
229 <fo:leader leader-pattern="rule" leader-length="17cm" />
232 <fo:static-content flow-name="xsl-region-after">
233 <fo:block text-align='center'>
234 <fo:leader leader-pattern="rule" leader-length="17cm" />
236 <fo:block text-align="center">
240 <fo:flow flow-name="xsl-region-body">
241 <xsl:apply-templates select="//intro_title" />
242 <xsl:apply-templates select="//intro" />
247 <!-- ######################################################### -->
248 <!-- # Table of Contents # -->
249 <!-- ######################################################### -->
251 <xsl:template name="toc">
252 <fo:block text-align="right" space-after="52pt" id="tof" font-family="Helvetica" font-size="26pt" font-weight="bold" color="grey">
253 Table of Contents</fo:block>
254 <fo:block text-align="justify">
255 <xsl:apply-templates mode="toc" select="//title" />
256 <fo:block space-after="12pt" text-indent="0.3in" text-align-last="justify">
257 <fo:basic-link internal-destination="{generate-id(.)}">Index</fo:basic-link>
258 <fo:leader leader-pattern="dots" />
259 <fo:page-number-citation ref-id="{generate-id(.)}" />
265 <xsl:template mode="toc" match="section/title">
266 <xsl:variable name="doc_level" select="../@niv" />
267 <fo:block text-indent="0.3in" text-align-last="justify">
268 <fo:basic-link internal-destination="{generate-id(.)}">
269 <xsl:call-template name="title_num">
270 <xsl:with-param name="level" select="$doc_level" />
271 <xsl:with-param name="type" select="toc" />
274 <fo:leader leader-pattern="dots" />
275 <fo:page-number-citation ref-id="{generate-id(.)}" />
279 <!-- ######################################################### -->
280 <!-- # Title Numbering # -->
281 <!-- ######################################################### -->
283 <xsl:template name="title_num">
284 <xsl:param name="level" select="1" />
285 <xsl:param name="type" select="doc" />
287 <xsl:when test="$level = 1"><xsl:number count="//section[@niv='1']/title" level="any"/>.<xsl:text> </xsl:text></xsl:when>
288 <xsl:when test="$level = 2"><xsl:number count="//section[@niv='1']/title" level="any"/>.<xsl:number count="//section[@niv='2']/title" from="//section[@niv='1']" level="any"/>. </xsl:when>
289 <xsl:when test="$level = 3"><xsl:number count="//section[@niv='1']/title" level="any"/>.<xsl:number count="//section[@niv='2']/title" from="//section[@niv='1']" level="any"/>.<xsl:number count="//section[@niv='3']/title" from="//section[@niv='2']" level="any" format="1"/>. </xsl:when>
292 <xsl:when test="$type = toc">
294 <xsl:when test="not(./index)">
295 <xsl:apply-templates />
298 <xsl:apply-templates mode="toc" select="./index" />
304 <xsl:when test="not(./index)">
305 <xsl:value-of select="." />
308 <xsl:apply-templates mode="title" select="./index" />
315 <!-- ######################################################### -->
317 <!-- ######################################################### -->
319 <!-- Index des variables dans le document / plusieurs mod disponibles -->
320 <xsl:template mode="title" match="//index">
321 <xsl:value-of select="text()" />
323 <xsl:template mode="toc" match="//index">
324 <fo:block text-indent="0.3in" text-align-last="justify">
325 <fo:basic-link internal-destination="{generate-id(.)}">
326 <xsl:value-of select="text()" />
328 <fo:leader leader-pattern="dots" />
329 <fo:page-number-citation ref-id="{generate-id(.)}" />
332 <xsl:template mode="iov" match="//index">
333 <fo:block space-after="10pt" text-align-last="justify" text-indent="0.6in" font-weight="bold" font-style="normal">
335 <xsl:when test="../../title">
336 <fo:basic-link internal-destination="{generate-id(..)}">
337 <xsl:apply-templates />
339 <fo:leader leader-pattern="dots" />
340 <fo:page-number-citation ref-id="{generate-id(..)}" />
343 <fo:basic-link internal-destination="{generate-id(.)}">
344 <xsl:apply-templates />
346 <fo:leader leader-pattern="dots" />
347 <fo:page-number-citation ref-id="{generate-id(.)}" />
352 <xsl:template match="//index">
353 <xsl:param name="in">
356 <xsl:value-of select="item[number($in)]" />
357 <fo:block id="{generate-id(.)}">
358 <xsl:apply-templates />
362 <!-- Mise en forme de l'index -->
363 <xsl:template name="doc_index">
364 <fo:block break-before="page" text-align="right" space-after="52pt" id="iov" font-family="Helvetica" font-size="16pt"
366 <fo:block font-family="Times" font-style="normal" font-weight="bold" id="{generate-id(.)}">Index</fo:block>
368 <xsl:if test="//index">
369 <fo:block text-align="justify">
370 <xsl:apply-templates mode="iov" select="//index">
371 <xsl:sort order="ascending" data-type="text" case-order="upper-first" lang="en" />
372 </xsl:apply-templates>
375 <xsl:if test="not(//index)">
376 <fo:block space-before="4.5cm" text-align="center" font-family="Helvetica" font-style="normal" font-weight="bold"
377 font-size="12pt">No index for this document.</fo:block>
381 <!-- ######################################################### -->
382 <!-- # MAIN PART # -->
383 <!-- ######################################################### -->
385 <xsl:template name="book">
386 <fo:page-sequence master-reference="contents">
387 <fo:static-content flow-name="xsl-region-before">
388 <fo:block font-family="Helvetica" font-size="10pt" text-align="right">
389 <xsl:apply-templates mode="banner" select="//booktitle" />
391 <fo:block text-align='center'>
392 <fo:leader leader-pattern="rule" leader-length="17cm" />
395 <fo:static-content flow-name="xsl-region-after">
396 <fo:block text-align='center'>
397 <fo:leader leader-pattern="rule" leader-length="17cm" />
399 <fo:block text-align="center">
403 <fo:flow flow-name="xsl-region-body">
404 <xsl:call-template name="toc" />
405 <xsl:apply-templates select="//chapter" />
406 <xsl:call-template name="doc_index" />
411 <!-- ######################################################### -->
412 <!-- # HEADINGS # -->
413 <!-- ######################################################### -->
415 <!-- pagebreak on new chapter -->
416 <xsl:template match="chapter">
417 <fo:block break-before="page">
418 <xsl:apply-templates />
423 <xsl:template match="section">
425 <xsl:when test="@niv < 6">
427 <xsl:apply-templates />
431 <fo:block keep-together.within-page="always">
432 <xsl:apply-templates />
439 <xsl:template match="section/title">
443 <xsl:variable name="doc_level" select="../@niv" />
445 <xsl:when test="$doc_level = 1">
446 <fo:block id="{generate-id(.)}" space-before="18pt" space-after="36pt" font-family="Helvetica" color="grey"
447 font-size="26pt" font-style="normal" font-weight="bold" text-align="left" keep-with-next.within-page="always">Chapter
448 <xsl:call-template name="title_num">
449 <xsl:with-param name="level" select="$doc_level" />
450 <xsl:with-param name="type" select="doc" />
451 </xsl:call-template></fo:block>
452 <xsl:value-of select="item[number($n)]" />
454 <xsl:when test="$doc_level = 2">
455 <fo:block id="{generate-id(.)}" space-before="14pt" space-after="14pt" font-family="Helvetica" color="grey"
456 font-size="20pt" font-style="normal" font-weight="bold" text-align="left" keep-with-next.within-page="always">
457 <xsl:call-template name="title_num">
458 <xsl:with-param name="level" select="$doc_level" />
459 <xsl:with-param name="type" select="doc" />
463 <xsl:when test="$doc_level = 3">
464 <fo:block id="{generate-id(.)}" space-before="10pt" space-after="10pt" font-family="Helvetica" font-size="16pt"
465 font-style="normal" font-weight="bold" text-align="left" keep-with-next.within-page="always">
466 <xsl:call-template name="title_num">
467 <xsl:with-param name="level" select="$doc_level" />
468 <xsl:with-param name="type" select="doc" />
472 <xsl:when test="$doc_level = 4">
473 <fo:block id="{generate-id(.)}" space-before="8pt" space-after="8pt" font-family="Helvetica" font-size="12pt"
474 font-style="normal" font-weight="bold" text-align="left" keep-with-next.within-page="always">
475 <xsl:call-template name="title_num">
476 <xsl:with-param name="level" select="$doc_level" />
477 <xsl:with-param name="type" select="doc" />
484 <!-- ######################################################### -->
485 <!-- # List Styles # -->
486 <!-- ######################################################### -->
488 <!-- Array with article and 2-line definition -->
489 <xsl:template priority="1" match="//row[@type='split']">
490 <fo:table-row start-indent="0cm" keep-with-next.within-page="always">
491 <fo:table-cell number-columns-spanned="2">
492 <fo:block font-family="Times" text-align="justify" font-style="normal" font-weight="bold">
493 <xsl:apply-templates select="article" />
497 <fo:table-row start-indent="0cm">
498 <fo:table-cell column-number="2" padding-after="10pt">
499 <fo:block font-family="Times" text-align="justify" font-style="normal" font-weight="normal" space-after.optimum="10pt">
500 <xsl:apply-templates select="def" />
506 <!-- Defaulted array lines -->
507 <xsl:template match="//row">
508 <fo:table-row start-indent="0cm">
509 <fo:table-cell padding-after="10pt">
510 <fo:block font-family="Times" text-align="justify" font-style="normal" font-weight="bold">
511 <xsl:apply-templates select="article" />
514 <fo:table-cell padding-after="10pt">
515 <fo:block font-family="Times" text-align="justify" font-style="normal" font-weight="normal" space-after.optimum="10pt">
516 <xsl:apply-templates select="def" />
522 <!-- Array lines displaying a picture as article -->
523 <xsl:template mode="button" match="//row">
524 <fo:table-row start-indent="0cm">
526 <fo:block text-align="right" font-family="Times" font-style="normal" font-weight="bold" vertical-align="middle">
527 <xsl:apply-templates select="article" />
531 <fo:block text-align="justify" font-family="Times" font-style="normal" font-weight="normal" space-before="12pt"
532 vertical-align="middle">
533 <xsl:apply-templates select="def" />
540 <xsl:template match="//list">
541 <fo:block space-before="6pt" space-after="6pt">
542 <xsl:apply-templates select="article" />
543 <fo:list-block start-indent="1cm">
544 <xsl:apply-templates select="item" />
549 <!-- List within a array -->
550 <xsl:template mode="table" match="//list">
551 <fo:block space-before="6pt" space-after="6pt" keep-together="always">
552 <xsl:apply-templates select="article" />
554 <xsl:apply-templates mode="table" select="item" />
559 <!-- Items of a list within a array -->
560 <xsl:template mode="table" match="item">
561 <fo:list-item space-before="4pt">
564 <xsl:text>•</xsl:text>
566 </fo:list-item-label>
568 <fo:block font-family="Times" text-align="justify" font-weight="normal" font-style="normal">
569 <xsl:apply-templates />
575 <!-- Items of an indented list -->
576 <xsl:template match="item">
577 <fo:list-item space-before="4pt">
580 <xsl:text>•</xsl:text>
582 </fo:list-item-label>
584 <fo:block start-indent="0.6in" font-family="Times" text-align="justify" font-weight="normal" font-style="normal">
585 <xsl:apply-templates />
592 <xsl:template match="//glossary">
593 <xsl:if test="./row[@type='half']">
594 <fo:block space-before="12pt">
595 <fo:table table-layout="fixed" width="16cm" start-indent="1cm">
596 <fo:table-column column-width="8cm" />
597 <fo:table-column column-width="8cm" />
599 <xsl:apply-templates />
604 <xsl:if test="./row[@type='split']">
605 <fo:block space-before="6pt" space-after="6pt">
606 <fo:table table-layout="fixed" width="16cm" start-indent="1cm">
607 <fo:table-column column-width="1.5cm" />
608 <fo:table-column column-width="14.5cm" />
610 <xsl:apply-templates />
615 <xsl:if test="not(./row[@type='half']) and not (./row[@type='split'])">
616 <fo:block space-before="6pt" space-after="6pt">
617 <fo:table table-layout="fixed" width="16cm" start-indent="1cm">
618 <fo:table-column column-width="6cm" />
619 <fo:table-column column-width="10cm" />
621 <xsl:apply-templates />
628 <!-- Definition de table / format reduit -->
629 <xsl:template priority="1" match="//glossary[@width='small']">
630 <fo:block space-before="6pt" keep-together.within-page="always">
631 <fo:table table-layout="fixed" width="14.5cm">
632 <fo:table-column column-width="3.5cm" />
633 <fo:table-column column-width="11cm" />
635 <xsl:apply-templates />
640 <xsl:template priority="1" match="//glossary[@width='small2']">
641 <fo:block space-before="6pt" keep-together.within-page="always">
642 <fo:table table-layout="fixed" width="14.5cm">
643 <fo:table-column column-width="5.5cm" />
644 <fo:table-column column-width="9cm" />
646 <xsl:apply-templates />
652 <!-- article d'un tableau -->
653 <xsl:template match="article">
654 <fo:block id="{generate-id(.)}" font-family="Times" font-style="normal" font-weight="bold">
655 <xsl:apply-templates />
659 <!-- partie gauche d'un tableau -->
660 <xsl:template match="def">
661 <fo:block font-family="Times" font-style="normal" font-weight="normal">
662 <xsl:apply-templates />
666 <!-- ######################################################### -->
667 <!-- # Text Styles # -->
668 <!-- ######################################################### -->
670 <!-- page blanche en fin de document -->
671 <xsl:template match="//last">
672 <fo:block break-before="page" text-align="center">
673 <xsl:apply-templates />
677 <!-- Saut de page force -->
678 <xsl:template match="//pagebreak">
679 <fo:block break-after="page">
680 <xsl:apply-templates />
685 <xsl:template match="//d">
686 <fo:block start-indent="0.4in" space-after="12pt" space-before="12pt" font-family="Times" font-size="12pt" font-style="normal"
687 font-weight="normal" text-align="justify" keep-together.within-page="always">
688 <xsl:apply-templates />
693 <xsl:template match="//p">
694 <fo:block space-after="6pt" font-family="Times" font-size="12pt" font-style="normal" font-weight="normal" text-align="justify"
695 keep-together.within-page="always">
696 <xsl:apply-templates />
701 <xsl:template match="//br">
702 <fo:block></fo:block>
703 <xsl:apply-templates />
706 <!-- Titre de l'ouvrage en-tete/pied de page -->
707 <xsl:template mode="banner" match="booktitle">
708 <fo:block font-family="Helvetica" font-style="normal" font-weight="normal" font-size="12pt">
709 <xsl:apply-templates />
710 <xsl:if test="../titleextension"> 
711 <xsl:apply-templates select="../titleextension" /></xsl:if>
715 <!-- ligne d'un code / conserve la mise en forme -->
716 <xsl:template match="//cl">
717 <fo:block white-space="pre">
718 <xsl:apply-templates />
722 <!-- Delimite une partie de code deja mis en forme / defaut est identique a type=box -->
723 <xsl:template match="//bnf">
724 <fo:block font-family="Courier" font-size="10pt" space-after="12pt" font-style="normal" font-weight="normal" color="blue"
725 start-indent="0.4in" space-before="12pt" keep-together="always">
727 <xsl:apply-templates />
732 <!-- Delimite une partie de code deja mis en forme / defaut est identique a type=box -->
733 <xsl:template match="//code">
734 <fo:block font-family="Courier" font-size="9pt" space-after="12pt" font-style="normal" font-weight="normal" start-indent="0.4in"
735 space-before="12pt" widows="4" orphans="4">
737 <xsl:apply-templates />
742 <!-- Delimite une partie de code deja mis en forme / defaut est identique a type=box -->
743 <xsl:template match="//smallcode">
744 <fo:block font-family="Courier" font-size="8pt" space-after="12pt" font-style="normal" font-weight="normal" space-before="12pt"
745 widows="4" orphans="4">
747 <xsl:apply-templates />
752 <!-- partie document / positionnement d'indentation et de font size par defaut du document -->
753 <xsl:template match="document">
754 <xsl:apply-templates />
757 <!-- mise en forme dans une ligne -->
758 <xsl:template match="//f">
759 <fo:inline font-family="Courier" font-size="10pt" font-style="normal" font-weight="normal">
760 <xsl:apply-templates />
764 <!-- mise en forme dans une ligne -->
765 <xsl:template match="//b">
766 <fo:inline font-family="Helvetica" font-size="11pt" font-style="normal" font-weight="bold">
767 <xsl:apply-templates />
771 <!-- ######################################################### -->
772 <!-- # FUNCTIONS # -->
773 <!-- ######################################################### -->
775 <xsl:template match="//functions">
776 <fo:block space-before="12pt">
777 <fo:table table-layout="fixed" width="17cm">
778 <fo:table-column column-width="17cm" />
780 <xsl:for-each select="func">
783 <fo:table-cell padding-before="12pt">
784 <fo:block font-family="Courier" font-style="normal" font-size="13pt" font-weight="bold"
785 text-align="left" space-before="12pt">
786 <xsl:apply-templates select="funcname" />
792 <fo:table-cell padding-before="12pt">
793 <fo:block font-family="Courier" font-style="normal" font-size="11pt" font-weight="normal"
794 text-align="left" space-before="12pt">
795 <xsl:apply-templates select="proto" />
802 <fo:table table-layout="fixed" width="17cm">
803 <fo:table-column column-width="4.5cm" />
804 <fo:table-column column-width="12.5cm" />
807 <fo:table-cell column-number="2" padding-before="12pt">
808 <fo:block font-family="Times" font-style="italic" font-weight="normal" text-align="justify"
810 <xsl:apply-templates select="desc" />
819 <xsl:for-each select="arg">
822 <fo:table table-layout="fixed" width="17cm">
823 <fo:table-column column-width="4.5cm" />
824 <fo:table-column column-width="12.5cm" />
827 <fo:table-cell padding-before="12pt">
828 <fo:block font-family="Courier" font-size="11pt" font-style="normal"
829 font-weight="normal" text-align="justify" space-before="12pt">
830 <xsl:apply-templates select="argn" />
833 <fo:table-cell padding-before="12pt">
834 <fo:block font-family="Times" font-style="normal" font-weight="normal"
835 text-align="justify" space-before="12pt">
836 <xsl:apply-templates select="argdef" />
848 <fo:block text-align='right' space-after="12pt">
849 <fo:leader leader-pattern="rule" leader-length="17cm" />
859 <!-- ######################################################### -->
860 <!-- # ERROR MESSAGES # -->
861 <!-- ######################################################### -->
862 <!-- Delimite un message d'erreur -->
863 <xsl:template match="//messages">
865 <xsl:when test="./err/num = ''">
866 <fo:block space-before="12pt" font-family="Times" font-style="italic" font-weight="normal" text-align="center">Error
867 messages description not available yet.</fo:block>
870 <fo:block space-before="12pt">
871 <fo:table table-layout="fixed" width="17cm">
872 <fo:table-column column-width="17cm" />
874 <xsl:for-each select="err">
875 <xsl:variable name="msg_buf" select="msg" />
878 <fo:table table-layout="fixed" width="17cm">
879 <fo:table-column column-width="3cm" />
880 <fo:table-column column-width="14cm" />
884 <fo:block font-family="Courier" font-size="10pt" font-style="normal"
885 font-weight="normal" text-align="justify">
886 <xsl:apply-templates select="lib" />
887 <xsl:apply-templates select="num" />
891 <fo:block font-family="Courier" font-size="10pt" font-style="normal"
892 font-weight="normal" text-align="justify">
893 <xsl:for-each select="tokenize(msg,'\\n')">
895 <xsl:for-each select="tokenize(.,'\\t')">
896 <xsl:for-each select="replace(.,'%s','<string>')">
897 <xsl:for-each select="replace(.,'%d','<decimal>')">
898 <xsl:for-each select="replace(.,'%i','<integer>')">
899 <xsl:for-each select="replace(.,'%c','<character>')">
900 <xsl:value-of select="." />
917 <fo:table table-layout="fixed" width="17cm">
918 <fo:table-column column-width="3cm" />
919 <fo:table-column column-width="14cm" />
922 <fo:table-cell column-number="2">
923 <fo:block font-family="Times" font-style="normal" font-weight="normal"
924 text-align="justify" space-before="12pt">
925 <xsl:apply-templates select="doc" />
935 <fo:block text-align='right' space-after="12pt">
936 <fo:leader leader-pattern="rule" leader-length="17cm" />
948 <!-- ######################################################### -->
950 <!-- ######################################################### -->
952 <!-- Image hauteur (H) imposee -->
953 <xsl:template match="//imgHsize">
954 <xsl:call-template name="image">
955 <xsl:with-param name="name" select="@namepdf" />
956 <xsl:with-param name="height" select="@hpdf" />
957 <xsl:with-param name="align">center</xsl:with-param>
961 <!-- Images avec tailles predefinie en fonction des attributs -->
962 <xsl:template match="//imgfix">
963 <xsl:call-template name="image">
964 <xsl:with-param name="name" select="@ref" />
965 <xsl:with-param name="height">39pt</xsl:with-param>
966 <xsl:with-param name="width">39pt</xsl:with-param>
967 <xsl:with-param name="align">center</xsl:with-param>
971 <!-- Image hauteur (H) et largeur (W) imposees -->
972 <xsl:template match="//imgsize">
973 <xsl:call-template name="image">
974 <xsl:with-param name="name" select="@namepdf" />
975 <xsl:with-param name="height" select="@hpdf" />
976 <xsl:with-param name="width" select="@wpdf" />
977 <xsl:with-param name="align">center</xsl:with-param>
981 <!-- Affichage des images en fonction des attributs disponibles -->
982 <xsl:template name="image">
983 <xsl:param name="name" />
984 <xsl:param name="width" />
985 <xsl:param name="height" />
986 <xsl:param name="align" select="center" />
987 <fo:block text-align="{$align}" space-before="12pt" space-after="12pt">
989 <xsl:when test="not( $width and $height )">
991 <xsl:when test="$width">
992 <fo:external-graphic src="file:{$pictpdf}/{$name}" scaling="uniform" height="auto" width="{$width}"
993 content-height="auto" content-width="{$width}" />
995 <xsl:when test="$height">
996 <fo:external-graphic src="file:{$pictpdf}/{$name}" scaling="uniform" height="{$height}" width="auto"
997 content-height="{$height}" content-width="auto" />
1000 <fo:external-graphic src="file:{$pictpdf}/{$name}" scaling="uniform" height="auto" width="auto"
1001 content-height="auto" content-width="auto" />
1006 <fo:external-graphic src="file:{$pictpdf}/{$name}" height="{$height}" width="{$width}" content-height="{$height}"
1007 content-width="{$width}" />
1013 <!-- ######################################################### -->
1015 <!-- ######################################################### -->
1017 <xsl:template match="//faq[@link]">
1018 <xsl:variable name="itarget"><xsl:value-of select="./@link"/></xsl:variable>
1019 <xsl:for-each select="//faq[@id]">
1020 <xsl:variable name="faqid"><xsl:number count="index" from="//glossary" level="any"/></xsl:variable>
1021 <xsl:if test="number($itarget) = number($faqid)">
1022 <fo:basic-link internal-destination="{generate-id(..)}">
1023 <fo:inline font-family="Times" font-style="normal" font-weight="bold">Q<xsl:value-of select="$faqid"/></fo:inline>
1029 <xsl:template match="faq">
1030 <xsl:variable name="locid"><xsl:number count="index" from="//glossary" level="any"/></xsl:variable>
1031 Q<xsl:value-of select="$locid"/> :