3 <!-- Copyright (C) 2000, HELM Team -->
5 <!-- This file is part of HELM, an Hypertextual, Electronic -->
6 <!-- Library of Mathematics, developed at the Computer Science -->
7 <!-- Department, University of Bologna, Italy. -->
9 <!-- HELM is free software; you can redistribute it and/or -->
10 <!-- modify it under the terms of the GNU General Public License -->
11 <!-- as published by the Free Software Foundation; either version 2 -->
12 <!-- of the License, or (at your option) any later version. -->
14 <!-- HELM is distributed in the hope that it will be useful, -->
15 <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
16 <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
17 <!-- GNU General Public License for more details. -->
19 <!-- You should have received a copy of the GNU General Public License -->
20 <!-- along with HELM; if not, write to the Free Software -->
21 <!-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, -->
22 <!-- MA 02111-1307, USA. -->
24 <!-- For details, see the HELM World-Wide-Web page, -->
25 <!-- http://cs.unibo.it/helm/. -->
27 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
28 xmlns:m="http://www.w3.org/1998/Math/MathML">
30 <!--***********************************************************************-->
31 <!-- From MathML content to HTML -->
32 <!-- HELM Group: Asperti, Padovani, Sacerdoti, Schena, Guidi -->
33 <!--***********************************************************************-->
35 <xsl:param name="CICURI" select="''"/>
36 <xsl:param name="type" select="'standalone'"/>
37 <xsl:param name="UNICODEvsSYMBOL" select="'symbol'"/>
39 <xsl:include href="html_init.xsl"/>
40 <xsl:include href="html_set.xsl"/>
41 <xsl:include href="html_reals.xsl"/>
43 <xsl:variable name="showcast" select="0"/>
45 <!--***********************************************************************-->
46 <!-- HTML Head and Body -->
47 <!--***********************************************************************-->
49 <!-- <xsl:output method="html" encoding="iso-8859-1"/> -->
51 <!-- document needs method="xml" and searches locally for the dtd if -->
52 <!-- doctype-system is specified (the dtd must exist locally for parsing). -->
53 <!-- For having output html must be media-type="html" and for having the -->
54 <!-- correct <br /> you must specify at least the remote dtd by means of -->
55 <!-- doctype-public -->
59 media-type="text/html"
60 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" />
62 <xsl:variable name="framewidth" select="55"/>
64 <xsl:template name="mksymbol-1">
65 <xsl:param name="symbol" select="''"/>
66 <xsl:param name="color" select="''"/>
67 <xsl:param name="size" select="''"/>
69 <xsl:when test="$UNICODEvsSYMBOL = 'symbol'">
70 <xsl:variable name="fontsymbol">
72 <xsl:when test="$symbol = 'forall'">
73 <xsl:value-of select="'"'"/>
75 <xsl:when test="$symbol = 'lambda'">
76 <xsl:value-of select="'l'"/>
78 <xsl:when test="$symbol = 'prod'">
79 <xsl:value-of select="'Õ'"/>
81 <xsl:when test="$symbol = 'arrow'">
82 <xsl:value-of select="'®'"/>
84 <xsl:when test="$symbol = 'RightArrow'">
85 <xsl:value-of select="'Þ'"/>
87 <xsl:when test="$symbol = 'subst'">
88 <xsl:value-of select="'¬'"/>
90 <xsl:when test="$symbol = 'lift' or $symbol = 'lift_with_base'">
91 <xsl:value-of select="'­'"/>
93 <xsl:when test="$symbol = 'beta_red' or $symbol = 'beta_red1'">
94 <xsl:value-of select="'®'"/>
96 <xsl:when test="$symbol = 'beta'">
97 <xsl:value-of select="'b'"/>
99 <xsl:when test="$symbol = 'par_beta_red' or $symbol = 'par_beta_red1'">
100 <xsl:value-of select="'Þ'"/>
102 <xsl:when test="$symbol = 'isomorphic'">
103 <xsl:value-of select="'@'"/>
106 <xsl:text>???</xsl:text>
110 <FONT FACE="symbol" SIZE="{$size}" color="{$color}">
111 <xsl:value-of select="$fontsymbol"/>
115 <xsl:variable name="unicodesymbol">
117 <xsl:when test="$symbol = 'forall'">
118 <xsl:value-of select="'∀'"/>
120 <xsl:when test="$symbol = 'lambda'">
121 <xsl:value-of select="'λ'"/>
123 <xsl:when test="$symbol = 'prod'">
124 <xsl:value-of select="'Π'"/>
126 <xsl:when test="$symbol = 'arrow'">
127 <xsl:value-of select="'→'"/>
129 <xsl:when test="$symbol = 'RightArrow'">
130 <xsl:value-of select="'⇒'"/>
132 <xsl:when test="$symbol = 'subst'">
133 <xsl:value-of select="'←'"/>
135 <xsl:when test="$symbol = 'lift' or $symbol = 'lift_with_base'">
136 <xsl:value-of select="'↑'"/>
138 <xsl:when test="$symbol = 'beta_red' or $symbol = 'beta_red1'">
139 <xsl:value-of select="'→'"/>
141 <xsl:when test="$symbol = 'beta'">
142 <xsl:value-of select="'β'"/>
144 <xsl:when test="$symbol = 'par_beta_red' or $symbol = 'par_beta_red1'">
145 <xsl:value-of select="'⇒'"/>
147 <xsl:when test="$symbol = 'isomorphic'">
148 <xsl:value-of select="'≅'"/>
151 <xsl:text>???</xsl:text>
155 <FONT color="{$color}">
156 <xsl:value-of select="$unicodesymbol"/>
162 <xsl:template match="/">
163 <xsl:param name="current_indent" select="0"/>
165 <xsl:when test="$type = 'standalone'">
168 <title> <xsl:value-of select="$CICURI"/> </title> <!-- FG -->
169 <style> A { text-decoration: none } </style>
171 <xsl:text disable-output-escaping="yes">
173 function Hide(which){
174 if (!document.getElementById)
176 which.style.display="none"
179 function Show(which){
180 if (!document.getElementById)
182 which.style.display=""
185 document.to_be_deleted = new Array();
190 <body bgcolor="white">
191 <xsl:attribute name="onLoad">
192 if(document.getElementById)
193 for(var i=0;i<document.to_be_deleted.length;i++)
194 Hide(document.getElementById(document.to_be_deleted[i]));
196 <xsl:apply-templates>
197 <xsl:with-param name="current_indent" select="0"/>
198 </xsl:apply-templates>
204 <xsl:apply-templates>
205 <xsl:with-param name="current_indent" select="0"/>
206 </xsl:apply-templates>
212 <!--***********************************************************************-->
214 <!--***********************************************************************-->
216 <xsl:template name="make_indent">
217 <xsl:param name="current_indent" select="0"/>
218 <xsl:if test="$current_indent > 0">
219 <xsl:text> </xsl:text>
220 <xsl:call-template name="make_indent">
221 <xsl:with-param name="current_indent" select="$current_indent - 1"/>
226 <!-- Syntactic Sugar -->
227 <xsl:template match="m:type">
228 <xsl:param name="current_indent" select="0"/>
229 <xsl:apply-templates>
230 <xsl:with-param name="current_indent"
231 select="$current_indent"/>
232 </xsl:apply-templates>
235 <xsl:template match="m:condition">
236 <xsl:param name="current_indent" select="0"/>
237 <xsl:apply-templates>
238 <xsl:with-param name="current_indent"
239 select="$current_indent"/>
240 </xsl:apply-templates>
243 <xsl:template match="m:math">
244 <xsl:param name="current_indent" select="0"/>
245 <xsl:apply-templates>
246 <xsl:with-param name="current_indent"
247 select="$current_indent"/>
248 </xsl:apply-templates>
251 <!--*********************************************************************-->
253 <!--*********************************************************************-->
256 <xsl:template mode="inline" match="m:ci">
258 <xsl:when test="boolean(@definitionURL)">
259 <a href="{@definitionURL}">
260 <xsl:apply-templates/>
264 <xsl:value-of select="."/>
271 <xsl:template match="m:apply[m:csymbol]" mode="inline">
272 <xsl:variable name="name">
273 <xsl:value-of select="m:csymbol"/>
275 <xsl:variable name="uri"><xsl:value-of select="*[1]/@definitionURL"/></xsl:variable>
278 <xsl:when test="$name='forall'">
279 <xsl:call-template name="mksymbol-1">
280 <xsl:with-param name="symbol" select="$name"/>
281 <xsl:with-param name="color" select="'blue'"/>
282 <xsl:with-param name="size" select="'+2'"/>
284 <xsl:apply-templates select="m:bvar/m:ci"/>
285 <xsl:text>:</xsl:text>
286 <xsl:apply-templates mode="inline" select="m:bvar/m:type"/>
287 <xsl:text>.</xsl:text>
288 <xsl:apply-templates mode="inline" select="*[position()=3]"/>
290 <xsl:when test="$name='prod'">
291 <xsl:call-template name="mksymbol-1">
292 <xsl:with-param name="symbol" select="$name"/>
293 <xsl:with-param name="color" select="'blue'"/>
294 <xsl:with-param name="size" select="'+2'"/>
296 <xsl:apply-templates mode="inline" select="m:bvar/m:ci"/>
297 <xsl:text>:</xsl:text>
298 <xsl:apply-templates mode="inline" select="m:bvar/m:type"/>
299 <xsl:text>.</xsl:text>
300 <xsl:apply-templates mode="inline" select="*[position()=3]"/>
303 <xsl:when test="$name='arrow'">
304 <xsl:text>(</xsl:text>
305 <xsl:apply-templates mode="inline" select="*[position()=2]"/>
306 <xsl:call-template name="mksymbol-1">
307 <xsl:with-param name="symbol" select="$name"/>
308 <xsl:with-param name="color" select="'blue'"/>
309 <xsl:with-param name="size" select="'+0'"/>
311 <xsl:apply-templates mode="inline" select="*[position()=3]"/>
312 <xsl:text>)</xsl:text>
315 <xsl:when test="$name='app'">
316 <xsl:text>(</xsl:text>
317 <xsl:apply-templates mode="inline" select="*[position()=2]"/>
318 <xsl:for-each select="*[position()>2]">
319 <xsl:text> </xsl:text>
320 <xsl:apply-templates mode="inline" select="."/>
322 <xsl:text>)</xsl:text>
325 <xsl:when test="$name='cast'">
326 <xsl:text>(</xsl:text>
327 <xsl:apply-templates mode="inline" select="*[position()=2]"/>
328 <xsl:text>:></xsl:text>
329 <xsl:apply-templates mode="inline" select="*[position()=3]"/>
330 <xsl:text>)</xsl:text>
332 <xsl:when test="$name='Prop'">
333 <FONT color="violet">Prop</FONT>
335 <xsl:when test="$name='Set'">
336 <FONT color="violet">Set</FONT>
338 <xsl:when test="$name='Type'">
339 <FONT color="violet">Type</FONT>
342 <xsl:when test="$name='mutcase'">
343 <xsl:text><</xsl:text>
344 <xsl:apply-templates mode="inline" select="*[position()=2]"/>
345 <xsl:text>> </xsl:text>
346 <FONT color="red">CASE </FONT>
347 <xsl:apply-templates mode="inline" select="*[position()=3]"/>
348 <FONT color="red"> OF </FONT>
349 <xsl:for-each select="piecewise/piece">
350 <!--<xsl:for-each select="*[position() mod 2 = 0 and position()>3]">-->
352 <xsl:when test="not(position() = 1)">
353 <xsl:text> | </xsl:text>
356 <xsl:apply-templates mode="inline" select="./*[2]"/>
357 <xsl:call-template name="mksymbol-1">
358 <xsl:with-param name="symbol" select="'RightArrow'"/>
359 <xsl:with-param name="color" select="'green'"/>
360 <xsl:with-param name="size" select="'+0'"/>
362 <xsl:apply-templates mode="inline"
367 <xsl:when test="$name='fix'">
368 <FONT color="red">FIX</FONT>
369 <xsl:value-of select="m:ci"/>
370 <xsl:text>{</xsl:text>
371 <xsl:for-each select="m:bvar">
372 <xsl:value-of select="m:ci"/>
373 <xsl:text>:</xsl:text>
374 <xsl:apply-templates mode="inline" select="m:type"/>
375 <xsl:text>:=</xsl:text>
376 <xsl:apply-templates mode="inline"
377 select="following-sibling::*[position() = 1]"/>
379 <xsl:when test="position()=last()">
380 <xsl:text>}</xsl:text>
383 <xsl:text>;</xsl:text>
389 <xsl:when test="$name='cofix'">
390 <xsl:text>COFIX</xsl:text>
391 <xsl:value-of select="m:ci"/>
392 <xsl:text>{</xsl:text>
393 <xsl:for-each select="m:bvar">
394 <xsl:value-of select="m:ci"/>
395 <xsl:text>:</xsl:text>
396 <xsl:apply-templates mode="inline" select="m:type"/>
397 <xsl:text>:=</xsl:text>
398 <xsl:apply-templates mode="inline"
399 select="following-sibling::*[position() = 1]"/>
401 <xsl:when test="position()=last()">
402 <xsl:text>}</xsl:text>
405 <xsl:text>;</xsl:text>
411 <xsl:when test="$name='proof' or $name='side_proof'">
412 <xsl:apply-templates mode="inline" select="*[position()=2]"/>
413 <FONT color="red"> proves </FONT>
414 <xsl:apply-templates mode="inline" select="*[position()=3]"/>
416 <xsl:when test="$name='letin1'">
417 <xsl:text>letin1 (inline error)</xsl:text>
420 <xsl:when test="$name='false_ind'">
421 <xsl:apply-templates mode="inline" select="*[3]"/>
422 <FONT color="red">Contradiction.</FONT>
425 <xsl:when test="$name='and_ind'">
426 <FONT color="red">From </FONT>
427 <xsl:apply-templates select="*[2]"/>
428 <FONT color="red"> we get</FONT>
430 <xsl:apply-templates select="*[3]"/>
432 <xsl:apply-templates mode="inline" select="*[4]"/>
433 <FONT color="red"> and </FONT>
435 <xsl:apply-templates select="*[5]"/>
437 <xsl:apply-templates mode="inline" select="*[6]"/>
439 <FONT color="red"> hence </FONT>
440 <xsl:apply-templates mode="inline" select="*[7]"/>
443 <xsl:when test="$name='subst'">
444 <xsl:apply-templates select="*[3]" mode="inline"/>
445 <xsl:text>[</xsl:text>
446 <xsl:apply-templates select="*[4]" mode="inline"/>
448 <xsl:when test="$uri != ''">
450 <xsl:call-template name="mksymbol-1">
451 <xsl:with-param name="symbol" select="$name"/>
452 <xsl:with-param name="color" select="'green'"/>
453 <xsl:with-param name="size" select="'+0'"/>
458 <xsl:call-template name="mksymbol-1">
459 <xsl:with-param name="symbol" select="$name"/>
460 <xsl:with-param name="color" select="'green'"/>
461 <xsl:with-param name="size" select="'+0'"/>
465 <xsl:apply-templates select="*[2]" mode="inline"/>
466 <xsl:text>]</xsl:text>
469 <xsl:when test="$name='lift_with_base'">
471 <xsl:apply-templates select="*[3]" mode="inline"/>
474 <xsl:when test="$uri != ''">
476 <xsl:call-template name="mksymbol-1">
477 <xsl:with-param name="symbol" select="$name"/>
478 <xsl:with-param name="color" select="'green'"/>
479 <xsl:with-param name="size" select="'+0'"/>
484 <xsl:call-template name="mksymbol-1">
485 <xsl:with-param name="symbol" select="$name"/>
486 <xsl:with-param name="color" select="'green'"/>
487 <xsl:with-param name="size" select="'+0'"/>
492 <xsl:apply-templates select="*[4]" mode="inline"/>
494 <xsl:text>(</xsl:text>
495 <xsl:apply-templates select="*[2]" mode="inline"/>
496 <xsl:text>)</xsl:text>
499 <xsl:when test="$name='lift'">
501 <xsl:when test="$uri != ''">
503 <xsl:call-template name="mksymbol-1">
504 <xsl:with-param name="symbol" select="$name"/>
505 <xsl:with-param name="color" select="'green'"/>
506 <xsl:with-param name="size" select="'+0'"/>
511 <xsl:call-template name="mksymbol-1">
512 <xsl:with-param name="symbol" select="$name"/>
513 <xsl:with-param name="color" select="'green'"/>
514 <xsl:with-param name="size" select="'+0'"/>
519 <xsl:apply-templates select="*[2]" mode="inline"/>
521 <xsl:text>(</xsl:text>
522 <xsl:apply-templates select="*[3]" mode="inline"/>
523 <xsl:text>)</xsl:text>
527 <xsl:when test="$name='beta_red1'">
528 <xsl:apply-templates select="*[2]" mode="inline"/>
530 <xsl:when test="$uri != ''">
532 <xsl:call-template name="mksymbol-1">
533 <xsl:with-param name="symbol" select="$name"/>
534 <xsl:with-param name="color" select="'green'"/>
535 <xsl:with-param name="size" select="'+0'"/>
538 <xsl:call-template name="mksymbol-1">
539 <xsl:with-param name="symbol" select="'beta'"/>
540 <xsl:with-param name="color" select="'green'"/>
541 <xsl:with-param name="size" select="'+0'"/>
547 <xsl:call-template name="mksymbol-1">
548 <xsl:with-param name="symbol" select="$name"/>
549 <xsl:with-param name="color" select="'green'"/>
550 <xsl:with-param name="size" select="'+0'"/>
553 <xsl:call-template name="mksymbol-1">
554 <xsl:with-param name="symbol" select="'beta'"/>
555 <xsl:with-param name="color" select="'green'"/>
556 <xsl:with-param name="size" select="'+0'"/>
561 <xsl:apply-templates select="*[3]" mode="inline"/>
564 <xsl:when test="$name='beta_red'">
565 <xsl:apply-templates select="*[2]" mode="inline"/>
567 <xsl:when test="$uri != ''">
569 <xsl:call-template name="mksymbol-1">
570 <xsl:with-param name="symbol" select="$name"/>
571 <xsl:with-param name="color" select="'green'"/>
572 <xsl:with-param name="size" select="'+0'"/>
575 <xsl:call-template name="mksymbol-1">
576 <xsl:with-param name="symbol" select="'beta'"/>
577 <xsl:with-param name="color" select="'green'"/>
578 <xsl:with-param name="size" select="'+0'"/>
580 <xsl:text>*</xsl:text>
585 <xsl:call-template name="mksymbol-1">
586 <xsl:with-param name="symbol" select="$name"/>
587 <xsl:with-param name="color" select="'green'"/>
588 <xsl:with-param name="size" select="'+0'"/>
591 <xsl:call-template name="mksymbol-1">
592 <xsl:with-param name="symbol" select="'beta'"/>
593 <xsl:with-param name="color" select="'green'"/>
594 <xsl:with-param name="size" select="'+0'"/>
596 <xsl:text>*</xsl:text>
600 <xsl:apply-templates select="*[3]" mode="inline"/>
603 <xsl:when test="$name='par_beta_red1'">
604 <xsl:apply-templates select="*[2]" mode="inline"/>
606 <xsl:when test="$uri != ''">
608 <xsl:call-template name="mksymbol-1">
609 <xsl:with-param name="symbol" select="$name"/>
610 <xsl:with-param name="color" select="'green'"/>
611 <xsl:with-param name="size" select="'+0'"/>
614 <xsl:call-template name="mksymbol-1">
615 <xsl:with-param name="symbol" select="'beta'"/>
616 <xsl:with-param name="color" select="'green'"/>
617 <xsl:with-param name="size" select="'+0'"/>
623 <xsl:call-template name="mksymbol-1">
624 <xsl:with-param name="symbol" select="$name"/>
625 <xsl:with-param name="color" select="'green'"/>
626 <xsl:with-param name="size" select="'+0'"/>
629 <xsl:call-template name="mksymbol-1">
630 <xsl:with-param name="symbol" select="'beta'"/>
631 <xsl:with-param name="color" select="'green'"/>
632 <xsl:with-param name="size" select="'+0'"/>
637 <xsl:apply-templates select="*[3]" mode="inline"/>
640 <xsl:when test="$name='par_beta_red'">
641 <xsl:apply-templates select="*[2]" mode="inline"/>
643 <xsl:when test="$uri != ''">
645 <xsl:call-template name="mksymbol-1">
646 <xsl:with-param name="symbol" select="$name"/>
647 <xsl:with-param name="color" select="'green'"/>
648 <xsl:with-param name="size" select="'+0'"/>
651 <xsl:call-template name="mksymbol-1">
652 <xsl:with-param name="symbol" select="'beta'"/>
653 <xsl:with-param name="color" select="'green'"/>
654 <xsl:with-param name="size" select="'+0'"/>
656 <xsl:text>*</xsl:text>
661 <xsl:call-template name="mksymbol-1">
662 <xsl:with-param name="symbol" select="$name"/>
663 <xsl:with-param name="color" select="'green'"/>
664 <xsl:with-param name="size" select="'+0'"/>
667 <xsl:call-template name="mksymbol-1">
668 <xsl:with-param name="symbol" select="'beta'"/>
669 <xsl:with-param name="color" select="'green'"/>
670 <xsl:with-param name="size" select="'+0'"/>
672 <xsl:text>*</xsl:text>
676 <xsl:apply-templates select="*[3]" mode="inline"/>
680 <xsl:when test="$name='forgetful'">
682 <xsl:when test="$uri != ''">
683 <a href="{$uri}">|</a>
689 <xsl:apply-templates select="*[2]" mode="inline"/>
691 <xsl:when test="$uri != ''">
692 <a href="{$uri}">|</a>
700 <!-- boolean algebra of redexes -->
703 <xsl:when test="$name='isomorphic'">
704 <xsl:apply-templates select="*[2]" mode="inline"/>
706 <xsl:when test="$uri != ''">
708 <xsl:call-template name="mksymbol-1">
709 <xsl:with-param name="symbol" select="$name"/>
710 <xsl:with-param name="color" select="'green'"/>
711 <xsl:with-param name="size" select="'+0'"/>
716 <xsl:call-template name="mksymbol-1">
717 <xsl:with-param name="symbol" select="$name"/>
718 <xsl:with-param name="color" select="'green'"/>
719 <xsl:with-param name="size" select="'+0'"/>
723 <xsl:apply-templates select="*[3]" mode="inline"/>
727 <xsl:when test="$name='interp'">
728 <font color="green">[</font>
729 <xsl:apply-templates select="*[2]"/>
730 <font color="green">]</font>
736 <xsl:template mode="inline" match="m:lambda">
737 <xsl:call-template name="mksymbol-1">
738 <xsl:with-param name="symbol" select="'lambda'"/>
739 <xsl:with-param name="color" select="'red'"/>
740 <xsl:with-param name="size" select="'+2'"/>
742 <xsl:apply-templates select="m:bvar/m:ci"/>
743 <xsl:text>:</xsl:text>
744 <xsl:apply-templates mode="inline" select="m:bvar/m:type"/>
745 <xsl:text>.</xsl:text>
746 <xsl:apply-templates mode="inline" select="*[position()=2]"/>
749 <!--*********************************************************************-->
750 <!-- COUNTING MODE -->
751 <!--*********************************************************************-->
753 <xsl:template match="m:apply[m:csymbol]">
754 <xsl:param name="current_indent" select="0"/>
755 <xsl:param name="width" select="$framewidth"/>
756 <xsl:variable name="name">
757 <xsl:value-of select="m:csymbol"/>
759 <xsl:variable name="charlength">
760 <xsl:apply-templates select="m:csymbol" mode="charcount"/>
762 <!-- <xsl:value-of select="$current_indent"/> -->
763 <!-- <xsl:value-of select="$charlength"/> -->
764 <xsl:variable name="uri"><xsl:value-of select="*[1]/@definitionURL"/></xsl:variable>
767 <xsl:when test="$name='forall'">
769 <xsl:when test="$charlength > $framewidth">
771 <xsl:call-template name="mksymbol-1">
772 <xsl:with-param name="symbol" select="$name"/>
773 <xsl:with-param name="color" select="'blue'"/>
774 <xsl:with-param name="size" select="'+2'"/>
776 <xsl:apply-templates select="m:bvar/m:ci"/>
777 <xsl:text>:</xsl:text>
778 <xsl:apply-templates select="m:bvar/m:type">
779 <xsl:with-param name="current_indent"
780 select="$current_indent + 5 + 2*string-length(m:bvar/m:ci)"/>
781 </xsl:apply-templates>
783 <xsl:call-template name="make_indent">
784 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
786 <xsl:text>.</xsl:text>
787 <xsl:apply-templates select="*[position()=3]">
788 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
789 </xsl:apply-templates>
792 <xsl:apply-templates mode="inline" select="."/>
797 <xsl:when test="$name='prod'">
799 <xsl:when test="$charlength > $framewidth">
800 <xsl:call-template name="mksymbol-1">
801 <xsl:with-param name="symbol" select="$name"/>
802 <xsl:with-param name="color" select="'blue'"/>
803 <xsl:with-param name="size" select="'+2'"/>
805 <xsl:apply-templates select="m:bvar/m:ci"/>
806 <xsl:text>:</xsl:text>
807 <xsl:apply-templates select="m:bvar/m:type">
808 <xsl:with-param name="current_indent"
809 select="$current_indent + 5 + 2*string-length(m:bvar/m:ci)"/>
810 </xsl:apply-templates><br/>
811 <xsl:call-template name="make_indent">
812 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
814 <xsl:text>.</xsl:text>
815 <xsl:apply-templates select="*[position()=3]">
816 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
817 </xsl:apply-templates>
820 <xsl:apply-templates mode="inline" select="."/>
825 <xsl:when test="$name='arrow'">
827 <xsl:when test="$charlength > $framewidth">
828 <xsl:text>(</xsl:text>
829 <xsl:apply-templates select="*[position()=2]">
830 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
831 </xsl:apply-templates>
833 <xsl:call-template name="make_indent">
834 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
837 <xsl:call-template name="mksymbol-1">
838 <xsl:with-param name="symbol" select="$name"/>
839 <xsl:with-param name="color" select="'blue'"/>
840 <xsl:with-param name="size" select="'+0'"/>
842 <xsl:apply-templates select="*[position()=3]">
843 <xsl:with-param name="current_indent" select="$current_indent + 5"/>
844 </xsl:apply-templates>
845 <xsl:text>)</xsl:text>
848 <xsl:apply-templates mode="inline" select="."/>
853 <xsl:when test="$name='app'">
855 <xsl:when test="$charlength > $framewidth">
856 <xsl:text>(</xsl:text>
857 <xsl:apply-templates select="*[position()=2]">
858 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
859 </xsl:apply-templates>
860 <xsl:for-each select="*[position()>2]">
862 <xsl:call-template name="make_indent">
863 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
865 <xsl:apply-templates select=".">
866 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
867 </xsl:apply-templates>
869 <xsl:text>)</xsl:text>
872 <xsl:apply-templates mode="inline" select="."/>
876 <xsl:when test="$name='cast'">
878 <xsl:when test="$showcast = 1">
880 <xsl:when test="$charlength > $framewidth">
881 <xsl:text>(</xsl:text>
882 <xsl:apply-templates select="*[position()=2]">
883 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
884 </xsl:apply-templates><br/>
885 <xsl:call-template name="make_indent">
886 <xsl:with-param name="current_indent" select="$current_indent + 2"/> </xsl:call-template>
887 <xsl:text>:></xsl:text>
888 <xsl:apply-templates select="*[position()=3]">
889 <xsl:with-param name="current_indent" select="$current_indent + 3"/>
890 </xsl:apply-templates>
891 <xsl:text>)</xsl:text>
894 <xsl:apply-templates mode="inline" select="."/>
899 <xsl:apply-templates select="*[position()=2]">
900 <xsl:with-param name="current_indent" select="$current_indent"/>
901 </xsl:apply-templates>
905 <xsl:when test="$name='Prop'">
906 <xsl:text>Prop</xsl:text>
908 <xsl:when test="$name='Set'">
909 <xsl:text>Set</xsl:text>
911 <xsl:when test="$name='Type'">
912 <xsl:text>Type</xsl:text>
914 <xsl:when test="$name='mutcase'">
916 <xsl:when test="$charlength > $framewidth">
917 <xsl:text><</xsl:text>
918 <xsl:apply-templates select="*[position()=2]">
919 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
920 </xsl:apply-templates>
921 <xsl:text>> </xsl:text>
923 <xsl:call-template name="make_indent">
924 <xsl:with-param name="current_indent" select="$current_indent + 2"/> </xsl:call-template>
925 <xsl:text>CASE </xsl:text>
926 <xsl:apply-templates select="*[position()=3]">
927 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
928 </xsl:apply-templates>
929 <xsl:text> OF </xsl:text>
930 <xsl:for-each select="piecewise/piece">
931 <!-- <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">-->
933 <xsl:call-template name="make_indent">
934 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
937 <xsl:when test="position() = 1">
938 <xsl:text>  </xsl:text>
941 <xsl:text>| </xsl:text>
944 <xsl:apply-templates select="./*[2]"/>
945 <xsl:call-template name="mksymbol-1">
946 <xsl:with-param name="symbol" select="'RightArrow'"/>
947 <xsl:with-param name="color" select="'green'"/>
948 <xsl:with-param name="size" select="'+0'"/>
950 <xsl:variable name="body_size">
952 select="./*[1]/*[1]" mode="charcount"/>
955 <xsl:when test="$body_size > $framewidth">
957 <xsl:call-template name="make_indent">
958 <xsl:with-param name="current_indent"
959 select="$current_indent + 8"/>
963 <xsl:with-param name="current_indent"
964 select="$current_indent + 8"/>
965 </xsl:apply-templates>
968 <xsl:apply-templates select="./*[1]"
975 <xsl:apply-templates mode="inline" select="."/>
980 <xsl:when test="$name='fix'">
982 <xsl:when test="$charlength > $framewidth">
983 <xsl:text>FIX</xsl:text>
984 <xsl:value-of select="m:ci"/>
985 <xsl:text>{</xsl:text>
986 <xsl:for-each select="m:bvar">
988 <xsl:call-template name="make_indent">
989 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
991 <xsl:value-of select="m:ci"/>
992 <xsl:text>:</xsl:text>
993 <xsl:apply-templates select="m:type">
994 <xsl:with-param name="current_indent"
995 select="$current_indent + 5 + string-length(m:ci)"/>
996 </xsl:apply-templates>
998 <xsl:call-template name="make_indent">
999 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
1000 </xsl:call-template>
1001 <xsl:text>:=</xsl:text>
1002 <xsl:apply-templates select="following-sibling::*[position() = 1]">
1003 <xsl:with-param name="current_indent" select="$current_indent +2"/>
1004 </xsl:apply-templates>
1007 <xsl:call-template name="make_indent">
1008 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
1009 </xsl:call-template>
1010 <xsl:text>}</xsl:text>
1013 <xsl:apply-templates mode="inline" select="."/>
1018 <xsl:when test="$name='cofix'">
1020 <xsl:when test="($charlength + 10) > $framewidth">
1021 <xsl:text>COFIX</xsl:text>
1022 <xsl:value-of select="m:ci"/>
1023 <xsl:text>{</xsl:text>
1025 <xsl:call-template name="make_indent">
1026 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
1027 </xsl:call-template>
1028 <xsl:for-each select="m:bvar">
1029 <xsl:value-of select="m:ci"/>
1030 <xsl:text>:</xsl:text>
1031 <xsl:apply-templates select="m:type">
1032 <xsl:with-param name="current_indent"
1033 select="$current_indent + 5 + string-length(m:ci)"/>
1034 </xsl:apply-templates>
1036 <xsl:call-template name="make_indent">
1037 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
1038 </xsl:call-template>
1039 <xsl:text>:=</xsl:text>
1040 <xsl:apply-templates select="following-sibling::*[position() = 1]">
1041 <xsl:with-param name="current_indent" select="$current_indent + 3"/>
1042 </xsl:apply-templates>
1046 <xsl:call-template name="make_indent">
1047 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
1048 </xsl:call-template>
1049 <xsl:text>}</xsl:text>
1052 <xsl:apply-templates mode="inline" select="m:type"/>
1056 <xsl:when test="$name='let_in'">
1057 <xsl:text>let </xsl:text>
1058 <xsl:apply-templates select="m:bvar/m:ci"/>
1059 <xsl:text> := </xsl:text>
1060 <xsl:apply-templates select="*[3]">
1061 <xsl:with-param name="current_indent" select="$current_indent+14"/>
1062 </xsl:apply-templates>
1064 <xsl:call-template name="make_indent">
1065 <xsl:with-param name="current_indent" select="$current_indent"/>
1066 </xsl:call-template>
1067 <xsl:text>in </xsl:text>
1068 <xsl:apply-templates select="*[4]">
1069 <xsl:with-param name="current_indent" select="$current_indent+5"/>
1070 </xsl:apply-templates>
1073 <!-- ***************************************** -->
1074 <!-- *********** PROOF ELEMENTS ************** -->
1075 <!-- ***************************************** -->
1077 <xsl:when test="$name='proof'">
1078 <xsl:variable name="nonce" select="generate-id()"/>
1079 <xsl:variable name="freshid1" select="concat('a',$nonce)"/>
1080 <xsl:variable name="freshid2" select="concat('b',$nonce)"/>
1081 <xsl:variable name="freshid3" select="concat('c',$nonce)"/>
1082 <span ID="{$freshid1}">
1083 <xsl:apply-templates select="*[position()=2]">
1084 <xsl:with-param name="current_indent" select="$current_indent"/>
1085 </xsl:apply-templates>
1089 <xsl:when test="(preceding-sibling::*[1]/text()='letin1') or
1090 (preceding-sibling::*[1]/text()='rw_step') or
1091 (name(..)='m:lambda')">
1093 <xsl:call-template name="make_indent">
1094 <xsl:with-param name="current_indent" select="$current_indent"/>
1095 </xsl:call-template>
1096 <FONT color="red">we proved </FONT>
1100 if(document.getElementById) {
1102 <span ID="{$freshid2}">\
1103 <a style="text-decoration:underline ; color:green" href="" onClick="Show(document.getElementById(\'{$freshid1}\')); Hide(document.getElementById(\'{$freshid2}\'));Show(document.getElementById(\'{$freshid3}\'));return (0==1);">Proof of</a>\
1105 <span ID="{$freshid3}">\
1107 <xsl:call-template name="make_indent">
1108 <xsl:with-param name="current_indent" select="$current_indent"/>
1109 </xsl:call-template>\
1110 <a style="text-decoration:underline ; color:red" href="" onClick="Hide(document.getElementById(\'{$freshid1}\')); Show(document.getElementById(\'{$freshid2}\'));Hide(document.getElementById(\'{$freshid3}\'));return (0==1);">we proved</a>\
1113 document.to_be_deleted.push('<xsl:value-of select="$freshid1"/>');
1114 document.to_be_deleted.push('<xsl:value-of select="$freshid3"/>');
1115 document.write(' ');
1119 <xsl:call-template name="make_indent">
1120 <xsl:with-param name="current_indent" select="$current_indent"/>
1121 </xsl:call-template>\
1122 <FONT color="red">we proved </FONT>\
1128 <xsl:apply-templates select="*[position()=3]">
1129 <xsl:with-param name="current_indent" select="$current_indent + 16"/>
1130 </xsl:apply-templates>
1133 <xsl:when test="$name='side_proof'">
1134 <xsl:variable name="nonce" select="generate-id()"/>
1135 <xsl:variable name="freshid1" select="concat('a',$nonce)"/>
1136 <xsl:variable name="freshid2" select="concat('b',$nonce)"/>
1137 <xsl:variable name="freshid3" select="concat('c',$nonce)"/>
1138 <xsl:variable name="freshid4" select="concat('d',$nonce)"/>
1139 <span ID="{$freshid1}">
1140 <xsl:apply-templates select="*[position()=2]">
1141 <xsl:with-param name="current_indent" select="$current_indent"/>
1142 </xsl:apply-templates>
1146 if(document.getElementById) {
1148 <span ID="{$freshid2}">\
1149 <a style="text-decoration:underline ; color:green" href="" onClick="Show(document.getElementById(\'{$freshid1}\')); Hide(document.getElementById(\'{$freshid2}\'));Show(document.getElementById(\'{$freshid3}\'));Show(document.getElementById(\'{$freshid4}\'));return (0==1);">Justification</a>\
1151 <span ID="{$freshid3}">\
1153 <xsl:call-template name="make_indent">
1154 <xsl:with-param name="current_indent" select="$current_indent"/>
1155 </xsl:call-template>\
1156 <a style="text-decoration:underline ; color:red" href="" onClick="Hide(document.getElementById(\'{$freshid1}\')); Show(document.getElementById(\'{$freshid2}\'));Hide(document.getElementById(\'{$freshid3}\'));Hide(document.getElementById(\'{$freshid4}\'));return (0==1);">we proved</a>\
1159 document.to_be_deleted.push('<xsl:value-of select="$freshid1"/>');
1160 document.to_be_deleted.push('<xsl:value-of select="$freshid3"/>');
1161 document.to_be_deleted.push('<xsl:value-of select="$freshid4"/>');
1162 document.write(' ');
1166 <xsl:call-template name="make_indent">
1167 <xsl:with-param name="current_indent" select="$current_indent"/>
1168 </xsl:call-template>\
1169 <FONT color="red">we proved </FONT>\
1173 <span ID="{$freshid4}">
1174 <xsl:apply-templates select="*[position()=3]">
1175 <xsl:with-param name="current_indent" select="$current_indent + 16"/>
1176 </xsl:apply-templates>
1180 <xsl:when test="$name='eq_chain'">
1181 <FONT color="red">We have the following equality chain:</FONT>
1182 <xsl:for-each select="*[position() mod 2 = 0]">
1183 <xsl:variable name="pos" select="position()"/>
1185 <xsl:call-template name="make_indent">
1186 <xsl:with-param name="current_indent" select="$current_indent + 5"/>
1187 </xsl:call-template>
1189 <xsl:when test="$pos=1">
1190 <xsl:apply-templates select=".">
1191 <xsl:with-param name="current_indent" select="$current_indent + 5"/>
1192 </xsl:apply-templates>
1193 <xsl:text> =</xsl:text>
1196 <xsl:text>= </xsl:text>
1197 <xsl:apply-templates select=".">
1198 <xsl:with-param name="current_indent" select="$current_indent + 5"/>
1199 </xsl:apply-templates>
1202 <xsl:if test="$pos != last()">
1204 <xsl:call-template name="make_indent">
1205 <xsl:with-param name="current_indent" select="$current_indent + 15"/>
1206 </xsl:call-template>
1207 <xsl:apply-templates select="../*[position()=2*$pos +1]">
1208 <xsl:with-param name="current_indent" select="$current_indent + 15"/>
1209 </xsl:apply-templates>
1213 <!-- diseq_chain -->
1214 <xsl:when test="$name='diseq_chain'">
1215 <FONT color="red">We have the following chain of disequalities:</FONT>
1216 <xsl:for-each select="*[position() mod 3 = 2]">
1217 <xsl:variable name="pos" select="position()"/>
1219 <xsl:call-template name="make_indent">
1220 <xsl:with-param name="current_indent" select="$current_indent + 5"/>
1221 </xsl:call-template>
1223 <xsl:when test="$pos=1">
1224 <xsl:apply-templates select=".">
1225 <xsl:with-param name="current_indent" select="$current_indent + 5"/>
1226 </xsl:apply-templates>
1227 <xsl:text> </xsl:text>
1228 <xsl:apply-templates mode="inline" select="../*[position()=3*$pos]"/>
1231 <xsl:apply-templates mode="inline" select="../*[position()=3*($pos - 1)]"/>
1232 <xsl:text> </xsl:text>
1233 <xsl:apply-templates select=".">
1234 <xsl:with-param name="current_indent" select="$current_indent + 5"/>
1235 </xsl:apply-templates>
1238 <xsl:if test="$pos != last()">
1240 <xsl:call-template name="make_indent">
1241 <xsl:with-param name="current_indent" select="$current_indent + 15"/>
1242 </xsl:call-template>
1243 <xsl:apply-templates select="../*[position()=3*$pos +1]">
1244 <xsl:with-param name="current_indent" select="$current_indent + 15"/>
1245 </xsl:apply-templates>
1250 <xsl:when test="$name='letin1'">
1251 <xsl:apply-templates select="*[position()=2]">
1252 <xsl:with-param name="current_indent" select="$current_indent"/>
1253 </xsl:apply-templates>
1255 <xsl:call-template name="make_indent">
1256 <xsl:with-param name="current_indent" select="$current_indent"/>
1257 </xsl:call-template>
1258 <xsl:apply-templates select="*[position()=3]">
1259 <xsl:with-param name="current_indent" select="$current_indent"/>
1260 </xsl:apply-templates>
1263 <xsl:when test="$name='letin'">
1264 <xsl:for-each select="*[position()>1 and last()>position()]">
1265 <xsl:apply-templates select=".">
1266 <xsl:with-param name="current_indent" select="$current_indent"/>
1267 </xsl:apply-templates>
1269 <xsl:call-template name="make_indent">
1270 <xsl:with-param name="current_indent" select="$current_indent"/>
1271 </xsl:call-template>
1273 <xsl:apply-templates select="*[position()=last()]">
1274 <xsl:with-param name="current_indent" select="$current_indent"/>
1275 </xsl:apply-templates>
1278 <xsl:when test="$name='let'">
1280 <xsl:apply-templates select="m:ci"/>
1282 <xsl:apply-templates select="*[3]">
1283 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
1284 </xsl:apply-templates>
1287 <xsl:when test="$name='rw_step'">
1289 <xsl:when test="name(*[2])='m:apply'">
1290 <xsl:apply-templates select="*[2]">
1291 <xsl:with-param name="current_indent" select="$current_indent"/>
1292 </xsl:apply-templates>
1295 <FONT color="red">Consider </FONT>
1296 <xsl:apply-templates select="*[2]"/>
1299 <xsl:variable name="charlength_first">
1300 <xsl:apply-templates select="*[3]" mode="root_charcount"/>
1302 <xsl:variable name="charlength_second">
1303 <xsl:apply-templates select="*[4]" mode="root_charcount"/>
1305 <xsl:variable name="charlength_side_proof">
1306 <xsl:apply-templates select="*[5]" mode="root_charcount"/>
1308 <xsl:variable name="split1"
1309 select="($charlength_first + $charlength_second) > $framewidth"/>
1310 <xsl:variable name="split2"
1311 select="($charlength_second + $charlength_side_proof) > $framewidth"/>
1312 <!-- <xsl:value-of select="$current_indent"/> -->
1313 <!-- <xsl:value-of select="string($charlength_second)"/> -->
1314 <!-- <xsl:value-of select="$charlength_side_proof"/> -->
1315 <!-- <xsl:value-of select="$split2"/> -->
1317 <xsl:call-template name="make_indent">
1318 <xsl:with-param name="current_indent" select="$current_indent"/>
1319 </xsl:call-template>
1320 <FONT color="red">Rewrite </FONT>
1321 <xsl:apply-templates mode="inline" select="*[3]"/>
1322 <xsl:text> </xsl:text>
1323 <xsl:if test="$split1">
1325 <xsl:call-template name="make_indent">
1326 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
1327 </xsl:call-template>
1329 <FONT color="red">with </FONT>
1330 <xsl:apply-templates mode="inline" select="*[4]"/>
1331 <xsl:text> </xsl:text>
1332 <xsl:if test="$split2">
1334 <xsl:call-template name="make_indent">
1335 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
1336 </xsl:call-template>
1338 <FONT color="red">by </FONT>
1339 <xsl:apply-templates select="*[5]">
1340 <xsl:with-param name="current_indent" select="$current_indent+7"/>
1341 </xsl:apply-templates>
1343 <!-- rewrite and apply -->
1344 <xsl:when test="$name='rewrite_and_apply'">
1345 <xsl:apply-templates select="*[2]">
1346 <xsl:with-param name="current_indent" select="$current_indent"/>
1347 </xsl:apply-templates>
1349 <xsl:call-template name="make_indent">
1350 <xsl:with-param name="current_indent" select="$current_indent"/>
1351 </xsl:call-template>
1352 <FONT color="red">Then apply it to </FONT>
1353 <xsl:apply-templates select="*[position()>2]"/>
1355 <!-- by_induction -->
1356 <xsl:when test="$name='by_induction'">
1357 <FONT color="red">We prove </FONT>
1358 <xsl:apply-templates select="../*[3]">
1359 <xsl:with-param name="current_indent" select="$current_indent+18"/>
1360 </xsl:apply-templates>
1362 <xsl:call-template name="make_indent">
1363 <xsl:with-param name="current_indent" select="$current_indent"/>
1364 </xsl:call-template>
1365 <FONT color="red">by induction on </FONT>
1366 <xsl:apply-templates select="*[position()=last()]/*[position()=last()]">
1367 <xsl:with-param name="current_indent" select="$current_indent+30"/>
1368 </xsl:apply-templates>
1371 <xsl:call-template name="make_indent">
1372 <xsl:with-param name="current_indent" select="$current_indent"/>
1373 </xsl:call-template>
1374 <xsl:text>The induction property is</xsl:text>
1376 <xsl:call-template name="make_indent">
1377 <xsl:with-param name="current_indent" select="$current_indent"/>
1378 </xsl:call-template>
1379 <xsl:apply-templates select="*[3]">
1380 <xsl:with-param name="current_indent" select="$current_indent"/>
1381 </xsl:apply-templates>
1383 <xsl:apply-templates
1384 select="*[position()>3 and not(position()=last())]">
1385 <xsl:with-param name="current_indent" select="$current_indent+4"/>
1386 </xsl:apply-templates>
1388 <xsl:call-template name="make_indent">
1389 <xsl:with-param name="current_indent" select="$current_indent"/>
1390 </xsl:call-template>
1391 <xsl:text>End induction</xsl:text> -->
1393 <!-- inductive_case -->
1394 <xsl:when test="$name='inductive_case'">
1396 <xsl:call-template name="make_indent">
1397 <xsl:with-param name="current_indent" select="$current_indent"/>
1398 </xsl:call-template>
1399 <FONT color="red">Case </FONT>
1400 <xsl:apply-templates select="*[2]">
1401 <xsl:with-param name="current_indent" select="$current_indent +10"/>
1402 </xsl:apply-templates>
1403 <xsl:if test="*[3]/*[position()>1]">
1405 <xsl:call-template name="make_indent">
1406 <xsl:with-param name="current_indent" select="$current_indent+4"/>
1407 </xsl:call-template>
1408 <FONT color="red">By induction hypothesis, we have:</FONT>
1409 <xsl:for-each select="*[3]/*[position()>1]">
1411 <xsl:call-template name="make_indent">
1412 <xsl:with-param name="current_indent" select="$current_indent + 4"/>
1413 </xsl:call-template>
1414 <xsl:text>(</xsl:text>
1415 <xsl:apply-templates select="m:ci"/>
1416 <xsl:text>) </xsl:text>
1417 <xsl:apply-templates select="m:type">
1418 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
1419 </xsl:apply-templates>
1423 <xsl:call-template name="make_indent">
1424 <xsl:with-param name="current_indent" select="$current_indent + 4"/>
1425 </xsl:call-template>
1426 <xsl:apply-templates select="*[4]">
1427 <xsl:with-param name="current_indent" select="$current_indent +4"/>
1428 </xsl:apply-templates>
1430 <xsl:call-template name="make_indent">
1431 <xsl:with-param name="current_indent" select="$current_indent"/>
1432 </xsl:call-template>
1433 <xsl:text>End Case</xsl:text> -->
1436 <xsl:when test="$name='case_lhs'">
1438 <xsl:when test="count(*)=2">
1439 <xsl:apply-templates mode="inline" select="*[2]"/>
1442 <xsl:text>(</xsl:text>
1443 <xsl:apply-templates mode="inline" select="*[2]"/>
1444 <xsl:for-each select="m:bvar">
1445 <xsl:text> </xsl:text>
1446 <xsl:apply-templates mode="inline" select="*[1]"/>
1447 <xsl:text>:</xsl:text>
1448 <xsl:apply-templates mode="inline" select="m:type/*[1]"/>
1450 <xsl:text>)</xsl:text>
1455 <xsl:when test="$name='false_ind'">
1456 <xsl:apply-templates select="*[3]">
1457 <xsl:with-param name="current_indent" select="$current_indent"/>
1458 </xsl:apply-templates>
1460 <xsl:call-template name="make_indent">
1461 <xsl:with-param name="current_indent" select="$current_indent"/>
1462 </xsl:call-template>
1463 <FONT color="red">Contradiction.</FONT>
1466 <xsl:when test="$name='and_ind'">
1468 <xsl:when test="name(*[2])='m:apply'">
1469 <xsl:apply-templates select="*[2]">
1470 <xsl:with-param name="current_indent" select="$current_indent"/>
1471 </xsl:apply-templates>
1474 <FONT color="red">Consider </FONT>
1475 <xsl:apply-templates select="*[2]"/>
1479 <xsl:call-template name="make_indent">
1480 <xsl:with-param name="current_indent" select="$current_indent"/>
1481 </xsl:call-template>
1482 <FONT color="red">In particular, we have</FONT>
1484 <xsl:call-template name="make_indent">
1485 <xsl:with-param name="current_indent" select="$current_indent"/>
1486 </xsl:call-template>
1488 <xsl:apply-templates select="*[3]"/>
1490 <xsl:apply-templates select="*[4]">
1491 <xsl:with-param name="current_indent" select="$current_indent + 9"/>
1492 </xsl:apply-templates>
1494 <xsl:call-template name="make_indent">
1495 <xsl:with-param name="current_indent" select="$current_indent"/>
1496 </xsl:call-template>
1498 <xsl:apply-templates select="*[5]"/>
1500 <xsl:apply-templates select="*[6]">
1501 <xsl:with-param name="current_indent" select="$current_indent + 9"/>
1502 </xsl:apply-templates>
1504 <xsl:call-template name="make_indent">
1505 <xsl:with-param name="current_indent" select="$current_indent"/>
1506 </xsl:call-template>
1507 <xsl:apply-templates select="*[7]">
1508 <xsl:with-param name="current_indent" select="$current_indent"/>
1509 </xsl:apply-templates>
1511 <!-- full_or_ind -->
1512 <xsl:when test="$name='full_or_ind'">
1514 <xsl:when test="name(*[2])='m:apply'">
1515 <xsl:apply-templates select="*[2]">
1516 <xsl:with-param name="current_indent" select="$current_indent"/>
1517 </xsl:apply-templates>
1520 <FONT color="red">Consider </FONT>
1521 <xsl:apply-templates select="*[2]"/>
1525 <xsl:call-template name="make_indent">
1526 <xsl:with-param name="current_indent" select="$current_indent"/>
1527 </xsl:call-template>
1528 <FONT color="red">We proceed by cases to prove </FONT>
1529 <xsl:apply-templates select="*[3]"/>
1531 <xsl:call-template name="make_indent">
1532 <xsl:with-param name="current_indent" select="$current_indent+4"/>
1533 </xsl:call-template>
1534 <FONT color="red">Left: suppose </FONT>
1535 <xsl:text>(</xsl:text>
1536 <xsl:value-of select="*[4]/m:bvar/m:ci"/>
1537 <xsl:text>) </xsl:text>
1538 <xsl:apply-templates
1539 select="*[4]/m:bvar/m:type/*[1]"/>
1541 <xsl:call-template name="make_indent">
1542 <xsl:with-param name="current_indent" select="$current_indent+15"/>
1543 </xsl:call-template>
1544 <xsl:apply-templates
1546 <xsl:with-param name="current_indent" select="$current_indent+15"/>
1547 </xsl:apply-templates>
1549 <xsl:call-template name="make_indent">
1550 <xsl:with-param name="current_indent" select="$current_indent+4"/>
1551 </xsl:call-template>
1552 <FONT color="red">Right: suppose </FONT>
1553 <xsl:text>(</xsl:text>
1554 <xsl:value-of select="*[5]/m:bvar/m:ci"/>
1555 <xsl:text>) </xsl:text>
1556 <xsl:apply-templates
1557 select="*[5]/m:bvar/m:type/*[1]"/>
1559 <xsl:call-template name="make_indent">
1560 <xsl:with-param name="current_indent" select="$current_indent+16"/>
1561 </xsl:call-template>
1562 <xsl:apply-templates
1564 <xsl:with-param name="current_indent" select="$current_indent+16"/>
1565 </xsl:apply-templates>
1568 <xsl:when test="$name='or_ind'">
1570 <xsl:when test="name(*[2])='m:apply'">
1571 <xsl:apply-templates select="*[2]">
1572 <xsl:with-param name="current_indent" select="$current_indent"/>
1573 </xsl:apply-templates>
1576 <FONT color="red">Consider </FONT>
1577 <xsl:apply-templates select="*[2]"/>
1581 <xsl:call-template name="make_indent">
1582 <xsl:with-param name="current_indent" select="$current_indent"/>
1583 </xsl:call-template>
1584 <FONT color="red">We prove </FONT>
1585 <xsl:apply-templates select="*[3]"/>
1586 <FONT color="red"> by cases:</FONT>
1588 <xsl:call-template name="make_indent">
1589 <xsl:with-param name="current_indent" select="$current_indent"/>
1590 </xsl:call-template>
1592 <xsl:apply-templates select="*[4]">
1593 <xsl:with-param name="current_indent" select="$current_indent"/>
1594 </xsl:apply-templates>
1596 <xsl:call-template name="make_indent">
1597 <xsl:with-param name="current_indent" select="$current_indent"/>
1598 </xsl:call-template>
1600 <xsl:apply-templates select="*[5]">
1601 <xsl:with-param name="current_indent" select="$current_indent"/>
1602 </xsl:apply-templates>
1605 <xsl:when test="$name='ex_ind'">
1607 <xsl:when test="name(*[2])='m:apply'">
1608 <xsl:apply-templates select="*[2]">
1609 <xsl:with-param name="current_indent" select="$current_indent"/>
1610 </xsl:apply-templates>
1613 <FONT color="red">Consider </FONT>
1614 <xsl:apply-templates select="*[2]">
1615 <xsl:with-param name="current_indent" select="$current_indent"/>
1616 </xsl:apply-templates>
1620 <xsl:call-template name="make_indent">
1621 <xsl:with-param name="current_indent" select="$current_indent"/>
1622 </xsl:call-template>
1623 <FONT color="red">Let </FONT>
1624 <xsl:apply-templates mode="inline" select="*[3]"/>
1626 <xsl:apply-templates mode="inline" select="*[4]"/>
1627 <FONT color="red"> such that</FONT>
1629 <xsl:call-template name="make_indent">
1630 <xsl:with-param name="current_indent" select="$current_indent"/>
1631 </xsl:call-template>
1633 <xsl:apply-templates mode="inline" select="*[5]"/>
1635 <xsl:apply-templates select="*[6]">
1636 <xsl:with-param name="current_indent" select="$current_indent +7"/>
1637 </xsl:apply-templates>
1639 <xsl:call-template name="make_indent">
1640 <xsl:with-param name="current_indent" select="$current_indent"/>
1641 </xsl:call-template>
1642 <xsl:apply-templates select="*[7]">
1643 <xsl:with-param name="current_indent" select="$current_indent"/>
1644 </xsl:apply-templates>
1646 <!-- ***************************************** -->
1647 <!-- *********** LAMBDA ELEMENTS ************** -->
1648 <!-- ***************************************** -->
1649 <xsl:when test="$name='subst'">
1650 <xsl:apply-templates select="*[3]"/>
1651 <xsl:text>[</xsl:text>
1652 <xsl:apply-templates select="*[4]"/>
1654 <xsl:when test="$uri != ''">
1656 <xsl:call-template name="mksymbol-1">
1657 <xsl:with-param name="symbol" select="$name"/>
1658 <xsl:with-param name="color" select="'blue'"/>
1659 <xsl:with-param name="size" select="'+0'"/>
1660 </xsl:call-template>
1664 <xsl:call-template name="mksymbol-1">
1665 <xsl:with-param name="symbol" select="$name"/>
1666 <xsl:with-param name="color" select="'blue'"/>
1667 <xsl:with-param name="size" select="'+0'"/>
1668 </xsl:call-template>
1671 <xsl:apply-templates select="*[2]"/>
1672 <xsl:text>]</xsl:text>
1675 <xsl:when test="$name='lift_with_base'">
1677 <xsl:apply-templates select="*[3]" mode="inline"/>
1680 <xsl:when test="$uri != ''">
1682 <xsl:call-template name="mksymbol-1">
1683 <xsl:with-param name="symbol" select="$name"/>
1684 <xsl:with-param name="color" select="'green'"/>
1685 <xsl:with-param name="size" select="'+0'"/>
1686 </xsl:call-template>
1690 <xsl:call-template name="mksymbol-1">
1691 <xsl:with-param name="symbol" select="$name"/>
1692 <xsl:with-param name="color" select="'green'"/>
1693 <xsl:with-param name="size" select="'+0'"/>
1694 </xsl:call-template>
1698 <xsl:apply-templates select="*[4]" mode="inline"/>
1700 <xsl:text>(</xsl:text>
1701 <xsl:apply-templates select="*[2]" mode="inline"/>
1702 <xsl:text>)</xsl:text>
1705 <xsl:when test="$name='lift'">
1707 <xsl:when test="$uri != ''">
1709 <xsl:call-template name="mksymbol-1">
1710 <xsl:with-param name="symbol" select="$name"/>
1711 <xsl:with-param name="color" select="'green'"/>
1712 <xsl:with-param name="size" select="'+0'"/>
1713 </xsl:call-template>
1717 <xsl:call-template name="mksymbol-1">
1718 <xsl:with-param name="symbol" select="$name"/>
1719 <xsl:with-param name="color" select="'green'"/>
1720 <xsl:with-param name="size" select="'+0'"/>
1721 </xsl:call-template>
1725 <xsl:apply-templates select="*[2]" mode="inline"/>
1727 <xsl:text>(</xsl:text>
1728 <xsl:apply-templates select="*[3]" mode="inline"/>
1729 <xsl:text>)</xsl:text>
1733 <xsl:when test="$name='beta_red1'">
1734 <xsl:apply-templates select="*[2]" mode="inline"/>
1736 <xsl:when test="$uri != ''">
1738 <xsl:call-template name="mksymbol-1">
1739 <xsl:with-param name="symbol" select="$name"/>
1740 <xsl:with-param name="color" select="'green'"/>
1741 <xsl:with-param name="size" select="'+0'"/>
1742 </xsl:call-template>
1744 <xsl:call-template name="mksymbol-1">
1745 <xsl:with-param name="symbol" select="'beta'"/>
1746 <xsl:with-param name="color" select="'green'"/>
1747 <xsl:with-param name="size" select="'+0'"/>
1748 </xsl:call-template>
1753 <xsl:call-template name="mksymbol-1">
1754 <xsl:with-param name="symbol" select="$name"/>
1755 <xsl:with-param name="color" select="'green'"/>
1756 <xsl:with-param name="size" select="'+0'"/>
1757 </xsl:call-template>
1759 <xsl:call-template name="mksymbol-1">
1760 <xsl:with-param name="symbol" select="'beta'"/>
1761 <xsl:with-param name="color" select="'green'"/>
1762 <xsl:with-param name="size" select="'+0'"/>
1763 </xsl:call-template>
1767 <xsl:apply-templates select="*[3]" mode="inline"/>
1770 <xsl:when test="$name='beta_red'">
1771 <xsl:apply-templates select="*[2]" mode="inline"/>
1773 <xsl:when test="$uri != ''">
1775 <xsl:call-template name="mksymbol-1">
1776 <xsl:with-param name="symbol" select="$name"/>
1777 <xsl:with-param name="color" select="'green'"/>
1778 <xsl:with-param name="size" select="'+0'"/>
1779 </xsl:call-template>
1781 <xsl:call-template name="mksymbol-1">
1782 <xsl:with-param name="symbol" select="'beta'"/>
1783 <xsl:with-param name="color" select="'green'"/>
1784 <xsl:with-param name="size" select="'+0'"/>
1785 </xsl:call-template>
1786 <xsl:text>*</xsl:text>
1791 <xsl:call-template name="mksymbol-1">
1792 <xsl:with-param name="symbol" select="$name"/>
1793 <xsl:with-param name="color" select="'green'"/>
1794 <xsl:with-param name="size" select="'+0'"/>
1795 </xsl:call-template>
1797 <xsl:call-template name="mksymbol-1">
1798 <xsl:with-param name="symbol" select="'beta'"/>
1799 <xsl:with-param name="color" select="'green'"/>
1800 <xsl:with-param name="size" select="'+0'"/>
1801 </xsl:call-template>
1802 <xsl:text>*</xsl:text>
1806 <xsl:apply-templates select="*[3]" mode="inline"/>
1809 <xsl:when test="$name='par_beta_red1'">
1810 <xsl:apply-templates select="*[2]" mode="inline"/>
1812 <xsl:when test="$uri != ''">
1814 <xsl:call-template name="mksymbol-1">
1815 <xsl:with-param name="symbol" select="$name"/>
1816 <xsl:with-param name="color" select="'green'"/>
1817 <xsl:with-param name="size" select="'+0'"/>
1818 </xsl:call-template>
1820 <xsl:call-template name="mksymbol-1">
1821 <xsl:with-param name="symbol" select="'beta'"/>
1822 <xsl:with-param name="color" select="'green'"/>
1823 <xsl:with-param name="size" select="'+0'"/>
1824 </xsl:call-template>
1829 <xsl:call-template name="mksymbol-1">
1830 <xsl:with-param name="symbol" select="$name"/>
1831 <xsl:with-param name="color" select="'green'"/>
1832 <xsl:with-param name="size" select="'+0'"/>
1833 </xsl:call-template>
1835 <xsl:call-template name="mksymbol-1">
1836 <xsl:with-param name="symbol" select="'beta'"/>
1837 <xsl:with-param name="color" select="'green'"/>
1838 <xsl:with-param name="size" select="'+0'"/>
1839 </xsl:call-template>
1843 <xsl:apply-templates select="*[3]" mode="inline"/>
1846 <xsl:when test="$name='par_beta_red'">
1847 <xsl:apply-templates select="*[2]" mode="inline"/>
1849 <xsl:when test="$uri != ''">
1851 <xsl:call-template name="mksymbol-1">
1852 <xsl:with-param name="symbol" select="$name"/>
1853 <xsl:with-param name="color" select="'green'"/>
1854 <xsl:with-param name="size" select="'+0'"/>
1855 </xsl:call-template>
1857 <xsl:call-template name="mksymbol-1">
1858 <xsl:with-param name="symbol" select="'beta'"/>
1859 <xsl:with-param name="color" select="'green'"/>
1860 <xsl:with-param name="size" select="'+0'"/>
1861 </xsl:call-template>
1862 <xsl:text>*</xsl:text>
1867 <xsl:call-template name="mksymbol-1">
1868 <xsl:with-param name="symbol" select="$name"/>
1869 <xsl:with-param name="color" select="'green'"/>
1870 <xsl:with-param name="size" select="'+0'"/>
1871 </xsl:call-template>
1873 <xsl:call-template name="mksymbol-1">
1874 <xsl:with-param name="symbol" select="'beta'"/>
1875 <xsl:with-param name="color" select="'green'"/>
1876 <xsl:with-param name="size" select="'+0'"/>
1877 </xsl:call-template>
1878 <xsl:text>*</xsl:text>
1882 <xsl:apply-templates select="*[3]" mode="inline"/>
1886 <xsl:when test="$name='forgetful'">
1888 <xsl:when test="$uri != ''">
1889 <a href="{$uri}">|</a>
1895 <xsl:apply-templates select="*[2]" mode="inline"/>
1897 <xsl:when test="$uri != ''">
1898 <a href="{$uri}">|</a>
1906 <!-- boolean algebra of redexes -->
1909 <xsl:when test="$name='isomorphic'">
1910 <xsl:apply-templates select="*[2]" mode="inline"/>
1912 <xsl:when test="$uri != ''">
1914 <xsl:call-template name="mksymbol-1">
1915 <xsl:with-param name="symbol" select="$name"/>
1916 <xsl:with-param name="color" select="'green'"/>
1917 <xsl:with-param name="size" select="'+0'"/>
1918 </xsl:call-template>
1922 <xsl:call-template name="mksymbol-1">
1923 <xsl:with-param name="symbol" select="$name"/>
1924 <xsl:with-param name="color" select="'green'"/>
1925 <xsl:with-param name="size" select="'+0'"/>
1926 </xsl:call-template>
1929 <xsl:apply-templates select="*[3]" mode="inline"/>
1933 <xsl:when test="$name='interp'">
1934 <font color="green">[</font>
1935 <xsl:apply-templates select="*[2]"/>
1936 <font color="green">]</font>
1944 <xsl:template match="m:lambda">
1945 <xsl:param name="current_indent" select="0"/>
1946 <xsl:variable name="charlength">
1947 <xsl:apply-templates select="*[position()=1]" mode="charcount"/>
1948 <!-- <xsl:apply-templates select="." mode="charcount"/> -->
1950 <!-- <xsl:value-of select="$charlength"/> -->
1951 <!-- <xsl:value-of select="$current_indent"/> -->
1953 <xsl:when test="$charlength > $framewidth">
1955 <xsl:call-template name="mksymbol-1">
1956 <xsl:with-param name="symbol" select="'lambda'"/>
1957 <xsl:with-param name="color" select="'red'"/>
1958 <xsl:with-param name="size" select="'+2'"/>
1959 </xsl:call-template>
1960 <xsl:apply-templates select="m:bvar/m:ci"/>
1961 <xsl:text>:</xsl:text>
1962 <xsl:apply-templates select="m:bvar/m:type">
1963 <xsl:with-param name="current_indent"
1964 select="$current_indent + 4 + 2*string-length(m:bvar/m:ci)"/>
1965 </xsl:apply-templates><br/>
1966 <xsl:call-template name="make_indent">
1967 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
1968 </xsl:call-template>
1969 <xsl:text>.</xsl:text>
1970 <xsl:apply-templates select="*[position()=2]">
1971 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
1972 </xsl:apply-templates>
1975 <xsl:apply-templates mode="inline" select="."/>
1981 <xsl:template match="m:ci">
1983 <xsl:when test="boolean(@definitionURL)">
1984 <a href="{@definitionURL}">
1985 <xsl:apply-templates/>
1989 <xsl:value-of select="."/>
1994 <!-- CHAR COUNTING -->
1996 <!-- enter this counting mode selecting the root -->
1997 <xsl:template match="*" mode="root_charcount">
1998 <xsl:param name="incurrent_length" select="0"/>
2000 <xsl:when test="count(*)=0">
2001 <xsl:value-of select="0"/>
2003 <xsl:when test="name()='m:ci'">
2004 <xsl:value-of select="string-length()"/>
2007 <xsl:apply-templates select="*[1]" mode="charcount">
2008 <xsl:with-param name="incurrent_length" select="$incurrent_length"/>
2009 </xsl:apply-templates>
2014 <!-- enter this mode selecting the first child -->
2016 <xsl:template match="m:ci|m:csymbol" mode="charcount">
2017 <xsl:param name="incurrent_length" select="0"/>
2019 <xsl:when test="$framewidth >= ($incurrent_length + string-length())">
2020 <xsl:variable name="siblength"><xsl:apply-templates select="following-sibling::*[position()=1]" mode="charcount"><xsl:with-param name="incurrent_length" select="$incurrent_length + string-length()"/></xsl:apply-templates></xsl:variable>
2022 <xsl:when test="string($siblength) = """>
2023 <xsl:value-of select="$incurrent_length + string-length()"/>
2026 <xsl:value-of select="number($siblength)"/>
2031 <xsl:value-of select="$incurrent_length + string-length()"/>
2036 <xsl:template match="*" mode="charcount">
2037 <xsl:param name="incurrent_length" select="0"/>
2039 <xsl:when test="count(child::*) = 0">
2040 <xsl:value-of select="$incurrent_length"/>
2043 <xsl:variable name="childlength"><xsl:apply-templates select="*[position()=1]" mode="charcount"><xsl:with-param name="incurrent_length" select="$incurrent_length"/></xsl:apply-templates></xsl:variable>
2045 <xsl:when test="$framewidth >= number($childlength)">
2046 <xsl:variable name="siblength"><xsl:apply-templates select="following-sibling::*[position()=1]" mode="charcount"><xsl:with-param name="incurrent_length" select="$childlength"/></xsl:apply-templates></xsl:variable>
2048 <xsl:when test="string($siblength) = """>
2049 <xsl:value-of select="number($childlength)"/>
2052 <xsl:value-of select="number($siblength)"/>
2057 <xsl:value-of select="number($childlength)"/>
2065 <!--***********************************************************************-->
2067 <!--***********************************************************************-->
2071 <xsl:template match="Definition">
2072 <xsl:param name="current_indent" select="0"/>
2074 DEFINITION <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<br/>
2076 <xsl:call-template name="make_indent">
2077 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
2078 </xsl:call-template>
2079 <xsl:apply-templates select="type/*[1]">
2080 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
2081 </xsl:apply-templates><br/>
2083 <xsl:call-template name="make_indent">
2084 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
2085 </xsl:call-template>
2086 <xsl:apply-templates select="body/*[1]">
2087 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
2088 </xsl:apply-templates>
2094 <xsl:template match="Axiom">
2095 <xsl:param name="current_indent" select="0"/>
2097 AXIOM <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<br/>
2099 <xsl:call-template name="make_indent">
2100 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
2101 </xsl:call-template>
2102 <xsl:apply-templates select="type/*[1]">
2103 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
2104 </xsl:apply-templates>
2108 <!-- UNFINISHED PROOF -->
2110 <xsl:template match="CurrentProof">
2111 <xsl:param name="current_indent" select="0"/>
2113 UNFINISHED PROOF <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<br/>
2114 THESIS: <xsl:apply-templates select="type/*[1]">
2115 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
2116 </xsl:apply-templates><br/>
2118 <xsl:for-each select="Conjecture">
2120 <xsl:call-template name="make_indent">
2121 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
2122 </xsl:call-template>
2123 <xsl:value-of select="./@no"/> :
2124 <xsl:apply-templates select="./*[1]">
2125 <xsl:with-param name="current_indent" select="$current_indent + 11"/>
2126 </xsl:apply-templates>
2130 <xsl:apply-templates select="body/*[1]">
2131 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
2132 </xsl:apply-templates>
2136 <!-- MUTUAL INDUCTIVE DEFINITION -->
2138 <xsl:template match="InductiveDefinition">
2139 <xsl:param name="current_indent" select="0"/>
2141 <xsl:for-each select="InductiveType">
2143 <xsl:when test="position() = 1">
2145 <xsl:when test="string(./@inductive) = "true"">
2146 INDUCTIVE DEFINITION
2149 COINDUCTIVE DEFINITION
2157 <xsl:value-of select="./@name"/>(<xsl:if test="string(../Params) != """><xsl:value-of select="../Params"/></xsl:if>)
2159 <xsl:if test="string(../Param) != """>
2160 <xsl:for-each select="../Param">
2161 <xsl:value-of select="./@name"/>
2163 <xsl:apply-templates select="*"/>
2168 <xsl:apply-templates select="./arity/*[1]">
2169 <xsl:with-param name="current_indent" select="$current_indent + 9"/>
2170 </xsl:apply-templates> <br/>
2172 <xsl:for-each select="./Constructor">
2174 <xsl:call-template name="make_indent">
2175 <xsl:with-param name="current_indent" select="$current_indent + 3"/>
2176 </xsl:call-template>
2178 <xsl:when test="position() = 1">
2179 <xsl:text>  </xsl:text>
2182 <xsl:text>| </xsl:text>
2185 <xsl:value-of select="./@name"/>
2186 <xsl:text>: </xsl:text>
2187 <xsl:apply-templates select="./*[1]">
2188 <xsl:with-param name="current_indent" select="$current_indent + 2*string-length(./@name) + 5"/>
2189 </xsl:apply-templates>
2197 <xsl:template match="Variable">
2198 <xsl:param name="current_indent" select="0"/>
2200 VARIABLE <xsl:value-of select="@name"/><br/>
2201 TYPE = <xsl:apply-templates select="type/*[1]">
2202 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
2203 </xsl:apply-templates>
2204 <xsl:if test="body">
2206 BODY = <xsl:apply-templates select="body/*[1]">
2207 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
2208 </xsl:apply-templates>
2213 <!--***********************************************************************-->
2215 <!--***********************************************************************-->
2219 <xsl:template match="SECTION">
2220 <xsl:param name="current_indent" select="0"/>
2221 <h1>BEGIN OF SECTION</h1>
2222 <xsl:apply-templates/>
2223 <h1>END OF SECTION</h1>