Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / docxml2 / html / genHTML.xsl
1 <xsl:stylesheet version="2.0"
2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
4 <xsl:include href="file.xsl" />
5
6 <xsl:preserve-space elements="title cl"/>
7 <xsl:strip-space elements="p def"/>
8
9 <xsl:output name="html" method="html"/>
10
11
12 <!-- ######################################################### -->
13 <!-- # GENERATION DE DIFFERENTES PAGES HTML # -->
14 <!-- ######################################################### -->
15 <xsl:param name="banner_name"><xsl:value-of select="$fichier"/>_banner</xsl:param>
16 <xsl:param name="doc_name"><xsl:value-of select="$fichier"/>_doc</xsl:param>
17 <xsl:param name="toc_name"><xsl:value-of select="$fichier"/>_toc</xsl:param>
18 <xsl:param name="info_name"><xsl:value-of select="$fichier"/>_info</xsl:param>
19 <xsl:param name="index_name"><xsl:value-of select="$fichier"/>_index</xsl:param>
20
21 <xsl:template match="/">
22 <!-- Fichier: {$fichier}_banner.html / Banniere avec titre de la doc -->
23 <xsl:call-template name="banner"/>
24 <!-- Fichier: {$fichier}_doc[#chapter_num].html / Frameset -->
25 <xsl:call-template name="doc"/>
26 <!-- Fichier: {$fichier}.html / Frameset -->
27 <xsl:call-template name="frameset"/>
28 <!-- Fichier: {$fichier}_index.html / Index des variables de la doc -->
29 <xsl:call-template name="indexfile"/>
30 <!-- Fichier: {$fichier}_info.html / Introduction ("About") de la doc -->
31 <xsl:call-template name="infofile"/>
32 <!-- Fichier: {$fichier}_toc.html / Tables des matieres de la doc -->
33 <xsl:call-template name="toc"/>
34 </xsl:template>
35
36 <!-- ######################################################### -->
37 <!-- # REGLES APLIQUEES AUX BALISES DES DOCUMENTS # -->
38 <!-- # Attention au classement alphabetique # -->
39 <!-- # Classement par nom de balise / pas par path # -->
40 <!-- ######################################################### -->
41
42 <!-- partie gauche du tableau 75% -->
43 <xsl:template priority="1" match="//glossary/row[@type='split']/article">
44 <TD colspan='2' class="article_split"><a name="{generate-id(.)}"><xsl:apply-templates/></a></TD>
45 </xsl:template>
46
47 <!-- partie gauche du tableau 50% -->
48 <xsl:template priority="1" match="//glossary/row[@type='half']/article">
49 <TD colspan='2' class="article_half"><a name="{generate-id(.)}"><xsl:apply-templates/></a></TD>
50 </xsl:template>
51
52 <!-- partie gauche du tableau par defaut -->
53 <xsl:template match="//glossary/row/article">
54 <TD class="article_row"><a name="{generate-id(.)}"><xsl:apply-templates/></a></TD>
55 </xsl:template>
56
57 <!-- marque un des elements d'une liste a point -->
58 <xsl:template match="//list/article">
59 <b><xsl:apply-templates/></b>
60 </xsl:template>
61
62 <!-- marque un des elements d'une liste enumeree -->
63 <xsl:template match="//numlist/article">
64 <b><xsl:apply-templates/></b>
65 </xsl:template>
66
67 <!-- corps de texte -->
68 <xsl:template match="//body">
69 <xsl:apply-templates/>
70 </xsl:template>
71
72 <!-- Titre de l'ouvrage -->
73 <xsl:template match="//booktitle">
74 <p class="booktitle"><xsl:apply-templates/>
75 <xsl:if test="../titleextension">&#xA0;<xsl:apply-templates select="../titleextension"/></xsl:if>
76 </p>
77 </xsl:template>
78
79
80 <!-- ligne d'un code -->
81 <xsl:template match="//cl">
82 <xsl:apply-templates/>
83 </xsl:template>
84
85 <!-- Delimite une partie de code deja mis en forme / defaut est identique a type=box -->
86 <xsl:template match="//bnf">
87 <p class="center">
88 <table BORDER="2" CELLPADDING="10"><tr><td class="bluecode">
89 <pre><xsl:apply-templates/></pre>
90 </td></tr></table>
91 </p>
92 </xsl:template>
93
94 <!-- Delimite une partie de code deja mis en forme -->
95 <xsl:template match="//smallcode">
96 <p class="justify">
97 <table BORDER="0" CELLPADDING="10"><tr><td class="smallcode">
98 <pre><xsl:apply-templates/></pre>
99 </td></tr></table>
100 </p>
101 </xsl:template>
102
103 <!-- Delimite une partie de code deja mis en forme -->
104 <xsl:template match="//code">
105 <p class="justify">
106 <table BORDER="0" CELLPADDING="10"><tr><td class="code">
107 <pre><xsl:apply-templates/></pre>
108 </td></tr></table>
109 </p>
110 </xsl:template>
111
112 <!-- fait apparaitre une ligne de command hors d'un paragraphe -->
113 <xsl:template match="//command">
114 <p class="command"><xsl:apply-templates/></p>
115 </xsl:template>
116
117 <!-- Affichage de la date -->
118 <xsl:template match="presentation/date">
119 <p class="date"><xsl:apply-templates select="$date"/></p>
120 </xsl:template>
121
122 <!-- partie gauche du tableau 75% -->
123 <xsl:template priority="1" match="//glossary/row[@type='split']/def">
124 <TD class="def_split">
125 <xsl:apply-templates/></TD>
126 </xsl:template>
127
128 <!-- partie gauche du tableau 50% -->
129 <xsl:template priority="1" match="//glossary/row[@type='half']/def">
130 <TD class="def_half">
131 <xsl:apply-templates/></TD>
132 </xsl:template>
133
134 <!-- partie gauche du tableau par defaut -->
135 <xsl:template match="//glossary/row/def">
136 <TD class="def_row">
137 <xsl:apply-templates/></TD>
138 </xsl:template>
139
140 <!-- partie document / positionnement d'indentation et de font size par defaut du document -->
141 <xsl:template match="document">
142 <DIV class="document">
143 <xsl:apply-templates/>
144 </DIV>
145 </xsl:template>
146
147 <!-- mise en forme dans une ligne -->
148 <xsl:template match="//b">
149 <font class="font"><xsl:apply-templates/></font>
150 </xsl:template>
151
152 <!-- mise en forme dans une ligne -->
153 <xsl:template match="//f">
154 <font class="font"><span style="color: rgb(255, 102, 0);"><xsl:apply-templates/></span></font>
155 </xsl:template>
156
157 <!-- Gestion des balises de FAQ avec lien -->
158 <xsl:template match="//faq[@link]">
159 <xsl:variable name="position_ref"><xsl:number count="//chapter" level="any"/></xsl:variable>
160 <xsl:variable name="doc_filename"><xsl:value-of select="$doc_name"/><xsl:value-of select="$position_ref"/></xsl:variable>
161 <xsl:variable name="itarget"><xsl:value-of select="./@link"/></xsl:variable>
162 <xsl:for-each select="//faq[@id]">
163 <xsl:variable name="faqid"><xsl:number count="index" from="//glossary" level="any"/></xsl:variable>
164 <xsl:if test="number($itarget) = number($faqid)">
165 <a href="{$doc_filename}.html#{generate-id(..)}" target="doc">
166 <b>Q<xsl:value-of select="$faqid"/></b></a>
167 </xsl:if>
168 </xsl:for-each>
169 </xsl:template>
170
171 <!-- FAQ -->
172 <xsl:template match="faq">
173 <xsl:variable name="locid"><xsl:number count="index" from="//glossary" level="any"/></xsl:variable>
174 Q<xsl:value-of select="$locid"/> :
175 </xsl:template>
176
177 <!-- Image taille reelle -->
178 <xsl:template match="//imgfix">
179 <xsl:call-template name="image">
180 <xsl:with-param name="name" select="@ref"/>
181 </xsl:call-template>
182 </xsl:template>
183
184 <!-- Logo de la societe -->
185 <xsl:template match="//imglogo">
186 <xsl:call-template name="image">
187 <xsl:with-param name="name" select="@namehtml"/>
188 </xsl:call-template>
189 </xsl:template>
190
191 <!-- Image hauteur (H) imposee -->
192 <xsl:template match="//imgHsize">
193 <xsl:call-template name="image">
194 <xsl:with-param name="name" select="@namehtml"/>
195 <xsl:with-param name="height" select="@hpdf"/>
196 </xsl:call-template>
197 </xsl:template>
198
199 <!-- Image hauteur (H) et largeur (W) imposees -->
200 <xsl:template match="//imgsize">
201 <xsl:call-template name="image">
202 <xsl:with-param name="name" select="@namehtml"/>
203 <xsl:with-param name="height" select="@hpdf"/>
204 <xsl:with-param name="width" select="@wpdf"/>
205 </xsl:call-template>
206 </xsl:template>
207
208 <!-- Image largeur (W) imposee -->
209 <xsl:template match="//imgWsize">
210 <xsl:call-template name="image">
211 <xsl:with-param name="name" select="@namehtml"/>
212 <xsl:with-param name="width" select="@wpdf"/>
213 </xsl:call-template>
214 </xsl:template>
215
216 <!-- Index des variables dans le document -->
217 <xsl:template match="//index">
218 <a name="{generate-id(.)}"><xsl:apply-templates/></a>
219 </xsl:template>
220
221 <!-- Resumer du contenu de la doc -->
222 <xsl:template match="introduction/intro">
223 <p class="intro"><xsl:apply-templates/></p>
224 <br/><br/><br/><br/><br/>
225 <p class="intro_fixe">
226 Documentation issued and compliant with Avertec Release <xsl:value-of select="$release_num" />.
227 <br/>
228 Please, contact support@avertec.com for any problems relating to this manual.
229 <br/><br/><br/>
230 <xsl:apply-templates select="//legal"/>
231 </p>
232 </xsl:template>
233
234 <!-- elements composants une liste a point -->
235 <xsl:template match="//list/item">
236 <LI><xsl:apply-templates/></LI>
237 </xsl:template>
238
239 <!-- elements composants une liste enumeree -->
240 <xsl:template match="//numlist/item">
241 <LI><xsl:apply-templates/></LI>
242 </xsl:template>
243
244 <!-- mise en forme de tableau -->
245 <xsl:template match="//glossary">
246 <p class="center">
247 <xsl:if test="./row[@type='half']">
248 <TABLE width="90%" cellspacing="1" border="1">
249 <xsl:apply-templates/></TABLE>
250 </xsl:if>
251 <xsl:if test="not(./row[@type='half'])">
252 <TABLE width="90%" cellspacing="20">
253 <xsl:apply-templates/></TABLE>
254 </xsl:if>
255 </p>
256 </xsl:template>
257
258 <!-- fait ressortir un path d'un paragraphe -->
259 <xsl:template match="//path">
260 <p class="path"><xsl:apply-templates/></p>
261 </xsl:template>
262
263 <!-- Information copyright -->
264 <xsl:template match="presentation/legal">
265 <p class="legal"><xsl:apply-templates/></p>
266 </xsl:template>
267
268 <!-- Delimite une liste d'elements par points -->
269 <xsl:template match="//list">
270 <UL class="pnt_list"><xsl:apply-templates/></UL>
271 </xsl:template>
272
273 <!-- TCL API Functions -->
274 <xsl:template match="//functions">
275 <table class="function_tab">
276 <xsl:for-each select="func">
277 <tr><td colspan='2'><p class="func_name"><xsl:apply-templates select="funcname"/></p></td></tr>
278 <tr><td colspan='2'><p class="func_proto"><xsl:apply-templates select="proto"/><br/><br/></p></td></tr>
279 <tr><td></td><td><p class="func_desc"><xsl:apply-templates select="desc"/><br/><br/></p></td></tr>
280 <xsl:for-each select="arg">
281 <tr>
282 <td class="func_argn"><xsl:apply-templates select="argn"/></td>
283 <td class="func_argdef"><xsl:apply-templates select="argdef"/></td>
284 </tr>
285 </xsl:for-each>
286 <tr><td colspan='2'><hr/><br/></td></tr>
287 </xsl:for-each>
288 </table>
289 </xsl:template>
290
291 <!-- Delimite un message d'erreur -->
292 <xsl:template match="//messages">
293 <xsl:choose>
294 <xsl:when test="./err/num = ''">
295 <p>Error messages description not available yet.</p>
296 </xsl:when>
297 <xsl:otherwise>
298 <table class="errmsg_tab">
299 <tr>
300 <td class="errmsg_num">Error Num</td>
301 <td class="errmsg_head">Error Message and description</td>
302 </tr>
303 <tr><td colspan='2'><hr/><br/></td></tr>
304 <xsl:for-each select="err">
305 <xsl:variable name="msg_buf" select="msg"/>
306 <tr>
307 <td class="errmsg_num"><xsl:apply-templates select="lib"/><xsl:apply-templates select="num"/></td>
308 <td class="errmsg_msg">
309 <xsl:for-each select="tokenize(msg,'\\n')">
310 <xsl:for-each select="tokenize(.,'\\t')">&#xA0;&#xA0;&#xA0;&#xA0;
311 <xsl:for-each select="replace(.,'%s','&lt;string&gt;')">
312 <xsl:for-each select="replace(.,'%d','&lt;decimal&gt;')">
313 <xsl:for-each select="replace(.,'%i','&lt;integer&gt;')">
314 <xsl:for-each select="replace(.,'%c','&lt;character&gt;')">
315 <xsl:for-each select="replace(.,'%g','&lt;float&gt;')">
316 <xsl:value-of select="." />
317 </xsl:for-each>
318 </xsl:for-each>
319 </xsl:for-each>
320 </xsl:for-each>
321 </xsl:for-each>
322 </xsl:for-each>
323 <br/>
324 </xsl:for-each>
325 </td>
326 </tr>
327 <tr><td colspan='2'><p class="document"><xsl:apply-templates select="doc"/></p><br/></td></tr>
328 <tr><td colspan='2'><hr/><br/></td></tr>
329 </xsl:for-each>
330 </table>
331 </xsl:otherwise>
332 </xsl:choose>
333 </xsl:template>
334
335 <!-- Delimite une liste d'elements enuemres -->
336 <xsl:template match="//numlist">
337 <OL class="ord_list"><xsl:apply-templates/></OL>
338 </xsl:template>
339
340 <!-- Nom de l'outil associer a la doc -->
341 <xsl:template match="presentation/outil">
342 <p clas="outil"><xsl:apply-templates/></p>
343 </xsl:template>
344
345 <!-- Paragraphe -->
346 <xsl:template match="//d">
347 <p><xsl:apply-templates/></p>
348 </xsl:template>
349
350 <!-- Paragraphe -->
351 <xsl:template match="//p">
352 <p><xsl:apply-templates/></p>
353 </xsl:template>
354
355 <!-- Paragraphe -->
356 <xsl:template match="//br">
357 <br/>
358 </xsl:template>
359
360 <!-- lignes des tableaux 75% -->
361 <xsl:template priority="1" match="//glossary/row[@type='split']">
362 <TR><xsl:apply-templates select="article"/></TR>
363 <TR><TD></TD><xsl:apply-templates select="def"/></TR>
364 </xsl:template>
365
366 <!-- lignes des tableaux 50% -->
367 <xsl:template priority="1" match="//glossary/row[@type='half']">
368 <TR><xsl:apply-templates select="article"/>
369 <xsl:apply-templates select="def"/></TR>
370 </xsl:template>
371
372 <!-- lignes des tableaux par defaut -->
373 <xsl:template match="//row">
374 <TR><xsl:apply-templates/></TR>
375 </xsl:template>
376
377 <!-- Titres et chapitres de la table des matieres -->
378 <xsl:template mode="toc" match="//section/title">
379 <xsl:param name="expand_toc" select="0"/>
380 <xsl:variable name="toc_level" select="../@niv"/>
381 <xsl:variable name="next_level"><xsl:number value="$toc_level + 1"/></xsl:variable>
382 <xsl:variable name="toc_target"><xsl:value-of select="$toc_name"/><xsl:number count="//chapter" level="any"/>.html</xsl:variable>
383 <xsl:variable name="doc_target"><xsl:value-of select="$doc_name"/><xsl:number count="//chapter" level="any"/>.html</xsl:variable>
384 <xsl:if test="$toc_level &lt; 5">
385 <tr align='justify'><td>
386 <xsl:choose>
387 <xsl:when test="$toc_level = 1">
388 <a href="javascript: loadframe('{$toc_target}','toc');loadframe('{$doc_target}#{generate-id(.)}','doc');" class="toc{$toc_level}">
389 <xsl:call-template name="title_num">
390 <xsl:with-param name="level" select="$toc_level"/>
391 <xsl:with-param name="type" select="toc"/>
392 </xsl:call-template>
393 </a>
394 </xsl:when>
395 <xsl:otherwise>
396 <a href="{$doc_target}#{generate-id(.)}" target="doc" class="toc{$toc_level}">
397 <xsl:call-template name="title_num">
398 <xsl:with-param name="level" select="$toc_level"/>
399 <xsl:with-param name="type" select="toc"/>
400 </xsl:call-template>
401 </a>
402 </xsl:otherwise>
403 </xsl:choose>
404 </td></tr>
405 <xsl:if test="$expand_toc = 1">
406 <xsl:apply-templates mode="toc" select="..//section[@niv = $next_level]/title">
407 <xsl:with-param name="expand_toc" select="1"/></xsl:apply-templates>
408 </xsl:if>
409 </xsl:if>
410 </xsl:template>
411
412 <!-- Titres et chapitres du document -->
413 <xsl:template match="section/title">
414 <xsl:variable name="doc_level" select="../@niv"/>
415 <a name="{generate-id(.)}">
416 <xsl:choose>
417 <xsl:when test="$doc_level = 1"><h1><xsl:call-template name="title_num">
418 <xsl:with-param name="level" select="$doc_level"/>
419 <xsl:with-param name="type" select="doc"/></xsl:call-template></h1></xsl:when>
420 <xsl:when test="$doc_level = 2"><h2><xsl:call-template name="title_num">
421 <xsl:with-param name="level" select="$doc_level"/>
422 <xsl:with-param name="type" select="doc"/></xsl:call-template></h2></xsl:when>
423 <xsl:when test="$doc_level = 3"><h3><xsl:call-template name="title_num">
424 <xsl:with-param name="level" select="$doc_level"/>
425 <xsl:with-param name="type" select="doc"/></xsl:call-template></h3></xsl:when>
426 <xsl:when test="$doc_level = 4"><h4><xsl:call-template name="title_num">
427 <xsl:with-param name="level" select="$doc_level"/>
428 <xsl:with-param name="type" select="doc"/></xsl:call-template></h4></xsl:when>
429 </xsl:choose>
430 </a>
431 </xsl:template>
432
433 <!-- titre associer a l'introduction -->
434 <xsl:template match="introduction/titre_intro">
435 <h1 class="titre_intro"><xsl:apply-templates/><hr NOSHADE="any" size='1' width="100%" /></h1>
436 </xsl:template>
437
438 <!-- Fait apparaitre les variables dans une ligne -->
439 <xsl:template match="//var">
440 <i><xsl:apply-templates/></i>
441 </xsl:template>
442
443 <!-- Version de la distrib associer a la doc -->
444 <xsl:template match="presentation/version">
445 <p class="version"><xsl:apply-templates/></p>
446 </xsl:template>
447
448 <!-- ######################################################### -->
449 <!-- # DEFINITIONS DES TEMPLATES DE LA FEUILLE DE STYLE XSLT # -->
450 <!-- ######################################################### -->
451
452 <!-- ######################################################### -->
453 <!-- # TEMPLATES TYPES "FONCTIONS" # -->
454 <!-- ######################################################### -->
455
456 <!-- Index des variables apparaissant en fin de document -->
457 <xsl:template name="alpha_index">
458 <tr><td>
459 <table cellpadding="10" align="center" valign="middle" width="80%">
460 <tr>
461 <xsl:for-each-group select="//index" group-by="substring(.,1,1)">
462 <xsl:sort order="ascending" data-type="text" case-order="upper-first" lang="en" />
463 <td><p class="index"><a href="#{generate-id(.)}">
464 <xsl:call-template name="convert_case">
465 <xsl:with-param name="toconvert" select="substring(.,1,1)"/>
466 </xsl:call-template>
467 </a></p></td>
468 </xsl:for-each-group>
469 </tr>
470 </table>
471 </td></tr>
472 <xsl:for-each-group select="//index" group-by="substring(.,1,1)">
473 <xsl:sort order="ascending" data-type="text" case-order="upper-first" lang="en" />
474 <TR><TD bgcolor="lightgrey">
475 <table width="100%" cellpadding="0" cellspacing="0"><tr>
476 <td width="5%" bgcolor="lightgrey" class="index">
477 <a name="{generate-id(.)}">
478 <xsl:call-template name="convert_case">
479 <xsl:with-param name="toconvert" select="substring(.,1,1)"/>
480 </xsl:call-template>
481 </a>
482 </td>
483 <td width="85%" bgcolor="lightgrey" align="right"><a href="#index_top">Back to Index</a></td>
484 <td width="10%" bgcolor="lightgrey"></td>
485 </tr>
486 </table>
487 </TD></TR>
488 <xsl:for-each select="current-group()">
489 <xsl:sort order="ascending" data-type="text" case-order="upper-first" lang="en" />
490 <xsl:variable name="position_ref"><xsl:number count="//chapter" level="any"/></xsl:variable>
491 <xsl:variable name="doc_target"><xsl:value-of select="$doc_name"/><xsl:value-of select="$position_ref"/>.html</xsl:variable>
492 <xsl:variable name="toc_target"><xsl:value-of select="$toc_name"/><xsl:value-of select="$position_ref"/>.html</xsl:variable>
493 <TR><TD valign="top"><p>
494 <a href="javascript: loadframe('{$toc_target}','toc');loadframe('{$doc_target}#{generate-id(.)}','doc');">
495 <xsl:value-of select="."/>
496 </a>
497 </p></TD></TR>
498 </xsl:for-each>
499 <tr><td><br/></td></tr>
500 </xsl:for-each-group>
501 </xsl:template>
502
503 <xsl:template name="convert_case">
504 <xsl:param name='toconvert' />
505 <xsl:variable name="lower_case">abcdefghijklmnopqrstuvwxyz</xsl:variable>
506 <xsl:variable name="upper_case">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
507 <xsl:choose>
508 <xsl:when test="contains($upper_case,$toconvert)">
509 <xsl:value-of select="translate($toconvert,$upper_case,$lower_case)"/>
510 </xsl:when>
511 <xsl:otherwise>
512 <xsl:value-of select="translate($toconvert,$lower_case,$upper_case)"/>
513 </xsl:otherwise>
514 </xsl:choose>
515 </xsl:template>
516
517 <!-- Feuille de style CSS des fichiers HTML -->
518 <xsl:template name="css">
519 <STYLE TYPE="text/css">
520 h1 {font-family:times; font-size:16pt; font-weight:bold; text-align:left; margin-left:10pt; font-style:normal}
521 h2 {font-family:times; font-size:14pt; font-weight:bold; text-align:left; margin-left:10pt; font-style:normal}
522 h3 {font-family:times; font-size:13pt; font-weight:bold; text-align:left; margin-left:10pt; font-style:normal}
523 h4 {font-family:times; font-size:12pt; font-weight:bold; text-align:left; margin-left:10pt; font-style:normal}
524 p {text-indent:0%; text-align:justify; font-family:times; margin-left:10pt; margin-right:10pt}
525 d {text-indent:10%; text-align:justify; font-family:times; margin-left:10pt; margin-right:10pt}
526
527 .article_split {width:75%; vertical-align:top;}
528 .article_half {width:50%; vertical-align:top;text-align:center}
529 .article_row {width:40%; vertical-align:top;background-color: rgb(255, 245, 245);}
530 .bluecode {text-indent:0%; font-family:times; font-size:10pt; text-align:justify; color:blue}
531 .booktitle {font-family:times; font-size:28pt; text-align:left; font-weight:bold ; text-indent:0%}
532 .code {margin-left:10pt; text-indent:0%; font-family:times; font-size:10pt; text-align:justify}
533 .smallcode {margin-left:10pt; text-indent:0%; font-family:times; font-size:8pt; text-align:justify}
534 .command {font-family:times; font-size:10pt; text-align:justify; font-weight:bold ; margin-left:10%}
535 .date {font-family:times; font-size:10pt; text-align:right}
536 .def_split {text-align:justify; vertical-align:top; width:75%}
537 .def_half {text-align:justify; vertical-align:top; width:75%}
538 .def_row {font-family:times; font-size:8pt;text-align:justify; vertical-align:top; width:60%;background-color: rgb(245, 245, 255);}
539 .document {margin-left:5px; font-size:10pt; text-align:justify}
540 .errmsg_tab {width:75%; vertical-align:top; margin-left: 12%}
541 .errmsg_head {width:80%; vertical-align:top; text-align:center; font-style:italic; font-weight:bold}
542 .errmsg_num {width:20%; vertical-align:top; text-align:center; font-weight:bold }
543 .errmsg_msg {width:80%; vertical-align:top; text-align:justify;font-style:italic}
544 .function_tab {width:80%; vertical-align:top; margin-left:10%}
545 .func_name {font-family:times; font-size:10pt; text-align:left; font-weight:bold; background-color: rgb(245, 245, 245);}
546 .func_proto {font-family:times; font-size:10pt; text-align:left}
547 .func_desc {font-family:times; font-size:10pt; text-align:justify;font-style:italic; color:rgb(51, 153, 153);}
548 .func_argn {width:20%; font-family:courier; vertical-align:top; font-size:8pt; text-align:left;background-color: rgb(255, 245, 245);}
549 .func_argdef {font-family:times; vertical-align:top; font-size:8pt; text-align:left;background-color: rgb(245, 245, 255);}
550 .font {font-family:courier; font-size:8pt}
551 .intro {font-family:times; font-size:10pt; text-indent:10%}
552 .intro_fixe {font-family:times; font-size:10pt; text-align:center; font-weight:bold}
553 .legal {font-family:times; font-size:10pt; text-align:right; font-weight:bold}
554 .ord_list {list-style-type: lower-roman; margin-left: 10%; text-align: justify;}
555 .outil {font-family:times; font-size:10pt; text-align:right; font-weight:bold}
556 .path {font-family:times; font-size:10pt; text-align:center}
557 .pnt_list {list-style-type: square; margin-left: 10%; text-align: justify}
558 .titre_intro {font-family:times; font-size:10pt; text-align:right; font-weight:bold}
559 .version {font-family:times; font-size:20pt; text-align:right; font-weight:bold}
560
561 .center{text-align:center}
562 .index{text-align:center; font-weight:bold}
563 .right{text-align:right}
564 .toc1{margin-left:0pt; font-size:10pt; text-align:left; font-family:times; white-space:nowrap; font-weight:normal}
565 .toc2{margin-left:10pt; font-size:10pt; text-align:left; font-family:times; white-space:nowrap; font-weight:normal}
566 .toc3{margin-left:16pt; font-size:8pt; text-align:left; font-family:times; white-space:nowrap; font-weight:normal}
567 .toc4{margin-left:22pt; font-size:8pt; text-align:left; font-family:times; white-space:nowrap; font-weight:normal}
568 </STYLE>
569 </xsl:template>
570
571 <!-- Entete <HEAD> des fichiers HTML -->
572 <xsl:template name="head">
573 <xsl:param name="filename"><xsl:value-of select="$fichier"/></xsl:param>
574 <xsl:param name="java" select="0"/>
575 <HEAD>
576 <TITLE><xsl:value-of select="//booktitle"/></TITLE>
577 <META name="description" content="The file {$filename}.html is part of the Avertec Documentation Platform {$release_num}"/>
578 <META name="keywords" content="Avertec HiTAS YAGLE {$fichier} guide html documentation"/>
579 <META name="revised" content="Generated from XML : {$date}" />
580 <xsl:call-template name="css"/>
581 <xsl:if test="$java = 1">
582 <script language="JavaScript">
583 &lt;!--
584 function loadframe(url,target)
585 {
586 parent.frames[target].location.href = url;
587 }
588 //--&gt;
589 </script>
590 </xsl:if>
591 </HEAD>
592 </xsl:template>
593
594 <!-- Affichage des images en fonction des attributs disponibles -->
595 <xsl:template name="image">
596 <xsl:param name="name"/>
597 <xsl:param name="width"/>
598 <xsl:param name="height"/>
599 <xsl:variable name="img">imgs/<xsl:value-of select="$name"/></xsl:variable>
600 <center>
601 <xsl:choose>
602 <xsl:when test="not( $width and $height )">
603 <xsl:choose>
604 <xsl:when test="$width">
605 <IMG src="{$img}" width="{$width}"/>
606 </xsl:when>
607 <xsl:when test="$height">
608 <IMG src="{$img}" height="{$height}"/>
609 </xsl:when>
610 <xsl:otherwise>
611 <IMG src="{$img}"/>
612 </xsl:otherwise>
613 </xsl:choose>
614 </xsl:when>
615 <xsl:otherwise>
616 <IMG src="{$img}" width="{$width}" height="{$height}"/>
617 </xsl:otherwise>
618 </xsl:choose>
619 </center>
620 </xsl:template>
621
622 <!-- Numerotation des chapites chapitres -->
623 <xsl:template name="title_num">
624 <xsl:param name="level" select="1"/>
625 <xsl:param name="type" select="doc"/>
626 <xsl:choose>
627 <xsl:when test="$level &lt; 4">
628 <xsl:number count="//section[@niv='1']/title" level="any"/>.
629 <xsl:if test="$level &gt; 1">
630 <xsl:number count="//section[@niv='2']/title" from="//section[@niv='1']" level="any"/>.
631 </xsl:if>
632 <xsl:if test="$level &gt; 2">
633 <xsl:number count="//section[@niv='3']/title" from="//section[@niv='2']" level="any" format="1"/>.
634 </xsl:if>
635 <xsl:if test="$level &gt; 3">
636 <xsl:number count="//section[@niv='4']/title" from="//section[@niv='3']" level="any" format="a"/>.
637 </xsl:if>
638 <xsl:choose>
639 <xsl:when test="$type = toc">
640 <xsl:choose>
641 <xsl:when test="not(./index)"><xsl:apply-templates /></xsl:when>
642 <xsl:otherwise><xsl:value-of select="./index" /></xsl:otherwise>
643 </xsl:choose>
644 </xsl:when>
645 <xsl:otherwise><xsl:value-of select="." /></xsl:otherwise>
646 </xsl:choose>
647 </xsl:when>
648 <xsl:otherwise>
649 <xsl:choose>
650 <xsl:when test="$type = toc">
651 <xsl:choose>
652 <xsl:when test="not(./index)"><xsl:apply-templates /></xsl:when>
653 <xsl:otherwise><xsl:value-of select="./index" /></xsl:otherwise>
654 </xsl:choose>
655 </xsl:when>
656 <xsl:otherwise><xsl:value-of select="." /></xsl:otherwise>
657 </xsl:choose>
658 </xsl:otherwise>
659 </xsl:choose>
660 </xsl:template>
661
662 <!-- ######################################################### -->
663 <!-- # TEMPLATES GENERANT DES FICHIERS HTML # -->
664 <!-- ######################################################### -->
665
666 <!-- Fichiers "*_banner.html" - Banniere de navigation -->
667 <xsl:template name="banner">
668 <xsl:result-document href="file:{$dochtmldir}/{$fichier}_banner.html" format="html">
669 <HTML>
670 <xsl:call-template name="head"><xsl:with-param name="filename"><xsl:value-of select="$banner_name"/></xsl:with-param></xsl:call-template>
671 <BODY bgcolor="white" MARGINWIDTH='0' MARGINHEIGHT='0'>
672 <span style="font-family:times; font-size:10pt;">
673 <TABLE WIDTH="100%" HEIGHT="5%" CELLSPACING="0" CELLPADDING="0" BORDER="0">
674 <tr>
675 <td rowspan="2" width="20%" align="center" valign="top">
676 <xsl:apply-templates select="//presentation/imglogo" />
677 </td>
678 <td colspan="2" width="*">
679 <xsl:apply-templates select="//presentation/booktitle" />
680 </td>
681 <td rowspan="2" width="20%">
682 <br/><br/>
683 <a href="http://www.avertec.com" target="new">website</a><br/>
684 <a href="{$info_name}.html" target="doc">About</a><br/>
685 <a href="{$index_name}.html" target="doc">Index</a>
686 </td>
687 </tr>
688 <tr height="45%">
689 <td width="20%" valign="middle">
690 <FORM name="navform" >
691 <select name="dest" size="1"
692 onChange="parent.location.href=(this.options[this.selectedIndex].value); index=this.options[this.selectedIndex].value;">
693 <OPTION >Choose a User Guide</OPTION>
694 <OPTION >----------------</OPTION>
695 <OPTION VALUE="hitas_user.html">HITAS User Guide</OPTION>
696 <OPTION VALUE="hitas_reference.html">HITAS Reference Guide</OPTION>
697 <OPTION VALUE="yagle_user.html">YAGLE User Guide</OPTION>
698 <OPTION VALUE="yagle_reference.html">YAGLE Reference Guide</OPTION>
699 <OPTION VALUE="gns_user.html">GNS User Guide</OPTION>
700 <OPTION >----------------</OPTION>
701 <OPTION VALUE="../docavertec.html">User Guides Page</OPTION>
702 <OPTION VALUE="faq.html">FAQ Page</OPTION>
703 </select>
704 </FORM>
705 </td>
706 <td valign="middle">
707 <FORM name="navform" >
708 <select name="dest" size="1"
709 onChange="parent.location.href=(this.options[this.selectedIndex].value); index=this.options[this.selectedIndex].value;">
710 <OPTION >Choose a Tutorial</OPTION>
711 <OPTION >----------------</OPTION>
712 <OPTION VALUE="hitas_tutorial.html">HITAS Tutorial</OPTION>
713 <OPTION VALUE="yagle_tutorial.html">YAGLE Tutorial</OPTION>
714 <OPTION >----------------</OPTION>
715 <OPTION VALUE="tutorialavertec.html">Tutorials Page</OPTION>
716 </select>
717 </FORM>
718 </td>
719 </tr>
720 </TABLE>
721 </span>
722 </BODY>
723 </HTML>
724 </xsl:result-document>
725 </xsl:template>
726
727 <!-- Fichiers "*_doc(#num).html" - Correspondants aux chapitres -->
728 <xsl:template name="doc">
729 <xsl:for-each select="//chapter">
730 <xsl:variable name="position_ref"><xsl:number count="//chapter" level="any"/></xsl:variable>
731 <xsl:variable name="doc_filename"><xsl:value-of select="$doc_name"/><xsl:value-of select="$position_ref"/></xsl:variable>
732 <xsl:result-document href="file:{$dochtmldir}/{$doc_filename}.html" format="html">
733 <HTML>
734 <xsl:call-template name="head"><xsl:with-param name="filename"><xsl:value-of select="$doc_filename"/></xsl:with-param></xsl:call-template>
735 <BODY bgcolor="white" MARGINWIDTH='0' MARGINHEIGHT='0'>
736 <span style="font-family:times; font-size:10pt;">
737 <xsl:apply-templates/>
738 </span>
739 </BODY>
740 </HTML>
741 </xsl:result-document>
742 </xsl:for-each>
743 </xsl:template>
744
745 <!-- Fichier "{$fichier}.html" - Frameset -->
746 <xsl:template name="frameset">
747 <xsl:result-document href="file:{$dochtmldir}/{$fichier}.html" format="html">
748 <HTML>
749 <xsl:call-template name="head"><xsl:with-param name="filename"><xsl:value-of select="$fichier"/></xsl:with-param></xsl:call-template>
750 <FRAMESET rows="90,*" border="2" frameborder="2" framespacing="0">
751 <NOFRAMES>
752 <BODY>
753 <P>Sorry but your browser does not support Frame pages.<br/>
754 Be informed that Avertec documentation is also available in PDF format.
755 </P>
756 </BODY>
757 </NOFRAMES>
758 <FRAME SRC="{$fichier}_banner.html" scrolling="no" name="banner"/>
759 <FRAMESET cols="200,*" framespacing="0" border="1" frameborder="2">
760 <FRAME SRC="{$fichier}_toc1.html" name="toc"/>
761 <FRAME SRC="{$fichier}_doc1.html" name="doc"/>
762 </FRAMESET>
763 </FRAMESET>
764 </HTML>
765 </xsl:result-document>
766 </xsl:template>
767
768 <!-- Fichier "*_index.html" - Index des variables -->
769 <xsl:template name="indexfile">
770 <xsl:result-document href="file:{$dochtmldir}/{$index_name}.html" format="html">
771 <HTML>
772 <xsl:call-template name="head">
773 <xsl:with-param name="filename"><xsl:value-of select="$index_name"/></xsl:with-param>
774 <xsl:with-param name="java">1</xsl:with-param>
775 </xsl:call-template>
776 <BODY bgcolor="white" MARGINWIDTH='0' MARGINHEIGHT='0'>
777 <span style="font-family:times; font-size:10pt;">
778 <table width="100%">
779 <tr><td>
780 <h1 class="right">
781 <a name="index_top">Index</a>
782 <hr NOSHADE="any" size='1' width="100%" />
783 </h1>
784 </td></tr>
785 <xsl:if test="//index">
786 <xsl:if test="not(//index/faq)">
787 <xsl:call-template name="alpha_index"/>
788 </xsl:if>
789 <xsl:if test="//index/faq">
790 <p>No index for this document.</p>
791 </xsl:if>
792 </xsl:if>
793 <xsl:if test="not(//index)">
794 <p>No index for this document.</p>
795 </xsl:if>
796 </table>
797 </span>
798 </BODY>
799 </HTML>
800 </xsl:result-document>
801 </xsl:template>
802
803 <!-- Fichier "*_info.html" - Section "About" du document -->
804 <xsl:template name="infofile">
805 <xsl:result-document href="file:{$dochtmldir}/{$info_name}.html" format="html">
806 <HTML>
807 <xsl:call-template name="head">
808 <xsl:with-param name="filename"><xsl:value-of select="$index_name"/></xsl:with-param>
809 </xsl:call-template>
810 <BODY bgcolor="white" MARGINWIDTH='0' MARGINHEIGHT='0'>
811 <span style="font-family:times; font-size:10pt;">
812 <table width="100%">
813 <tr><td>
814 <xsl:apply-templates select="//introduction/titre_intro" />
815 </td></tr>
816 <tr><td>
817 <xsl:apply-templates select="//introduction/intro" />
818 </td></tr>
819 </table>
820 </span>
821 </BODY>
822 </HTML>
823 </xsl:result-document>
824 </xsl:template>
825
826 <!-- Fichiers "*_toc(#num).html" - Table des matieres des fichiers HTML -->
827 <xsl:template name="toc">
828 <xsl:for-each select="//chapter">
829 <xsl:variable name="position_ref"><xsl:number count="//chapter" level="any"/></xsl:variable>
830 <xsl:variable name="toc_filename"><xsl:value-of select="$toc_name"/><xsl:value-of select="$position_ref"/></xsl:variable>
831 <xsl:result-document href="file:{$dochtmldir}/{$toc_filename}.html" format="html">
832 <HTML>
833 <xsl:call-template name="head">
834 <xsl:with-param name="filename"><xsl:value-of select="$toc_filename"/></xsl:with-param>
835 <xsl:with-param name="java">1</xsl:with-param>
836 </xsl:call-template>
837 <BODY bgcolor="white" MARGINWIDTH='0' MARGINHEIGHT='0'>
838 <span style="font-family:times; font-size:10pt;">
839 <table cellpadding='15pt' width="200">
840 <tr><td>
841 <nobr><DIV STYLE="font-family:times; font-size:16pt;text-indent:0pt;align=center"><a name="content">Table of Contents</a></DIV></nobr>
842 </td></tr>
843 </table>
844 <table cellpadding='0'>
845 <xsl:apply-templates mode="toc" select="//chapter/section[@niv=1]/title"><xsl:with-param name="expand_toc" select="0"/></xsl:apply-templates>
846 </table>
847 <table width="200">
848 <tr><td>
849 <hr NOSHADE="any" size='2' width="100%" />
850 <nobr><DIV STYLE="font-family:times; font-size:10pt;text-indent:15pt;font-weight:bold;font-style:italic">
851 Chapter <xsl:number count="//chapter" level="any"/> Subsections
852 </DIV></nobr>
853 <hr NOSHADE="any" size='2' width="100%" />
854 </td></tr>
855 </table>
856 <table>
857 <xsl:apply-templates mode="toc" select="./section[@niv=1]/title"><xsl:with-param name="expand_toc" select="1"/></xsl:apply-templates>
858 </table>
859 </span>
860 </BODY>
861 </HTML>
862 </xsl:result-document>
863 </xsl:for-each>
864 </xsl:template>
865
866 </xsl:stylesheet>