<!-- HELM Group: Asperti, Padovani, Sacerdoti, Schena -->
<!--***********************************************************************-->
+<xsl:param name="getterURL" select="'http://localhost:8081/'"/>
+<xsl:param name="processorURL" select="'http://localhost:8080/helm/servlet/uwobo/'"/>
+
+<xsl:variable name="absPath"><xsl:value-of select="$getterURL"/>getciconly?uri=</xsl:variable>
+
+<xsl:variable name="header"><xsl:value-of select="$processorURL"/>/apply?key=C1&key=HC2&param.getterURL=<xsl:value-of select="$getterURL"/>&param.processorURL=<xsl:value-of select="$processorURL"/>&xmluri=<xsl:value-of select="$absPath"/></xsl:variable>
<xsl:include href="html_init.xsl"/>
<xsl:include href="html_set.xsl"/>
<!-- HTML Head and Body -->
<!--***********************************************************************-->
-<xsl:output method="html"/>
+<!-- <xsl:output method="html"/> -->
+<xsl:output method="html" encoding="iso-8859-1"/>
<xsl:variable name="framewidth" select="36"/>
<xsl:template match="/">
<xsl:param name="current_indent" select="0"/>
<html>
- <head></head>
- <body>
+ <head>
+ <style>
+ A { text-decoration: none }
+ </style>
+ </head>
+ <body bgcolor="white">
<xsl:apply-templates>
<xsl:with-param name="current_indent" select="0"/>
</xsl:apply-templates>
<xsl:template name="make_indent">
<xsl:param name="current_indent" select="0"/>
<xsl:if test="$current_indent > 0">
- <xsl:text> </xsl:text>
+ <xsl:text> </xsl:text>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent - 1"/>
</xsl:call-template>
</xsl:template>
<!-- Syntactic Sugar -->
-
<xsl:template match="m:type">
<xsl:param name="current_indent" select="0"/>
<xsl:apply-templates>
</xsl:apply-templates>
</xsl:template>
+<!--*********************************************************************-->
+<!-- INLINE MODE -->
+<!--*********************************************************************-->
+
+<!-- href -->
+<xsl:template mode="inline" match="m:ci">
+ <xsl:choose>
+ <xsl:when test="boolean(@definitionURL)">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="concat(string($header),string(@definitionURL))"/>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
<!-- CSYMBOL -->
+<xsl:template match="m:apply[m:csymbol]" mode="inline">
+ <xsl:variable name="name">
+ <xsl:value-of select="m:csymbol"/>
+ </xsl:variable>
+ <xsl:choose>
+ <!-- FORALL -->
+ <xsl:when test="$name='forall'">
+ <FONT FACE="Symbol" SIZE="+2" color="blue">"</FONT>
+ <xsl:apply-templates select="m:bvar/m:ci"/>
+ <xsl:text>:</xsl:text>
+ <xsl:apply-templates mode="inline" select="m:bvar/m:type"/>
+ <xsl:text>.</xsl:text>
+ <xsl:apply-templates mode="inline" select="*[position()=3]"/>
+ </xsl:when>
+ <xsl:when test="$name='prod'">
+ <FONT FACE="Symbol" SIZE="+2" color="blue">Õ</FONT>
+ <xsl:apply-templates mode="inline" select="m:bvar/m:ci"/>
+ <xsl:text>:</xsl:text>
+ <xsl:apply-templates mode="inline" select="m:bvar/m:type"/>
+ <xsl:text>.</xsl:text>
+ <xsl:apply-templates mode="inline" select="*[position()=3]"/>
+ </xsl:when>
+ <!-- ARROW -->
+ <xsl:when test="$name='arrow'">
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates mode="inline" select="*[position()=2]"/>
+ <FONT color="blue" FACE="symbol">
+ <xsl:text>®</xsl:text>
+ </FONT>
+ <xsl:apply-templates mode="inline" select="*[position()=3]"/>
+ <xsl:text>)</xsl:text>
+ </xsl:when>
+ <!-- APP -->
+ <xsl:when test="$name='app'">
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates mode="inline" select="*[position()=2]"/>
+ <xsl:for-each select="*[position()>2]">
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates mode="inline" select="."/>
+ </xsl:for-each>
+ <xsl:text>)</xsl:text>
+ </xsl:when>
+ <!-- CAST -->
+ <xsl:when test="$name='cast'">
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates mode="inline" select="*[position()=2]"/>
+ <xsl:text>:></xsl:text>
+ <xsl:apply-templates mode="inline" select="*[position()=3]"/>
+ <xsl:text>)</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name='Prop'">
+ <FONT color="violet">Prop</FONT>
+ </xsl:when>
+ <xsl:when test="$name='Set'">
+ <FONT color="violet">Set</FONT>
+ </xsl:when>
+ <xsl:when test="$name='Type'">
+ <FONT color="violet">Type</FONT>
+ </xsl:when>
+ <!-- MUTCASE -->
+ <xsl:when test="$name='mutcase'">
+ <xsl:text><</xsl:text>
+ <xsl:apply-templates mode="inline" select="*[position()=2]"/>
+ <xsl:text>> </xsl:text>
+ <FONT color="red">CASE </FONT>
+ <xsl:apply-templates mode="inline" select="*[position()=3]"/>
+ <FONT color="red"> OF </FONT>
+ <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
+ <xsl:choose>
+ <xsl:when test="not(position() = 1)">
+ <xsl:text> | </xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:apply-templates mode="inline" select="."/>
+ <FONT FACE="Symbol" SIZE="+2" mathcolor="green">Þ</FONT>
+ <xsl:apply-templates mode="inline"
+ select="following-sibling::*[position()= 1]"/>
+ </xsl:for-each>
+ </xsl:when>
+ <!-- FIX -->
+ <xsl:when test="$name='fix'">
+ <FONT color="red">FIX</FONT>
+ <xsl:value-of select="m:ci"/>
+ <xsl:text>{</xsl:text>
+ <xsl:for-each select="m:bvar">
+ <xsl:value-of select="m:ci"/>
+ <xsl:text>:</xsl:text>
+ <xsl:apply-templates mode="inline" select="m:type"/>
+ <xsl:text>:=</xsl:text>
+ <xsl:apply-templates mode="inline"
+ select="following-sibling::*[position() = 1]"/>
+ <xsl:choose>
+ <xsl:when test="position()=last()">
+ <xsl:text>}</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <!-- COFIX -->
+ <xsl:when test="$name='cofix'">
+ <xsl:text>COFIX</xsl:text>
+ <xsl:value-of select="m:ci"/>
+ <xsl:text>{</xsl:text>
+ <xsl:for-each select="m:bvar">
+ <xsl:value-of select="m:ci"/>
+ <xsl:text>:</xsl:text>
+ <xsl:apply-templates mode="inline" select="m:type"/>
+ <xsl:text>:=</xsl:text>
+ <xsl:apply-templates mode="inline"
+ select="following-sibling::*[position() = 1]"/>
+ <xsl:choose>
+ <xsl:when test="position()=last()">
+ <xsl:text>}</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:when test="$name='proof'">
+ <xsl:apply-templates mode="inline" select="*[position()=2]"/>
+ <FONT color="red">we proved</FONT>
+ <xsl:apply-templates mode="inline" select="*[position()=3]"/>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template mode="inline" match="m:lambda">
+ <FONT SIZE="+2" color="red" FACE="symbol">l</FONT>
+ <xsl:apply-templates select="m:bvar/m:ci"/>
+ <xsl:text>:</xsl:text>
+ <xsl:apply-templates mode="inline" select="m:bvar/m:type"/>
+ <xsl:text>.</xsl:text>
+ <xsl:apply-templates mode="inline" select="*[position()=2]"/>
+</xsl:template>
+
+<!--*********************************************************************-->
+<!-- COUNTING MODE -->
+<!--*********************************************************************-->
+
<xsl:template match="m:apply[m:csymbol]">
<xsl:param name="current_indent" select="0"/>
<xsl:param name="width" select="$framewidth"/>
<!-- <xsl:value-of select="$current_indent"/> -->
<!-- <xsl:value-of select="$charlength"/> -->
<xsl:choose>
- <xsl:when test="$name='prod'">
+ <!-- FORALL -->
+ <xsl:when test="$name='forall'">
<xsl:choose>
<xsl:when test="$charlength > $framewidth">
<!-- Π -->
- <FONT FACE="symbol" SIZE="+2" mathcolor="blue">P</FONT>
+ <FONT FACE="Symbol" SIZE="+2" color="blue">"</FONT>
<xsl:apply-templates select="m:bvar/m:ci"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="m:bvar/m:type">
<xsl:with-param name="current_indent"
select="$current_indent + 2 + string-length(m:bvar/m:ci)"/>
- </xsl:apply-templates><BR/>
+ </xsl:apply-templates>
+ <br/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
- <!-- Π -->
- <FONT FACE="symbol" SIZE="+2" mathcolor="blue">P</FONT>
- <xsl:apply-templates select="m:bvar/m:ci"/>
- <xsl:text>:</xsl:text>
- <xsl:apply-templates select="m:bvar/m:type"/>
- <xsl:text>.</xsl:text>
- <xsl:apply-templates select="*[position()=3]"/>
+ <xsl:apply-templates mode="inline" select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
+ <!-- PROD -->
+ <xsl:when test="$name='prod'">
+ <xsl:choose>
+ <xsl:when test="$charlength > $framewidth">
+ <FONT FACE="Symbol" SIZE="+2" color="blue">Õ</FONT>
+ <xsl:apply-templates select="m:bvar/m:ci"/>
+ <xsl:text>:</xsl:text>
+ <xsl:apply-templates select="m:bvar/m:type">
+ <xsl:with-param name="current_indent"
+ select="$current_indent + 2 + string-length(m:bvar/m:ci)"/>
+ </xsl:apply-templates><br/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:call-template>
+ <xsl:text>.</xsl:text>
+ <xsl:apply-templates select="*[position()=3]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="inline" select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <!-- ARROW -->
<xsl:when test="$name='arrow'">
<xsl:choose>
<xsl:when test="$charlength > $framewidth">
<xsl:apply-templates select="*[position()=2]">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:apply-templates>
- <BR/>
+ <br/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
<!-- -> -->
- <FONT FACE="symbol" SIZE="+2" mathcolor="blue">®</FONT>
+ <FONT color="blue" FACE="symbol">
+ <xsl:text>®</xsl:text>
+ </FONT>
<xsl:apply-templates select="*[position()=3]">
<xsl:with-param name="current_indent" select="$current_indent + 5"/>
</xsl:apply-templates>
<xsl:text>)</xsl:text>
</xsl:when>
<xsl:otherwise>
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="*[position()=2]"/>
- <!-- -> -->
- <FONT FACE="symbol" SIZE="+2" mathcolor="blue">®</FONT>
- <xsl:apply-templates select="*[position()=3]"/>
- <xsl:text>)</xsl:text>
+ <xsl:apply-templates mode="inline" select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
+ <!-- APP -->
<xsl:when test="$name='app'">
<xsl:choose>
<xsl:when test="$charlength > $framewidth">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:apply-templates>
<xsl:for-each select="*[position()>2]">
- <BR/>
+ <br/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
<xsl:text>)</xsl:text>
</xsl:when>
<xsl:otherwise>
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="*[position()=2]"/>
- <xsl:for-each select="*[position()>2]">
- <xsl:text> </xsl:text>
- <xsl:apply-templates select="."/>
- </xsl:for-each>
- <xsl:text>)</xsl:text>
+ <xsl:apply-templates mode="inline" select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:text>(</xsl:text>
<xsl:apply-templates select="*[position()=2]">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:apply-templates><BR/>
+ </xsl:apply-templates><br/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/> </xsl:call-template>
<xsl:text>:></xsl:text>
<xsl:text>)</xsl:text>
</xsl:when>
<xsl:otherwise>
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="*[position()=2]"/>
- <xsl:text>:></xsl:text>
- <xsl:apply-templates select="*[position()=3]"/>
- <xsl:text>)</xsl:text>
+ <xsl:apply-templates mode="inline" select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:apply-templates>
<xsl:text> OF </xsl:text>
<xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
- <BR/>
+ <br/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="."/>
- <FONT FACE="symbol" SIZE="+2" mathcolor="green">Þ</FONT>
+ <FONT FACE="Symbol" SIZE="+2" mathcolor="green">Þ</FONT>
<xsl:apply-templates select="following-sibling::*[position()= 1]">
<xsl:with-param name="current_indent" select="$current_indent + 4 + string-length()"/>
</xsl:apply-templates>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
- <xsl:text><</xsl:text>
- <xsl:apply-templates select="*[position()=2]"/>
- <xsl:text>> </xsl:text>
- <xsl:text>CASE </xsl:text>
- <xsl:apply-templates select="*[position()=3]"/>
- <xsl:text> OF </xsl:text>
- <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
- <xsl:choose>
- <xsl:when test="not(position() = 1)">
- <xsl:text> | </xsl:text>
- </xsl:when>
- </xsl:choose>
- <xsl:apply-templates select="."/>
- <FONT FACE="symbol" SIZE="+2" mathcolor="green">Þ</FONT>
- <xsl:apply-templates select="following-sibling::*[position()= 1]">
- <xsl:with-param name="current_indent" select="$current_indent + 2 + string-length()"/>
- </xsl:apply-templates>
- </xsl:for-each>
+ <xsl:apply-templates mode="inline" select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
+ <!-- FIX -->
<xsl:when test="$name='fix'">
<xsl:choose>
<xsl:when test="$charlength > $framewidth">
<xsl:value-of select="m:ci"/>
<xsl:text>{</xsl:text>
<xsl:for-each select="m:bvar">
- <BR/>
+ <br/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
<xsl:with-param name="current_indent"
select="$current_indent + 5 + string-length(m:ci)"/>
</xsl:apply-templates>
- <BR/>
+ <br/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
<xsl:with-param name="current_indent" select="$current_indent +2"/>
</xsl:apply-templates>
</xsl:for-each>
- <BR/>
+ <br/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
<xsl:text>}</xsl:text>
</xsl:when>
<xsl:otherwise>
- <xsl:text>FIX</xsl:text>
- <xsl:value-of select="m:ci"/>
- <xsl:text>{</xsl:text>
- <xsl:for-each select="m:bvar">
- <xsl:value-of select="m:ci"/>
- <xsl:text>:</xsl:text>
- <xsl:apply-templates select="m:type"/>
- <xsl:text>:=</xsl:text>
- <xsl:apply-templates select="following-sibling::*[position() = 1]"/>
- <xsl:choose>
- <xsl:when test="position()=last()">
- <xsl:text>}</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>;</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
+ <xsl:apply-templates mode="inline" select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
+ <!-- COFIX -->
<xsl:when test="$name='cofix'">
<xsl:choose>
<xsl:when test="($charlength + 10) > $framewidth">
<xsl:text>COFIX</xsl:text>
<xsl:value-of select="m:ci"/>
<xsl:text>{</xsl:text>
- <BR/>
+ <br/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
<xsl:with-param name="current_indent"
select="$current_indent + 5 + string-length(m:ci)"/>
</xsl:apply-templates>
- <BR/>
+ <br/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
</xsl:apply-templates>
</xsl:for-each>
- <BR/>
+ <br/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
<xsl:text>}</xsl:text>
</xsl:when>
<xsl:otherwise>
- <xsl:text>COFIX</xsl:text>
- <xsl:value-of select="m:ci"/>
- <xsl:text>{</xsl:text>
- <xsl:for-each select="m:bvar">
- <xsl:value-of select="m:ci"/>
- <xsl:text>:</xsl:text>
- <xsl:apply-templates select="m:type"/>
- <xsl:text>:=</xsl:text>
- <xsl:apply-templates select="following-sibling::*[position() = 1]"/>
- <xsl:choose>
- <xsl:when test="position()=last()">
- <xsl:text>}</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>;</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
+ <xsl:apply-templates mode="inline" select="m:type"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
- </xsl:choose>
- <!-- </m:mrow> -->
+ <!-- ***************************************** -->
+ <!-- *********** PROOF ELEMENTS ************** -->
+ <!-- ***************************************** -->
+ <!-- PROOF -->
+ <xsl:when test="$name='proof'">
+ <xsl:apply-templates select="*[position()=2]">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:apply-templates>
+ <br/>
+ <!-- <xsl:element name="br"/> -->
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:call-template>
+ <FONT color="red">we proved </FONT>
+ <xsl:apply-templates select="*[position()=3]">
+ <xsl:with-param name="current_indent" select="$current_indent + 16"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <!-- letin1 -->
+ <xsl:when test="$name='letin1'">
+ <xsl:apply-templates select="*[position()=2]">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:apply-templates>
+ <br/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="*[position()=3]">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <!-- letin -->
+ <xsl:when test="$name='letin'">
+ <xsl:for-each select="*[position()>1 and last()>position()]">
+ <xsl:apply-templates select=".">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:apply-templates>
+ <br/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <xsl:apply-templates select="*[position()=last()]">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <!-- Let -->
+ <xsl:when test="$name='let'">
+ <m:mtext>(</m:mtext>
+ <xsl:apply-templates select="m:ci"/>
+ <m:mtext>) </m:mtext>
+ <xsl:apply-templates select="*[3]">
+ <xsl:with-param name="current_indent" select="$current_indent + 7"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <!-- rw_step -->
+ <xsl:when test="$name='rw_step'">
+ <xsl:choose>
+ <xsl:when test="name(*[2])='m:apply'">
+ <xsl:apply-templates select="*[2]">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <FONT color="red">Consider </FONT>
+ <xsl:apply-templates select="*[2]"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <br/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:call-template>
+ <FONT color="red">Rewrite </FONT>
+ <xsl:apply-templates select="*[3]"/>
+ <FONT color="red"> with </FONT>
+ <xsl:apply-templates select="*[4]"/>
+ <FONT color="red"> by </FONT>
+ <xsl:apply-templates select="*[5]"/>
+ </xsl:when>
+ <!-- rewrite and apply -->
+ <xsl:when test="$name='rewrite_and_apply'">
+ <xsl:apply-templates select="*[2]">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:apply-templates>
+ <br/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:call-template>
+ <FONT color="red">Then apply it to </FONT>
+ <xsl:apply-templates select="*[position()>2]"/>
+ </xsl:when>
+ <!-- and_ind -->
+ <xsl:when test="$name='and_ind'">
+ <xsl:choose>
+ <xsl:when test="name(*[2])='m:apply'">
+ <xsl:apply-templates select="*[2]">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <FONT color="red">Consider </FONT>
+ <xsl:apply-templates select="*[2]"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <br/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:call-template>
+ <FONT color="red">In particular, we have</FONT>
+ <br/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:call-template>
+ <m:mtext>(</m:mtext>
+ <xsl:apply-templates select="*[3]"/>
+ <m:mtext>) </m:mtext>
+ <xsl:apply-templates select="*[4]">
+ <xsl:with-param name="current_indent" select="$current_indent + 9"/>
+ </xsl:apply-templates>
+ <br/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:call-template>
+ <m:mtext>(</m:mtext>
+ <xsl:apply-templates select="*[5]"/>
+ <m:mtext>) </m:mtext>
+ <xsl:apply-templates select="*[6]">
+ <xsl:with-param name="current_indent" select="$current_indent + 9"/>
+ </xsl:apply-templates>
+ <br/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="*[7]">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <!-- or_ind -->
+ <xsl:when test="$name='or_ind'">
+ <xsl:choose>
+ <xsl:when test="name(*[2])='m:apply'">
+ <xsl:apply-templates select="*[2]">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <FONT color="red">Consider </FONT>
+ <xsl:apply-templates select="*[2]"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <br/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:call-template>
+ <FONT color="red">We prove </FONT>
+ <xsl:apply-templates select="*[3]"/>
+ <FONT color="red"> by cases:</FONT>
+ <br/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:call-template>
+ <m:mtext>*</m:mtext>
+ <xsl:apply-templates select="*[4]">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:apply-templates>
+ <br/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:call-template>
+ <m:mtext>*</m:mtext>
+ <xsl:apply-templates select="*[5]">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <!-- Ex_ind -->
+ <xsl:when test="$name='ex_ind'">
+ <xsl:choose>
+ <xsl:when test="name(*[2])='m:apply'">
+ <xsl:apply-templates select="*[2]">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <FONT color="red">Consider </FONT>
+ <xsl:apply-templates select="*[2]">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ <br/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:call-template>
+ <FONT color="red">Let </FONT>
+ <xsl:apply-templates mode="inline" select="*[3]"/>
+ <m:mtext>:</m:mtext>
+ <xsl:apply-templates mode="inline" select="*[4]"/>
+ <FONT color="red"> such that</FONT>
+ <br/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:call-template>
+ <m:mtext>(</m:mtext>
+ <xsl:apply-templates mode="inline" select="*[5]"/>
+ <m:mtext>)</m:mtext>
+ <xsl:apply-templates select="*[6]">
+ <xsl:with-param name="current_indent" select="$current_indent +7"/>
+ </xsl:apply-templates>
+ <br/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="*[7]">
+ <xsl:with-param name="current_indent" select="$current_indent"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ </xsl:choose>
</xsl:template>
<!-- LAMBDA -->
<!-- <xsl:apply-templates select="." mode="charcount"/> -->
</xsl:variable>
<!-- <xsl:value-of select="$charlength"/> -->
+ <!-- <xsl:value-of select="$current_indent"/> -->
<xsl:choose>
<xsl:when test="$charlength > $framewidth">
<!-- λ -->
- <FONT FACE="symbol" SIZE="+2" mathcolor="red">l</FONT>
+ <FONT SIZE="+2" color="red" FACE="symbol">l</FONT>
<xsl:apply-templates select="m:bvar/m:ci"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="m:bvar/m:type">
<xsl:with-param name="current_indent"
select="$current_indent + 2 + string-length(m:bvar/m:ci)"/>
- </xsl:apply-templates><BR/>
+ </xsl:apply-templates><br/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
- <!-- λ -->
- <FONT FACE="symbol" SIZE="+2" mathcolor="red">l</FONT>
- <xsl:apply-templates select="m:bvar/m:ci"/>
- <xsl:text>:</xsl:text>
- <xsl:apply-templates select="m:bvar/m:type"/>
- <xsl:text>.</xsl:text>
- <xsl:apply-templates select="*[position()=2]"/>
+ <xsl:apply-templates mode="inline" select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="m:ci">
<xsl:choose>
<xsl:when test="boolean(@definitionURL)">
-<!-- CSC: non bisogna piu' utilizzare la url, bensi' la uri -->
-<!-- <xsl:variable name="url">
- <xsl:value-of select="concat(string($absPath),
- @definitionURL)"/>
- </xsl:variable>-->
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat(string($header),string(@definitionURL))"/>
<xsl:template match="Definition">
<xsl:param name="current_indent" select="0"/>
<p>
-DEFINITION <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<BR/>
-TYPE =<BR/>
+DEFINITION <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<br/>
+TYPE =<br/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 7"/>
</xsl:call-template>
<xsl:apply-templates select="type/*[1]">
<xsl:with-param name="current_indent" select="$current_indent + 7"/>
- </xsl:apply-templates><BR/>
-BODY =<BR/>
+ </xsl:apply-templates><br/>
+BODY =<br/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 7"/>
</xsl:call-template>
<xsl:template match="Axiom">
<xsl:param name="current_indent" select="0"/>
<p>
-AXIOM <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<BR/>
-TYPE = <xsl:apply-templates select="type/*[1]">
+AXIOM <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<br/>
+TYPE =<br/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent + 7"/>
+ </xsl:call-template>
+<xsl:apply-templates select="type/*[1]">
<xsl:with-param name="current_indent" select="$current_indent + 7"/>
</xsl:apply-templates>
</p>
<xsl:template match="CurrentProof">
<xsl:param name="current_indent" select="0"/>
<p>
-UNFINISHED PROOF <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<BR/>
+UNFINISHED PROOF <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<br/>
THESIS: <xsl:apply-templates select="type/*[1]">
<xsl:with-param name="current_indent" select="$current_indent + 8"/>
- </xsl:apply-templates><BR/>
+ </xsl:apply-templates><br/>
CONJECTURES:
<xsl:for-each select="Conjecture">
- <BR/>
+ <br/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 8"/>
</xsl:call-template>
<xsl:with-param name="current_indent" select="$current_indent + 11"/>
</xsl:apply-templates>
</xsl:for-each>
- <BR/>
+ <br/>
PROOF:
<xsl:apply-templates select="body/*[1]">
<xsl:with-param name="current_indent" select="$current_indent + 8"/>
<xsl:apply-templates select="*"/>
</xsl:for-each>
</xsl:if>
- ] <BR/>
+ ] <br/>
OF ARITY
<xsl:apply-templates select="./arity/*[1]">
<xsl:with-param name="current_indent" select="$current_indent + 9"/>
- </xsl:apply-templates> <BR/>
+ </xsl:apply-templates> <br/>
BUILT FROM:
<xsl:for-each select="./Constructor">
- <BR/>
+ <br/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 3"/>
</xsl:call-template>
<xsl:template match="Variable">
<xsl:param name="current_indent" select="0"/>
<p>
-VARIABLE <xsl:value-of select="@name"/><BR/>
+VARIABLE <xsl:value-of select="@name"/><br/>
TYPE = <xsl:apply-templates select="type/*[1]">
<xsl:with-param name="current_indent" select="$current_indent + 7"/>
</xsl:apply-templates>
<!-- HELM Group: Asperti, Padovani, Sacerdoti, Schena -->
<!--***********************************************************************-->
-<!-- IN -->
+<!-- **************************************************************** -->
+<!-- INLINE MODE -->
+<!-- **************************************************************** -->
- <xsl:template match="m:apply[m:in]">
+<!-- SET -->
+
+ <xsl:template mode="inline" match="m:set">
+ <xsl:variable name="uri">
+ <xsl:value-of select="concat(string($absPath), @definitionURL)"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="count(child::*) = 0">
+ <FONT FACE="symbol" mathcolor="blue">Æ</FONT>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="name(*[1]) = 'm:bvar'">
+ <xsl:text>{</xsl:text>
+ <xsl:apply-templates mode="inline" select="m:bvar/m:ci"/>
+ <xsl:text>:</xsl:text>
+ <xsl:apply-templates mode="inline" select="m:bvar/m:type"/>
+ <xsl:text>|</xsl:text>
+ <xsl:apply-templates mode="inline" select="*[position()=2]"/>
+ <xsl:text>}</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>{</xsl:text>
+ <xsl:for-each select="*">
+ <xsl:apply-templates mode="inline" select="."/>
+ <xsl:choose>
+ <xsl:when test="position() = last()">
+ <xsl:text>}</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>,</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+
+<!-- CARD -->
+<xsl:template mode="inline" match="m:apply[m:card]">
<xsl:param name="current_indent" select="0"/>
<xsl:param name="width" select="$framewidth"/>
<xsl:variable name="uri">
- <xsl:value-of select="m:in/@definitionURL"/>
+ <xsl:value-of select="m:card/@definitionURL"/>
</xsl:variable>
- <xsl:variable name="charlength">
- <xsl:apply-templates select="m:in" mode="charcount"/>
+ <xsl:text>|</xsl:text>
+ <xsl:apply-templates mode="inline" select="*[2]"/>
+ <xsl:text>|</xsl:text>
+ </xsl:template>
+
+<xsl:template mode="inline" match="m:apply[m:in|m:notin|m:intersect|m:union
+ |m:subset|m:prsubset|m:setdiff]">
+ <xsl:variable name="uri">
+ <xsl:value-of select="*[1]/@definitionURL"/>
</xsl:variable>
- <xsl:choose>
- <xsl:when test="$charlength > $framewidth">
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="*[2]">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:apply-templates>
- <BR/>
- <xsl:call-template name="make_indent">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:call-template>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="concat(string($header),string($uri))"/>
- </xsl:attribute>
- <FONT FACE="symbol" SIZE="+2" mathcolor="blue">Î</FONT>
- </a>
- <xsl:apply-templates select="*[3]">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:apply-templates>
- <xsl:text>)</xsl:text>
+ <xsl:variable name="symbol">
+ <xsl:choose>
+ <xsl:when test="m:in">
+ <xsl:value-of select="'Î'"/>
+ </xsl:when>
+ <xsl:when test="m:notin">
+ <xsl:value-of select="'Ï'"/>
+ </xsl:when>
+ <xsl:when test="m:intersect">
+ <xsl:value-of select="'Ç'"/>
+ </xsl:when>
+ <xsl:when test="m:union">
+ <xsl:value-of select="'È'"/>
+ </xsl:when>
+ <xsl:when test="m:subset">
+ <xsl:value-of select="'Í'"/>
+ </xsl:when>
+ <xsl:when test="m:prsubset">
+ <xsl:value-of select="'Ì'"/>
+ </xsl:when>
+ <xsl:when test="m:setdiff">
+ <xsl:value-of select="'/'"/>
</xsl:when>
- <xsl:otherwise>
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="*[2]"/>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="concat(string($header),string($uri))"/>
- </xsl:attribute>
- <FONT FACE="symbol" SIZE="+2" mathcolor="blue">Î</FONT>
- </a>
- <xsl:apply-templates select="*[3]"/>
- <xsl:text>)</xsl:text>
- </xsl:otherwise>
</xsl:choose>
+ </xsl:variable>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates mode="inline" select="*[2]"/>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="concat(string($header),string($uri))"/>
+ </xsl:attribute>
+ <FONT FACE="symbol" mathcolor="blue">
+ <xsl:value-of select="$symbol"/>
+ </FONT>
+ </a>
+ <xsl:apply-templates mode="inline" select="*[3]"/>
+ <xsl:text>)</xsl:text>
</xsl:template>
-<!-- NOTIN -->
+<!-- *************************************************************** -->
- <xsl:template match="m:apply[m:notin]">
+<xsl:template match="m:apply[m:in|m:notin|m:intersect|m:union
+ |m:subset|m:prsubset|m:setdiff]">
<xsl:param name="current_indent" select="0"/>
<xsl:param name="width" select="$framewidth"/>
<xsl:variable name="uri">
- <xsl:value-of select="m:notin/@definitionURL"/>
+ <xsl:value-of select="*[1]/@definitionURL"/>
</xsl:variable>
<xsl:variable name="charlength">
- <xsl:apply-templates select="m:notin" mode="charcount"/>
+ <xsl:apply-templates select="*[1]" mode="charcount"/>
+ </xsl:variable>
+ <xsl:variable name="symbol">
+ <xsl:choose>
+ <xsl:when test="m:in">
+ <xsl:value-of select="'Î'"/>
+ </xsl:when>
+ <xsl:when test="m:notin">
+ <xsl:value-of select="'Ï'"/>
+ </xsl:when>
+ <xsl:when test="m:intersect">
+ <xsl:value-of select="'Ç'"/>
+ </xsl:when>
+ <xsl:when test="m:union">
+ <xsl:value-of select="'È'"/>
+ </xsl:when>
+ <xsl:when test="m:subset">
+ <xsl:value-of select="'Í'"/>
+ </xsl:when>
+ <xsl:when test="m:prsubset">
+ <xsl:value-of select="'Ì'"/>
+ </xsl:when>
+ <xsl:when test="m:setdiff">
+ <xsl:value-of select="'/'"/>
+ </xsl:when>
+ </xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="$charlength > $framewidth">
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
- <FONT FACE="symbol" SIZE="+2" mathcolor="blue">Ï</FONT>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="concat(string($header),string($uri))"/>
+ </xsl:attribute>
+ <FONT FACE="symbol" mathcolor="blue">
+ <xsl:value-of select="$symbol"/>
+ </FONT>
+ </a>
<xsl:apply-templates select="*[3]">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:apply-templates>
<xsl:text>)</xsl:text>
</xsl:when>
<xsl:otherwise>
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="*[2]"/>
- <FONT FACE="symbol" SIZE="+2" mathcolor="blue">Ï</FONT>
- <xsl:apply-templates select="*[3]"/>
- <xsl:text>)</xsl:text>
+ <xsl:apply-templates mode="inline" select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
+
<!-- SET -->
<xsl:template match="m:set">
<xsl:apply-templates select="." mode="charcount"/>
</xsl:variable>
<xsl:choose>
- <xsl:when test="name(*[1]) = 'm:bvar'">
+ <xsl:when test="$charlength > $framewidth">
<xsl:choose>
- <xsl:when test="$charlength > $framewidth">
+ <xsl:when test="name(*[1]) = 'm:bvar'">
<xsl:text>{</xsl:text>
<xsl:apply-templates select="m:bvar/m:ci"/>
<xsl:text>:</xsl:text>
<xsl:text>}</xsl:text>
</xsl:when>
<xsl:otherwise>
- <xsl:text>{</xsl:text>
- <xsl:apply-templates select="m:bvar/m:ci"/>
- <xsl:text>:</xsl:text>
- <xsl:apply-templates select="m:bvar/m:type"/>
- <xsl:text>|</xsl:text>
- <xsl:apply-templates select="*[position()=2]"/>
- <xsl:text>}</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$charlength > $framewidth">
<xsl:text>{</xsl:text>
<xsl:apply-templates select="*[position()=1]">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:apply-templates>
</xsl:for-each>
- <xsl:text>}</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>{</xsl:text>
- <xsl:for-each select="*">
- <xsl:apply-templates select="."/>
- <xsl:choose>
- <xsl:when test="position() = last()">
- <xsl:text>}</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>,</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
-<!-- INTERSECTION -->
-
-<xsl:template match="m:apply[m:intersect]">
- <xsl:param name="current_indent" select="0"/>
- <xsl:param name="width" select="$framewidth"/>
- <xsl:variable name="uri">
- <xsl:value-of select="m:intersect/@definitionURL"/>
- </xsl:variable>
- <xsl:variable name="charlength">
- <xsl:apply-templates select="m:intersect" mode="charcount"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$charlength > $framewidth">
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="*[2]">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:apply-templates>
- <BR/>
- <xsl:call-template name="make_indent">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:call-template>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="concat(string($header),string($uri))"/>
- </xsl:attribute>
- <FONT FACE="symbol" SIZE="+2" mathcolor="blue">Ç</FONT>
- </a>
- <xsl:apply-templates select="*[3]">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:apply-templates>
- <xsl:text>)</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="*[2]"/>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="concat(string($header),string($uri))"/>
- </xsl:attribute>
- <FONT FACE="symbol" SIZE="+2" mathcolor="blue">Ç</FONT>
- </a>
- <xsl:apply-templates select="*[3]"/>
- <xsl:text>)</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-<!-- UNION -->
-
-<xsl:template match="m:apply[m:union]">
- <xsl:param name="current_indent" select="0"/>
- <xsl:param name="width" select="$framewidth"/>
- <xsl:variable name="uri">
- <xsl:value-of select="m:union/@definitionURL"/>
- </xsl:variable>
- <xsl:variable name="charlength">
- <xsl:apply-templates select="m:union" mode="charcount"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$charlength > $framewidth">
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="*[2]">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:apply-templates>
- <BR/>
- <xsl:call-template name="make_indent">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:call-template>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="concat(string($header),string($uri))"/>
- </xsl:attribute>
- <FONT FACE="symbol" SIZE="+2" mathcolor="blue">È</FONT>
- </a>
- <xsl:apply-templates select="*[3]">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:apply-templates>
- <xsl:text>)</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="*[2]"/>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="concat(string($header),string($uri))"/>
- </xsl:attribute>
- <FONT FACE="symbol" SIZE="+2" mathcolor="blue">È</FONT>
- </a>
- <xsl:apply-templates select="*[3]"/>
- <xsl:text>)</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-<!-- SUBSET -->
-<xsl:template match="m:apply[m:subset]">
- <xsl:param name="current_indent" select="0"/>
- <xsl:param name="width" select="$framewidth"/>
- <xsl:variable name="uri">
- <xsl:value-of select="m:subset/@definitionURL"/>
- </xsl:variable>
- <xsl:variable name="charlength">
- <xsl:apply-templates select="m:subset" mode="charcount"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$charlength > $framewidth">
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="*[2]">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:apply-templates>
- <BR/>
- <xsl:call-template name="make_indent">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:call-template>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="concat(string($header),string($uri))"/>
- </xsl:attribute>
- <FONT FACE="symbol" SIZE="+2" mathcolor="blue">Í</FONT>
- </a>
- <xsl:apply-templates select="*[3]">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:apply-templates>
- <xsl:text>)</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="*[2]"/>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="concat(string($header),string($uri))"/>
- </xsl:attribute>
- <FONT FACE="symbol" SIZE="+2" mathcolor="blue">Í</FONT>
- </a>
- <xsl:apply-templates select="*[3]"/>
- <xsl:text>)</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-<!-- PRSUBSET -->
-<xsl:template match="m:apply[m:prsubset]">
- <xsl:param name="current_indent" select="0"/>
- <xsl:param name="width" select="$framewidth"/>
- <xsl:variable name="uri">
- <xsl:value-of select="m:prsubset/@definitionURL"/>
- </xsl:variable>
- <xsl:variable name="charlength">
- <xsl:apply-templates select="m:prsubset" mode="charcount"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$charlength > $framewidth">
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="*[2]">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:apply-templates>
- <BR/>
- <xsl:call-template name="make_indent">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:call-template>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="concat(string($header),string($uri))"/>
- </xsl:attribute>
- <FONT FACE="symbol" SIZE="+2" mathcolor="blue">Ì</FONT>
- </a>
- <xsl:apply-templates select="*[3]">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:apply-templates>
- <xsl:text>)</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="*[2]"/>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="concat(string($header),string($uri))"/>
- </xsl:attribute>
- <FONT FACE="symbol" SIZE="+2" mathcolor="blue">Ì</FONT>
- </a>
- <xsl:apply-templates select="*[3]"/>
- <xsl:text>)</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
-<!-- SETDIFF -->
-
-<xsl:template match="m:apply[m:setdiff]">
- <xsl:param name="current_indent" select="0"/>
- <xsl:param name="width" select="$framewidth"/>
- <xsl:variable name="uri">
- <xsl:value-of select="m:setdiff/@definitionURL"/>
- </xsl:variable>
- <xsl:variable name="charlength">
- <xsl:apply-templates select="m:setdiff" mode="charcount"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$charlength > $framewidth">
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="*[2]">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:apply-templates>
- <BR/>
- <xsl:call-template name="make_indent">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:call-template>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="concat(string($header),string($uri))"/>
- </xsl:attribute>
- <xsl:text>/</xsl:text>
- </a>
- <xsl:apply-templates select="*[3]">
- <xsl:with-param name="current_indent" select="$current_indent + 2"/>
- </xsl:apply-templates>
- <xsl:text>)</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="*[2]"/>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="concat(string($header),string($uri))"/>
- </xsl:attribute>
- <xsl:text>/</xsl:text>
- </a>
- <xsl:apply-templates select="*[3]"/>
- <xsl:text>)</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
+ <xsl:text>}</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="inline" select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
<!-- CARD -->
<xsl:template match="m:apply[m:card]">