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>
1214 <xsl:when test="$name='letin1'">
1215 <xsl:apply-templates select="*[position()=2]">
1216 <xsl:with-param name="current_indent" select="$current_indent"/>
1217 </xsl:apply-templates>
1219 <xsl:call-template name="make_indent">
1220 <xsl:with-param name="current_indent" select="$current_indent"/>
1221 </xsl:call-template>
1222 <xsl:apply-templates select="*[position()=3]">
1223 <xsl:with-param name="current_indent" select="$current_indent"/>
1224 </xsl:apply-templates>
1227 <xsl:when test="$name='letin'">
1228 <xsl:for-each select="*[position()>1 and last()>position()]">
1229 <xsl:apply-templates select=".">
1230 <xsl:with-param name="current_indent" select="$current_indent"/>
1231 </xsl:apply-templates>
1233 <xsl:call-template name="make_indent">
1234 <xsl:with-param name="current_indent" select="$current_indent"/>
1235 </xsl:call-template>
1237 <xsl:apply-templates select="*[position()=last()]">
1238 <xsl:with-param name="current_indent" select="$current_indent"/>
1239 </xsl:apply-templates>
1242 <xsl:when test="$name='let'">
1244 <xsl:apply-templates select="m:ci"/>
1246 <xsl:apply-templates select="*[3]">
1247 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
1248 </xsl:apply-templates>
1251 <xsl:when test="$name='rw_step'">
1253 <xsl:when test="name(*[2])='m:apply'">
1254 <xsl:apply-templates select="*[2]">
1255 <xsl:with-param name="current_indent" select="$current_indent"/>
1256 </xsl:apply-templates>
1259 <FONT color="red">Consider </FONT>
1260 <xsl:apply-templates select="*[2]"/>
1263 <xsl:variable name="charlength_first">
1264 <xsl:apply-templates select="*[3]" mode="root_charcount"/>
1266 <xsl:variable name="charlength_second">
1267 <xsl:apply-templates select="*[4]" mode="root_charcount"/>
1269 <xsl:variable name="charlength_side_proof">
1270 <xsl:apply-templates select="*[5]" mode="root_charcount"/>
1272 <xsl:variable name="split1"
1273 select="($charlength_first + $charlength_second) > $framewidth"/>
1274 <xsl:variable name="split2"
1275 select="($charlength_second + $charlength_side_proof) > $framewidth"/>
1276 <!-- <xsl:value-of select="$current_indent"/> -->
1277 <!-- <xsl:value-of select="string($charlength_second)"/> -->
1278 <!-- <xsl:value-of select="$charlength_side_proof"/> -->
1279 <!-- <xsl:value-of select="$split2"/> -->
1281 <xsl:call-template name="make_indent">
1282 <xsl:with-param name="current_indent" select="$current_indent"/>
1283 </xsl:call-template>
1284 <FONT color="red">Rewrite </FONT>
1285 <xsl:apply-templates mode="inline" select="*[3]"/>
1286 <xsl:text> </xsl:text>
1287 <xsl:if test="$split1">
1289 <xsl:call-template name="make_indent">
1290 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
1291 </xsl:call-template>
1293 <FONT color="red">with </FONT>
1294 <xsl:apply-templates mode="inline" select="*[4]"/>
1295 <xsl:text> </xsl:text>
1296 <xsl:if test="$split2">
1298 <xsl:call-template name="make_indent">
1299 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
1300 </xsl:call-template>
1302 <FONT color="red">by </FONT>
1303 <xsl:apply-templates select="*[5]">
1304 <xsl:with-param name="current_indent" select="$current_indent+7"/>
1305 </xsl:apply-templates>
1307 <!-- rewrite and apply -->
1308 <xsl:when test="$name='rewrite_and_apply'">
1309 <xsl:apply-templates select="*[2]">
1310 <xsl:with-param name="current_indent" select="$current_indent"/>
1311 </xsl:apply-templates>
1313 <xsl:call-template name="make_indent">
1314 <xsl:with-param name="current_indent" select="$current_indent"/>
1315 </xsl:call-template>
1316 <FONT color="red">Then apply it to </FONT>
1317 <xsl:apply-templates select="*[position()>2]"/>
1319 <!-- by_induction -->
1320 <xsl:when test="$name='by_induction'">
1321 <FONT color="red">We prove </FONT>
1322 <xsl:apply-templates select="../*[3]">
1323 <xsl:with-param name="current_indent" select="$current_indent+18"/>
1324 </xsl:apply-templates>
1326 <xsl:call-template name="make_indent">
1327 <xsl:with-param name="current_indent" select="$current_indent"/>
1328 </xsl:call-template>
1329 <FONT color="red">by induction on </FONT>
1330 <xsl:apply-templates select="*[position()=last()]/*[position()=last()]">
1331 <xsl:with-param name="current_indent" select="$current_indent+30"/>
1332 </xsl:apply-templates>
1335 <xsl:call-template name="make_indent">
1336 <xsl:with-param name="current_indent" select="$current_indent"/>
1337 </xsl:call-template>
1338 <xsl:text>The induction property is</xsl:text>
1340 <xsl:call-template name="make_indent">
1341 <xsl:with-param name="current_indent" select="$current_indent"/>
1342 </xsl:call-template>
1343 <xsl:apply-templates select="*[3]">
1344 <xsl:with-param name="current_indent" select="$current_indent"/>
1345 </xsl:apply-templates>
1347 <xsl:apply-templates
1348 select="*[position()>3 and not(position()=last())]">
1349 <xsl:with-param name="current_indent" select="$current_indent+4"/>
1350 </xsl:apply-templates>
1352 <xsl:call-template name="make_indent">
1353 <xsl:with-param name="current_indent" select="$current_indent"/>
1354 </xsl:call-template>
1355 <xsl:text>End induction</xsl:text> -->
1357 <!-- inductive_case -->
1358 <xsl:when test="$name='inductive_case'">
1360 <xsl:call-template name="make_indent">
1361 <xsl:with-param name="current_indent" select="$current_indent"/>
1362 </xsl:call-template>
1363 <FONT color="red">Case </FONT>
1364 <xsl:apply-templates select="*[2]">
1365 <xsl:with-param name="current_indent" select="$current_indent +10"/>
1366 </xsl:apply-templates>
1367 <xsl:if test="*[3]/*[position()>1]">
1369 <xsl:call-template name="make_indent">
1370 <xsl:with-param name="current_indent" select="$current_indent+4"/>
1371 </xsl:call-template>
1372 <FONT color="red">By induction hypothesis, we have:</FONT>
1373 <xsl:for-each select="*[3]/*[position()>1]">
1375 <xsl:call-template name="make_indent">
1376 <xsl:with-param name="current_indent" select="$current_indent + 4"/>
1377 </xsl:call-template>
1378 <xsl:text>(</xsl:text>
1379 <xsl:apply-templates select="m:ci"/>
1380 <xsl:text>) </xsl:text>
1381 <xsl:apply-templates select="m:type">
1382 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
1383 </xsl:apply-templates>
1387 <xsl:call-template name="make_indent">
1388 <xsl:with-param name="current_indent" select="$current_indent + 4"/>
1389 </xsl:call-template>
1390 <xsl:apply-templates select="*[4]">
1391 <xsl:with-param name="current_indent" select="$current_indent +4"/>
1392 </xsl:apply-templates>
1394 <xsl:call-template name="make_indent">
1395 <xsl:with-param name="current_indent" select="$current_indent"/>
1396 </xsl:call-template>
1397 <xsl:text>End Case</xsl:text> -->
1400 <xsl:when test="$name='case_lhs'">
1402 <xsl:when test="count(*)=2">
1403 <xsl:apply-templates mode="inline" select="*[2]"/>
1406 <xsl:text>(</xsl:text>
1407 <xsl:apply-templates mode="inline" select="*[2]"/>
1408 <xsl:for-each select="m:bvar">
1409 <xsl:text> </xsl:text>
1410 <xsl:apply-templates mode="inline" select="*[1]"/>
1411 <xsl:text>:</xsl:text>
1412 <xsl:apply-templates mode="inline" select="m:type/*[1]"/>
1414 <xsl:text>)</xsl:text>
1419 <xsl:when test="$name='false_ind'">
1420 <xsl:apply-templates select="*[3]">
1421 <xsl:with-param name="current_indent" select="$current_indent"/>
1422 </xsl:apply-templates>
1424 <xsl:call-template name="make_indent">
1425 <xsl:with-param name="current_indent" select="$current_indent"/>
1426 </xsl:call-template>
1427 <FONT color="red">Contradiction.</FONT>
1430 <xsl:when test="$name='and_ind'">
1432 <xsl:when test="name(*[2])='m:apply'">
1433 <xsl:apply-templates select="*[2]">
1434 <xsl:with-param name="current_indent" select="$current_indent"/>
1435 </xsl:apply-templates>
1438 <FONT color="red">Consider </FONT>
1439 <xsl:apply-templates select="*[2]"/>
1443 <xsl:call-template name="make_indent">
1444 <xsl:with-param name="current_indent" select="$current_indent"/>
1445 </xsl:call-template>
1446 <FONT color="red">In particular, we have</FONT>
1448 <xsl:call-template name="make_indent">
1449 <xsl:with-param name="current_indent" select="$current_indent"/>
1450 </xsl:call-template>
1452 <xsl:apply-templates select="*[3]"/>
1454 <xsl:apply-templates select="*[4]">
1455 <xsl:with-param name="current_indent" select="$current_indent + 9"/>
1456 </xsl:apply-templates>
1458 <xsl:call-template name="make_indent">
1459 <xsl:with-param name="current_indent" select="$current_indent"/>
1460 </xsl:call-template>
1462 <xsl:apply-templates select="*[5]"/>
1464 <xsl:apply-templates select="*[6]">
1465 <xsl:with-param name="current_indent" select="$current_indent + 9"/>
1466 </xsl:apply-templates>
1468 <xsl:call-template name="make_indent">
1469 <xsl:with-param name="current_indent" select="$current_indent"/>
1470 </xsl:call-template>
1471 <xsl:apply-templates select="*[7]">
1472 <xsl:with-param name="current_indent" select="$current_indent"/>
1473 </xsl:apply-templates>
1475 <!-- full_or_ind -->
1476 <xsl:when test="$name='full_or_ind'">
1478 <xsl:when test="name(*[2])='m:apply'">
1479 <xsl:apply-templates select="*[2]">
1480 <xsl:with-param name="current_indent" select="$current_indent"/>
1481 </xsl:apply-templates>
1484 <FONT color="red">Consider </FONT>
1485 <xsl:apply-templates select="*[2]"/>
1489 <xsl:call-template name="make_indent">
1490 <xsl:with-param name="current_indent" select="$current_indent"/>
1491 </xsl:call-template>
1492 <FONT color="red">We proceed by cases to prove </FONT>
1493 <xsl:apply-templates select="*[3]"/>
1495 <xsl:call-template name="make_indent">
1496 <xsl:with-param name="current_indent" select="$current_indent+4"/>
1497 </xsl:call-template>
1498 <FONT color="red">Left: suppose </FONT>
1499 <xsl:text>(</xsl:text>
1500 <xsl:value-of select="*[4]/m:bvar/m:ci"/>
1501 <xsl:text>) </xsl:text>
1502 <xsl:apply-templates
1503 select="*[4]/m:bvar/m:type/*[1]"/>
1505 <xsl:call-template name="make_indent">
1506 <xsl:with-param name="current_indent" select="$current_indent+15"/>
1507 </xsl:call-template>
1508 <xsl:apply-templates
1510 <xsl:with-param name="current_indent" select="$current_indent+15"/>
1511 </xsl:apply-templates>
1513 <xsl:call-template name="make_indent">
1514 <xsl:with-param name="current_indent" select="$current_indent+4"/>
1515 </xsl:call-template>
1516 <FONT color="red">Right: suppose </FONT>
1517 <xsl:text>(</xsl:text>
1518 <xsl:value-of select="*[5]/m:bvar/m:ci"/>
1519 <xsl:text>) </xsl:text>
1520 <xsl:apply-templates
1521 select="*[5]/m:bvar/m:type/*[1]"/>
1523 <xsl:call-template name="make_indent">
1524 <xsl:with-param name="current_indent" select="$current_indent+16"/>
1525 </xsl:call-template>
1526 <xsl:apply-templates
1528 <xsl:with-param name="current_indent" select="$current_indent+16"/>
1529 </xsl:apply-templates>
1532 <xsl:when test="$name='or_ind'">
1534 <xsl:when test="name(*[2])='m:apply'">
1535 <xsl:apply-templates select="*[2]">
1536 <xsl:with-param name="current_indent" select="$current_indent"/>
1537 </xsl:apply-templates>
1540 <FONT color="red">Consider </FONT>
1541 <xsl:apply-templates select="*[2]"/>
1545 <xsl:call-template name="make_indent">
1546 <xsl:with-param name="current_indent" select="$current_indent"/>
1547 </xsl:call-template>
1548 <FONT color="red">We prove </FONT>
1549 <xsl:apply-templates select="*[3]"/>
1550 <FONT color="red"> by cases:</FONT>
1552 <xsl:call-template name="make_indent">
1553 <xsl:with-param name="current_indent" select="$current_indent"/>
1554 </xsl:call-template>
1556 <xsl:apply-templates select="*[4]">
1557 <xsl:with-param name="current_indent" select="$current_indent"/>
1558 </xsl:apply-templates>
1560 <xsl:call-template name="make_indent">
1561 <xsl:with-param name="current_indent" select="$current_indent"/>
1562 </xsl:call-template>
1564 <xsl:apply-templates select="*[5]">
1565 <xsl:with-param name="current_indent" select="$current_indent"/>
1566 </xsl:apply-templates>
1569 <xsl:when test="$name='ex_ind'">
1571 <xsl:when test="name(*[2])='m:apply'">
1572 <xsl:apply-templates select="*[2]">
1573 <xsl:with-param name="current_indent" select="$current_indent"/>
1574 </xsl:apply-templates>
1577 <FONT color="red">Consider </FONT>
1578 <xsl:apply-templates select="*[2]">
1579 <xsl:with-param name="current_indent" select="$current_indent"/>
1580 </xsl:apply-templates>
1584 <xsl:call-template name="make_indent">
1585 <xsl:with-param name="current_indent" select="$current_indent"/>
1586 </xsl:call-template>
1587 <FONT color="red">Let </FONT>
1588 <xsl:apply-templates mode="inline" select="*[3]"/>
1590 <xsl:apply-templates mode="inline" select="*[4]"/>
1591 <FONT color="red"> such that</FONT>
1593 <xsl:call-template name="make_indent">
1594 <xsl:with-param name="current_indent" select="$current_indent"/>
1595 </xsl:call-template>
1597 <xsl:apply-templates mode="inline" select="*[5]"/>
1599 <xsl:apply-templates select="*[6]">
1600 <xsl:with-param name="current_indent" select="$current_indent +7"/>
1601 </xsl:apply-templates>
1603 <xsl:call-template name="make_indent">
1604 <xsl:with-param name="current_indent" select="$current_indent"/>
1605 </xsl:call-template>
1606 <xsl:apply-templates select="*[7]">
1607 <xsl:with-param name="current_indent" select="$current_indent"/>
1608 </xsl:apply-templates>
1610 <!-- ***************************************** -->
1611 <!-- *********** LAMBDA ELEMENTS ************** -->
1612 <!-- ***************************************** -->
1613 <xsl:when test="$name='subst'">
1614 <xsl:apply-templates select="*[3]"/>
1615 <xsl:text>[</xsl:text>
1616 <xsl:apply-templates select="*[4]"/>
1618 <xsl:when test="$uri != ''">
1620 <xsl:call-template name="mksymbol-1">
1621 <xsl:with-param name="symbol" select="$name"/>
1622 <xsl:with-param name="color" select="'blue'"/>
1623 <xsl:with-param name="size" select="'+0'"/>
1624 </xsl:call-template>
1628 <xsl:call-template name="mksymbol-1">
1629 <xsl:with-param name="symbol" select="$name"/>
1630 <xsl:with-param name="color" select="'blue'"/>
1631 <xsl:with-param name="size" select="'+0'"/>
1632 </xsl:call-template>
1635 <xsl:apply-templates select="*[2]"/>
1636 <xsl:text>]</xsl:text>
1639 <xsl:when test="$name='lift_with_base'">
1641 <xsl:apply-templates select="*[3]" mode="inline"/>
1644 <xsl:when test="$uri != ''">
1646 <xsl:call-template name="mksymbol-1">
1647 <xsl:with-param name="symbol" select="$name"/>
1648 <xsl:with-param name="color" select="'green'"/>
1649 <xsl:with-param name="size" select="'+0'"/>
1650 </xsl:call-template>
1654 <xsl:call-template name="mksymbol-1">
1655 <xsl:with-param name="symbol" select="$name"/>
1656 <xsl:with-param name="color" select="'green'"/>
1657 <xsl:with-param name="size" select="'+0'"/>
1658 </xsl:call-template>
1662 <xsl:apply-templates select="*[4]" mode="inline"/>
1664 <xsl:text>(</xsl:text>
1665 <xsl:apply-templates select="*[2]" mode="inline"/>
1666 <xsl:text>)</xsl:text>
1669 <xsl:when test="$name='lift'">
1671 <xsl:when test="$uri != ''">
1673 <xsl:call-template name="mksymbol-1">
1674 <xsl:with-param name="symbol" select="$name"/>
1675 <xsl:with-param name="color" select="'green'"/>
1676 <xsl:with-param name="size" select="'+0'"/>
1677 </xsl:call-template>
1681 <xsl:call-template name="mksymbol-1">
1682 <xsl:with-param name="symbol" select="$name"/>
1683 <xsl:with-param name="color" select="'green'"/>
1684 <xsl:with-param name="size" select="'+0'"/>
1685 </xsl:call-template>
1689 <xsl:apply-templates select="*[2]" mode="inline"/>
1691 <xsl:text>(</xsl:text>
1692 <xsl:apply-templates select="*[3]" mode="inline"/>
1693 <xsl:text>)</xsl:text>
1697 <xsl:when test="$name='beta_red1'">
1698 <xsl:apply-templates select="*[2]" mode="inline"/>
1700 <xsl:when test="$uri != ''">
1702 <xsl:call-template name="mksymbol-1">
1703 <xsl:with-param name="symbol" select="$name"/>
1704 <xsl:with-param name="color" select="'green'"/>
1705 <xsl:with-param name="size" select="'+0'"/>
1706 </xsl:call-template>
1708 <xsl:call-template name="mksymbol-1">
1709 <xsl:with-param name="symbol" select="'beta'"/>
1710 <xsl:with-param name="color" select="'green'"/>
1711 <xsl:with-param name="size" select="'+0'"/>
1712 </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>
1723 <xsl:call-template name="mksymbol-1">
1724 <xsl:with-param name="symbol" select="'beta'"/>
1725 <xsl:with-param name="color" select="'green'"/>
1726 <xsl:with-param name="size" select="'+0'"/>
1727 </xsl:call-template>
1731 <xsl:apply-templates select="*[3]" mode="inline"/>
1734 <xsl:when test="$name='beta_red'">
1735 <xsl:apply-templates select="*[2]" mode="inline"/>
1737 <xsl:when test="$uri != ''">
1739 <xsl:call-template name="mksymbol-1">
1740 <xsl:with-param name="symbol" select="$name"/>
1741 <xsl:with-param name="color" select="'green'"/>
1742 <xsl:with-param name="size" select="'+0'"/>
1743 </xsl:call-template>
1745 <xsl:call-template name="mksymbol-1">
1746 <xsl:with-param name="symbol" select="'beta'"/>
1747 <xsl:with-param name="color" select="'green'"/>
1748 <xsl:with-param name="size" select="'+0'"/>
1749 </xsl:call-template>
1750 <xsl:text>*</xsl:text>
1755 <xsl:call-template name="mksymbol-1">
1756 <xsl:with-param name="symbol" select="$name"/>
1757 <xsl:with-param name="color" select="'green'"/>
1758 <xsl:with-param name="size" select="'+0'"/>
1759 </xsl:call-template>
1761 <xsl:call-template name="mksymbol-1">
1762 <xsl:with-param name="symbol" select="'beta'"/>
1763 <xsl:with-param name="color" select="'green'"/>
1764 <xsl:with-param name="size" select="'+0'"/>
1765 </xsl:call-template>
1766 <xsl:text>*</xsl:text>
1770 <xsl:apply-templates select="*[3]" mode="inline"/>
1773 <xsl:when test="$name='par_beta_red1'">
1774 <xsl:apply-templates select="*[2]" mode="inline"/>
1776 <xsl:when test="$uri != ''">
1778 <xsl:call-template name="mksymbol-1">
1779 <xsl:with-param name="symbol" select="$name"/>
1780 <xsl:with-param name="color" select="'green'"/>
1781 <xsl:with-param name="size" select="'+0'"/>
1782 </xsl:call-template>
1784 <xsl:call-template name="mksymbol-1">
1785 <xsl:with-param name="symbol" select="'beta'"/>
1786 <xsl:with-param name="color" select="'green'"/>
1787 <xsl:with-param name="size" select="'+0'"/>
1788 </xsl:call-template>
1793 <xsl:call-template name="mksymbol-1">
1794 <xsl:with-param name="symbol" select="$name"/>
1795 <xsl:with-param name="color" select="'green'"/>
1796 <xsl:with-param name="size" select="'+0'"/>
1797 </xsl:call-template>
1799 <xsl:call-template name="mksymbol-1">
1800 <xsl:with-param name="symbol" select="'beta'"/>
1801 <xsl:with-param name="color" select="'green'"/>
1802 <xsl:with-param name="size" select="'+0'"/>
1803 </xsl:call-template>
1807 <xsl:apply-templates select="*[3]" mode="inline"/>
1810 <xsl:when test="$name='par_beta_red'">
1811 <xsl:apply-templates select="*[2]" mode="inline"/>
1813 <xsl:when test="$uri != ''">
1815 <xsl:call-template name="mksymbol-1">
1816 <xsl:with-param name="symbol" select="$name"/>
1817 <xsl:with-param name="color" select="'green'"/>
1818 <xsl:with-param name="size" select="'+0'"/>
1819 </xsl:call-template>
1821 <xsl:call-template name="mksymbol-1">
1822 <xsl:with-param name="symbol" select="'beta'"/>
1823 <xsl:with-param name="color" select="'green'"/>
1824 <xsl:with-param name="size" select="'+0'"/>
1825 </xsl:call-template>
1826 <xsl:text>*</xsl:text>
1831 <xsl:call-template name="mksymbol-1">
1832 <xsl:with-param name="symbol" select="$name"/>
1833 <xsl:with-param name="color" select="'green'"/>
1834 <xsl:with-param name="size" select="'+0'"/>
1835 </xsl:call-template>
1837 <xsl:call-template name="mksymbol-1">
1838 <xsl:with-param name="symbol" select="'beta'"/>
1839 <xsl:with-param name="color" select="'green'"/>
1840 <xsl:with-param name="size" select="'+0'"/>
1841 </xsl:call-template>
1842 <xsl:text>*</xsl:text>
1846 <xsl:apply-templates select="*[3]" mode="inline"/>
1850 <xsl:when test="$name='forgetful'">
1852 <xsl:when test="$uri != ''">
1853 <a href="{$uri}">|</a>
1859 <xsl:apply-templates select="*[2]" mode="inline"/>
1861 <xsl:when test="$uri != ''">
1862 <a href="{$uri}">|</a>
1870 <!-- boolean algebra of redexes -->
1873 <xsl:when test="$name='isomorphic'">
1874 <xsl:apply-templates select="*[2]" mode="inline"/>
1876 <xsl:when test="$uri != ''">
1878 <xsl:call-template name="mksymbol-1">
1879 <xsl:with-param name="symbol" select="$name"/>
1880 <xsl:with-param name="color" select="'green'"/>
1881 <xsl:with-param name="size" select="'+0'"/>
1882 </xsl:call-template>
1886 <xsl:call-template name="mksymbol-1">
1887 <xsl:with-param name="symbol" select="$name"/>
1888 <xsl:with-param name="color" select="'green'"/>
1889 <xsl:with-param name="size" select="'+0'"/>
1890 </xsl:call-template>
1893 <xsl:apply-templates select="*[3]" mode="inline"/>
1897 <xsl:when test="$name='interp'">
1898 <font color="green">[</font>
1899 <xsl:apply-templates select="*[2]"/>
1900 <font color="green">]</font>
1908 <xsl:template match="m:lambda">
1909 <xsl:param name="current_indent" select="0"/>
1910 <xsl:variable name="charlength">
1911 <xsl:apply-templates select="*[position()=1]" mode="charcount"/>
1912 <!-- <xsl:apply-templates select="." mode="charcount"/> -->
1914 <!-- <xsl:value-of select="$charlength"/> -->
1915 <!-- <xsl:value-of select="$current_indent"/> -->
1917 <xsl:when test="$charlength > $framewidth">
1919 <xsl:call-template name="mksymbol-1">
1920 <xsl:with-param name="symbol" select="'lambda'"/>
1921 <xsl:with-param name="color" select="'red'"/>
1922 <xsl:with-param name="size" select="'+2'"/>
1923 </xsl:call-template>
1924 <xsl:apply-templates select="m:bvar/m:ci"/>
1925 <xsl:text>:</xsl:text>
1926 <xsl:apply-templates select="m:bvar/m:type">
1927 <xsl:with-param name="current_indent"
1928 select="$current_indent + 4 + 2*string-length(m:bvar/m:ci)"/>
1929 </xsl:apply-templates><br/>
1930 <xsl:call-template name="make_indent">
1931 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
1932 </xsl:call-template>
1933 <xsl:text>.</xsl:text>
1934 <xsl:apply-templates select="*[position()=2]">
1935 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
1936 </xsl:apply-templates>
1939 <xsl:apply-templates mode="inline" select="."/>
1945 <xsl:template match="m:ci">
1947 <xsl:when test="boolean(@definitionURL)">
1948 <a href="{@definitionURL}">
1949 <xsl:apply-templates/>
1953 <xsl:value-of select="."/>
1958 <!-- CHAR COUNTING -->
1960 <!-- enter this counting mode selecting the root -->
1961 <xsl:template match="*" mode="root_charcount">
1962 <xsl:param name="incurrent_length" select="0"/>
1964 <xsl:when test="count(*)=0">
1965 <xsl:value-of select="0"/>
1967 <xsl:when test="name()='m:ci'">
1968 <xsl:value-of select="string-length()"/>
1971 <xsl:apply-templates select="*[1]" mode="charcount">
1972 <xsl:with-param name="incurrent_length" select="$incurrent_length"/>
1973 </xsl:apply-templates>
1978 <!-- enter this mode selecting the first child -->
1980 <xsl:template match="m:ci|m:csymbol" mode="charcount">
1981 <xsl:param name="incurrent_length" select="0"/>
1983 <xsl:when test="$framewidth >= ($incurrent_length + string-length())">
1984 <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>
1986 <xsl:when test="string($siblength) = """>
1987 <xsl:value-of select="$incurrent_length + string-length()"/>
1990 <xsl:value-of select="number($siblength)"/>
1995 <xsl:value-of select="$incurrent_length + string-length()"/>
2000 <xsl:template match="*" mode="charcount">
2001 <xsl:param name="incurrent_length" select="0"/>
2003 <xsl:when test="count(child::*) = 0">
2004 <xsl:value-of select="$incurrent_length"/>
2007 <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>
2009 <xsl:when test="$framewidth >= number($childlength)">
2010 <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>
2012 <xsl:when test="string($siblength) = """>
2013 <xsl:value-of select="number($childlength)"/>
2016 <xsl:value-of select="number($siblength)"/>
2021 <xsl:value-of select="number($childlength)"/>
2029 <!--***********************************************************************-->
2031 <!--***********************************************************************-->
2035 <xsl:template match="Definition">
2036 <xsl:param name="current_indent" select="0"/>
2038 DEFINITION <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<br/>
2040 <xsl:call-template name="make_indent">
2041 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
2042 </xsl:call-template>
2043 <xsl:apply-templates select="type/*[1]">
2044 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
2045 </xsl:apply-templates><br/>
2047 <xsl:call-template name="make_indent">
2048 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
2049 </xsl:call-template>
2050 <xsl:apply-templates select="body/*[1]">
2051 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
2052 </xsl:apply-templates>
2058 <xsl:template match="Axiom">
2059 <xsl:param name="current_indent" select="0"/>
2061 AXIOM <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<br/>
2063 <xsl:call-template name="make_indent">
2064 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
2065 </xsl:call-template>
2066 <xsl:apply-templates select="type/*[1]">
2067 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
2068 </xsl:apply-templates>
2072 <!-- UNFINISHED PROOF -->
2074 <xsl:template match="CurrentProof">
2075 <xsl:param name="current_indent" select="0"/>
2077 UNFINISHED PROOF <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<br/>
2078 THESIS: <xsl:apply-templates select="type/*[1]">
2079 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
2080 </xsl:apply-templates><br/>
2082 <xsl:for-each select="Conjecture">
2084 <xsl:call-template name="make_indent">
2085 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
2086 </xsl:call-template>
2087 <xsl:value-of select="./@no"/> :
2088 <xsl:apply-templates select="./*[1]">
2089 <xsl:with-param name="current_indent" select="$current_indent + 11"/>
2090 </xsl:apply-templates>
2094 <xsl:apply-templates select="body/*[1]">
2095 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
2096 </xsl:apply-templates>
2100 <!-- MUTUAL INDUCTIVE DEFINITION -->
2102 <xsl:template match="InductiveDefinition">
2103 <xsl:param name="current_indent" select="0"/>
2105 <xsl:for-each select="InductiveType">
2107 <xsl:when test="position() = 1">
2109 <xsl:when test="string(./@inductive) = "true"">
2110 INDUCTIVE DEFINITION
2113 COINDUCTIVE DEFINITION
2121 <xsl:value-of select="./@name"/>(<xsl:if test="string(../Params) != """><xsl:value-of select="../Params"/></xsl:if>)
2123 <xsl:if test="string(../Param) != """>
2124 <xsl:for-each select="../Param">
2125 <xsl:value-of select="./@name"/>
2127 <xsl:apply-templates select="*"/>
2132 <xsl:apply-templates select="./arity/*[1]">
2133 <xsl:with-param name="current_indent" select="$current_indent + 9"/>
2134 </xsl:apply-templates> <br/>
2136 <xsl:for-each select="./Constructor">
2138 <xsl:call-template name="make_indent">
2139 <xsl:with-param name="current_indent" select="$current_indent + 3"/>
2140 </xsl:call-template>
2142 <xsl:when test="position() = 1">
2143 <xsl:text>  </xsl:text>
2146 <xsl:text>| </xsl:text>
2149 <xsl:value-of select="./@name"/>
2150 <xsl:text>: </xsl:text>
2151 <xsl:apply-templates select="./*[1]">
2152 <xsl:with-param name="current_indent" select="$current_indent + 2*string-length(./@name) + 5"/>
2153 </xsl:apply-templates>
2161 <xsl:template match="Variable">
2162 <xsl:param name="current_indent" select="0"/>
2164 VARIABLE <xsl:value-of select="@name"/><br/>
2165 TYPE = <xsl:apply-templates select="type/*[1]">
2166 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
2167 </xsl:apply-templates>
2168 <xsl:if test="body">
2170 BODY = <xsl:apply-templates select="body/*[1]">
2171 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
2172 </xsl:apply-templates>
2177 <!--***********************************************************************-->
2179 <!--***********************************************************************-->
2183 <xsl:template match="SECTION">
2184 <xsl:param name="current_indent" select="0"/>
2185 <h1>BEGIN OF SECTION</h1>
2186 <xsl:apply-templates/>
2187 <h1>END OF SECTION</h1>