]> matita.cs.unibo.it Git - helm.git/commitdiff
Modified Files:
authorIrene Schena <irene.schena@unibo.it>
Fri, 17 Nov 2000 09:54:43 +0000 (09:54 +0000)
committerIrene Schena <irene.schena@unibo.it>
Fri, 17 Nov 2000 09:54:43 +0000 (09:54 +0000)
1) mml2mmlv1_0.xsl: added comments beginning with "HELM:" to the last
modifications
2) rootcontent.xsl: updated comments
3) roottheory.xsl: ready to be the starting stylesheet for
theory files in place of theory_content.xsl
4) theory_pres.xsl: "import" in place of "include" for
annotated_pres.xsl

Removed Files:
annotatedcont.xsl.csc content.xsl.csc
content_senza_tipi.13.9.00.xsl mml2mmlv1_0_original.xsl
mmlextension_andrea.xsl mmlextension_irene.xsl
objcontent.xsl.csc objcontent_old.xsl proof31-10-00.xsl
rootcontent_withproofs.xsl
style_prima_del_linguaggio_naturale/annotatedcont.xsl.csc
style_prima_del_linguaggio_naturale/content.xsl.csc
style_prima_del_linguaggio_naturale/mmlextension_andrea.xsl
style_prima_del_linguaggio_naturale/mmlextension_irene.xsl
style_prima_del_linguaggio_naturale/objcontent.xsl.csc
style_prima_del_linguaggio_naturale/objcontent_old.xsl
style_prima_del_linguaggio_naturale/rootcontent_withproofs.xsl

21 files changed:
helm/style/annotatedcont.xsl.csc [deleted file]
helm/style/content.xsl.csc [deleted file]
helm/style/content_senza_tipi.13.9.00.xsl [deleted file]
helm/style/mml2mmlv1_0.xsl
helm/style/mml2mmlv1_0_original.xsl [deleted file]
helm/style/mmlextension_andrea.xsl [deleted file]
helm/style/mmlextension_irene.xsl [deleted file]
helm/style/objcontent.xsl.csc [deleted file]
helm/style/objcontent_old.xsl [deleted file]
helm/style/proof31-10-00.xsl [deleted file]
helm/style/rootcontent.xsl
helm/style/rootcontent_withproofs.xsl [deleted file]
helm/style/roottheory.xsl
helm/style/style_prima_del_linguaggio_naturale/annotatedcont.xsl.csc [deleted file]
helm/style/style_prima_del_linguaggio_naturale/content.xsl.csc [deleted file]
helm/style/style_prima_del_linguaggio_naturale/mmlextension_andrea.xsl [deleted file]
helm/style/style_prima_del_linguaggio_naturale/mmlextension_irene.xsl [deleted file]
helm/style/style_prima_del_linguaggio_naturale/objcontent.xsl.csc [deleted file]
helm/style/style_prima_del_linguaggio_naturale/objcontent_old.xsl [deleted file]
helm/style/style_prima_del_linguaggio_naturale/rootcontent_withproofs.xsl [deleted file]
helm/style/theory_pres.xsl

diff --git a/helm/style/annotatedcont.xsl.csc b/helm/style/annotatedcont.xsl.csc
deleted file mode 100644 (file)
index 3508d6b..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0"?>
-
-<!--***********************************************************************--> 
-<!-- XSLT version 0.1 of annotated MathML content to MathML presentation:  -->
-<!-- First draft: March 29 2000, Claudio Sacerdoti Coen, Irene Schena      -->
-<!--***********************************************************************--> 
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                              xmlns:m="http://www.w3.org/1998/Math/MathML">
-
-<xsl:import href="objcontent.xsl"/>
-
-<xsl:template match="Definition|Axiom|CurrentProof|InductiveDefinition|Variable">
-    <xsl:choose>
-    <xsl:when test="'annotation' != name(*[1])">
-     <xsl:apply-templates select="." mode="noannot"/>
-    </xsl:when>
-    <xsl:otherwise>
-     <annotation>
-      <xsl:apply-templates select="annotation"/>
-     </annotation>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<xsl:template match="LAMBDA|PROD|CAST|REL|SORT|APPLY|VAR|META|CONST|MUTIND|MUTCONSTRUCT|MUTCASE|FIX|COFIX">
-  <xsl:param name="backpointer" select="''"/>
-    <xsl:choose>
-    <xsl:when test="'Annotation' != name(*[1])">
-     <m:math>
-      <xsl:apply-templates select="." mode="noannot">
-       <xsl:with-param name="backpointer" select="$backpointer"/>
-      </xsl:apply-templates>
-     </m:math>
-    </xsl:when>
-    <xsl:otherwise>
-     <annotation>
-      <xsl:apply-templates select="Annotation"/>
-     </annotation>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<!-- DA MODIFICARE PER GESTIRE I RIFERIMENTI A SOTTOANNOTAZIONI O NODI MATH -->
-
-<xsl:template match="nephew">
- <xsl:variable name="select" select="@no"/>
- <xsl:apply-templates select="../../*[2]/*[number($select)]"/>
-</xsl:template>
-
-<xsl:template match="brother">
- <xsl:variable name="select" select="@no"/>
- <xsl:apply-templates select="../../*[number($select) + 1]"/>
-</xsl:template>
-
-<xsl:template match="name">
- <xsl:value-of select="../../*[2]/@name"/>
-</xsl:template>
-
-<xsl:template match="nephew-name">
- <xsl:variable name="select" select="@no"/>
- <xsl:value-of select="../../*[2]/*[number($select)]/@name"/>
-</xsl:template>
-
-</xsl:stylesheet>
-
diff --git a/helm/style/content.xsl.csc b/helm/style/content.xsl.csc
deleted file mode 100644 (file)
index 5f7c1e1..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-<?xml version="1.0"?>
-
-<!--******************************************************************--> 
-<!-- XSLT version 0.1 of CIC objects to MathML content:               -->
-<!-- First draft: February 14 2000, Andrea Asperti, Irene Schena      -->
-<!-- Revised: March 3 2000, Irene Schena                              -->
-<!-- Revised: March 10 2000, Irene Schena                             -->
-<!-- Revised: March 15 2000, Claudio Sacerdoti Coen, Irene Schena     -->
-<!--******************************************************************-->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                              xmlns:m="http://www.w3.org/1998/Math/MathML">
-
-<xsl:include href="params.xsl"/>
-
-<!--<xsl:output
-           method="xml" 
-           version="1.0" 
-           encoding="ISO-8859-1" 
-           omit-xml-declaration="no"
-           standalone="no" 
-           doctype-public="http://www.w3.org/TR/REC-MathML" 
-           indent="yes"
-           media-type="text/mathml" /> -->
-
-<!-- DA FARE: 
-1)risolvere nella fase di pre-processing le uri relative, settando l'attributo
-definitionURL dell'oggetto corrispondente (alcuni punteranno a nulla! -quelli 
-che non hanno il file di definizione corrispondente-); [le uri assolute hanno
-la forma cic:/.../ in definitionURL e questo schema di uri verra' risolto da
-Amaya o da chi di dovere in /really_very_local/helm/PARSER/example/.../]
-2)aggiungere nei file xml gli ID, affinche' nello stylesheet si setti
-l'attributo xref di ogni oggetto per puntare (tramite ID) al suo corrispondente
-della rappresentazione interna. 
--->
-
-<!--******************************************************************-->
-<!-- Variable containing the absolute path of the CIC file            -->
-<!--******************************************************************-->
-
-<xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>
-
-<!-- CIC TERMS -->
-
-<xsl:template match="LAMBDA" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:lambda>
-     <m:bvar>
-      <m:ci>
-       [[<xsl:value-of select="$backpointer"/>]]
-       <xsl:value-of select="target/@binder"/>
-      </m:ci>
-      <m:type>
-       <xsl:apply-templates select="source/*[1]" mode="noannot">
-        <xsl:with-param name="backpointer" select="concat($backpointer,'/*[1]/*[1]')"/>
-       </xsl:apply-templates>
-      </m:type>
-     </m:bvar>
-     <xsl:apply-templates select="target/*[1]" mode="noannot">
-      <xsl:with-param name="backpointer" select="concat($backpointer,'/*[2]/*[1]')"/>
-     </xsl:apply-templates>
-    </m:lambda>
-</xsl:template>
-
-<xsl:template match="PROD" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:apply>
-     <xsl:choose>
-     <xsl:when test="string(target/@binder)= &quot;&quot;">
-      <m:csymbol>arrow</m:csymbol>
-      <xsl:apply-templates select="source/*[1]" mode="noannot">
-       <xsl:with-param name="backpointer" select="concat($backpointer,'/*[1]/*[1]')"/>
-      </xsl:apply-templates>
-     </xsl:when>
-     <xsl:otherwise>
-      <m:csymbol>prod</m:csymbol>
-       <m:bvar>
-        <m:ci>
-         [[<xsl:value-of select="$backpointer"/>]]
-         <xsl:value-of select="target/@binder"/>
-        </m:ci>
-        <m:type>
-         <xsl:apply-templates select="source/*[1]" mode="noannot">
-          <xsl:with-param name="backpointer" select="concat($backpointer,'/*[1]/*[1]')"/>
-         </xsl:apply-templates>
-        </m:type>
-       </m:bvar>
-     </xsl:otherwise>
-     </xsl:choose>
-     <xsl:apply-templates select="target/*[1]" mode="noannot">
-      <xsl:with-param name="backpointer" select="concat($backpointer,'/*[2]/*[1]')"/>
-     </xsl:apply-templates>
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="CAST" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:apply>
-     <m:csymbol>cast</m:csymbol>
-     <xsl:apply-templates mode="noannot" select="*[1]/*[1]">
-      <xsl:with-param name="backpointer" select="concat($backpointer,'/*[1]/*[1]')"/>
-     </xsl:apply-templates>
-     <xsl:apply-templates mode="noannot" select="*[2]/*[1]">
-      <xsl:with-param name="backpointer" select="concat($backpointer,'/*[2]/*[1]')"/>
-     </xsl:apply-templates>
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="REL" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:ci>
-     [[<xsl:value-of select="$backpointer"/>]]
-     <xsl:value-of select="@binder"/>
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="SORT" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:apply>
-     <m:csymbol>
-      <xsl:value-of select="@value"/>
-     </m:csymbol>
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="APPLY" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:apply>
-    <m:csymbol>app</m:csymbol>
-     <xsl:for-each select="*">
-      <xsl:apply-templates mode="noannot" select=".">
-       <xsl:with-param name="backpointer" select="concat($backpointer,'/*[',position(),']')"/>
-      </xsl:apply-templates>
-     </xsl:for-each>
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="VAR" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:ci>
-     [[<xsl:value-of select="$backpointer"/>]]
-     <xsl:value-of select="substring-after(@relUri,&quot;,&quot;)"/>
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="META" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:ci>
-     [[<xsl:value-of select="$backpointer"/>]]
-     <xsl:value-of select="@no"/>
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="CONST" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:ci definitionURL="{@uri}">
-     [[<xsl:value-of select="$backpointer"/>]]
-     <xsl:call-template name="name_of_uri">
-      <xsl:with-param name="uri" select="@uri"/>
-     </xsl:call-template>
-     <!-- <xsl:value-of select="document(concat(string($absPath),@uri))/*/@name"/> -->
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="MUTIND" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:ci definitionURL="{@uri}">
-     <xsl:variable name="index"><xsl:value-of select="@noType"/></xsl:variable>
-     [[<xsl:value-of select="$backpointer"/>]]
-     <xsl:value-of select="document(concat(string($absPath),@uri))/InductiveDefinition/InductiveType[position()=number($index)+1]/@name"/>
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="MUTCONSTRUCT" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:ci definitionURL="{@uri}">
-     <xsl:variable name="Tindex"><xsl:value-of select="@noType"/></xsl:variable>
-     <xsl:variable name="Cindex"><xsl:value-of select="@noConstr"/></xsl:variable>
-     [[<xsl:value-of select="$backpointer"/>]]
-     <xsl:value-of select="document(concat(string($absPath),@uri))/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($Cindex)]/@name"/>
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="MUTCASE" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <xsl:variable name="Tindex"><xsl:value-of select="@noType"/></xsl:variable>
-    <xsl:variable name="Turi"><xsl:value-of select="@uriType"/></xsl:variable>
-    <m:apply>
-     <m:csymbol>mutcase</m:csymbol>
-     <xsl:apply-templates select="patternsType/*[1]" mode="noannot">
-       <xsl:with-param name="backpointer" select="concat($backpointer,'/*[1]/*[1]')"/>
-     </xsl:apply-templates>
-     <xsl:apply-templates select="inductiveTerm/*[1]" mode="noannot">
-       <xsl:with-param name="backpointer" select="concat($backpointer,'/*[2]/*[1]')"/>
-     </xsl:apply-templates>
-     <xsl:variable name="nop"><xsl:value-of select="document(concat(string($absPath),$Turi))/InductiveDefinition/@noParams"/></xsl:variable>
-     <xsl:for-each select="pattern">
-      <xsl:variable name="pos" select="position()"/>
-      <xsl:variable name="nopar"><xsl:apply-templates select="document(concat(string($absPath),$Turi))/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/*[1]" mode="counting"><xsl:with-param name="noparams" select="$nop"/></xsl:apply-templates></xsl:variable>
-      <xsl:choose>
-      <xsl:when test="$nopar = 0">
-       <m:ci>
-        <xsl:value-of select="document(concat(string($absPath),$Turi))/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/@name"/>
-       </m:ci>
-      </xsl:when>
-      <xsl:otherwise>
-       <m:apply>
-        <m:csymbol>app</m:csymbol>
-        <m:ci>
-         <xsl:value-of select="document(concat(string($absPath),$Turi))/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/@name"/>
-        </m:ci>
-        <xsl:apply-templates select="./*[1]" mode="abstparams"><xsl:with-param name="noparams" select="$nopar"/><xsl:with-param name="binder">LAMBDA</xsl:with-param></xsl:apply-templates>
-        </m:apply>
-       </xsl:otherwise>
-       </xsl:choose>
-      <xsl:apply-templates select="./*[1]" mode="abstparams"><xsl:with-param name="noparams" select="$nopar"/><xsl:with-param name="target" select="1"/><xsl:with-param name="binder">LAMBDA</xsl:with-param></xsl:apply-templates>
-     </xsl:for-each> 
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="FIX" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:apply>
-     <xsl:variable name="findex"><xsl:value-of select="@noFun"/></xsl:variable>
-     <m:csymbol>fix</m:csymbol>
-     <m:ci><xsl:value-of select="FixFunction[position()=number($findex)+1]/@name"/></m:ci>
-     <xsl:apply-templates mode="noannot" select="*"/>
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="COFIX" mode="noannot">
-   <m:apply>
-     <xsl:variable name="findex"><xsl:value-of select="@noFun"/></xsl:variable>
-     <m:csymbol>cofix</m:csymbol>
-     <m:ci><xsl:value-of select="CofixFunction[position()=number($findex)+1]/@name"/></m:ci>
-     <xsl:apply-templates mode="noannot" select="*"/>
-    </m:apply>
-</xsl:template>
-
-<!-- ELEMENTS OF CIC TERMS -->
-
-<xsl:template match="FixFunction" mode="noannot">
-    <m:bvar>
-     <m:ci><xsl:value-of select="@name"/></m:ci>
-     <m:type><xsl:apply-templates select="type/*[1]" mode="noannot"/></m:type>
-    </m:bvar> 
-    <xsl:apply-templates select="body/*[1]" mode="noannot"/>
-</xsl:template>
-
-<xsl:template match="CofixFunction" mode="noannot">
-    <m:bvar>
-     <m:ci><xsl:value-of select="@name"/></m:ci>
-     <m:type><xsl:apply-templates select="type/*[1]" mode="noannot"/></m:type>
-    </m:bvar> 
-    <xsl:apply-templates select="body/*[1]" mode="noannot"/>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/helm/style/content_senza_tipi.13.9.00.xsl b/helm/style/content_senza_tipi.13.9.00.xsl
deleted file mode 100644 (file)
index 7de9987..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0"?>
-
-<!--******************************************************************--> 
-<!-- XSLT version 0.1 of CIC objects to MathML content:               -->
-<!-- First draft: February 14 2000, Andrea Asperti, Irene Schena      -->
-<!-- Revised: March 3 2000, Irene Schena                              -->
-<!-- Revised: March 10 2000, Irene Schena                             -->
-<!-- Revised: March 15 2000, Claudio Sacerdoti Coen, Irene Schena     -->
-<!--******************************************************************-->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                              xmlns:m="http://www.w3.org/1998/Math/MathML"
-                              xmlns:helm="http://www.cs.unibo.it/helm">
-
-<xsl:include href="params.xsl"/>
-
-<!--<xsl:output
-           method="xml" 
-           version="1.0" 
-           encoding="ISO-8859-1" 
-           omit-xml-declaration="no"
-           standalone="no" 
-           doctype-public="http://www.w3.org/TR/REC-MathML" 
-           indent="yes"
-           media-type="text/mathml" /> -->
-
-<!-- DA FARE: 
-1)risolvere nella fase di pre-processing le uri relative, settando l'attributo
-definitionURL dell'oggetto corrispondente (alcuni punteranno a nulla! -quelli 
-che non hanno il file di definizione corrispondente-); [le uri assolute hanno
-la forma cic:/.../ in definitionURL e questo schema di uri verra' risolto da
-Amaya o da chi di dovere in /really_very_local/helm/PARSER/example/.../]
-2)aggiungere nei file xml gli ID, affinche' nello stylesheet si setti
-l'attributo xref di ogni oggetto per puntare (tramite ID) al suo corrispondente
-della rappresentazione interna. 
--->
-
-<!--******************************************************************-->
-<!-- Variable containing the absolute path of the CIC file            -->
-<!--******************************************************************-->
-
-<xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>
-
-<!-- CIC TERMS -->
-
-<xsl:template match="LAMBDA" mode="noannot">
-    <m:lambda helm:xref="{@id}">
-     <m:bvar>
-      <m:ci>
-       <xsl:value-of select="target/@binder"/>
-      </m:ci>
-      <m:type>
-       <xsl:apply-templates select="source/*[1]" mode="noannot"/>
-      </m:type>
-     </m:bvar>
-     <xsl:apply-templates select="target/*[1]" mode="noannot"/>
-    </m:lambda>
-</xsl:template>
-
-<xsl:template match="PROD" mode="noannot">
-    <m:apply helm:xref="{@id}">
-     <xsl:choose>
-     <xsl:when test="string(target/@binder)= &quot;&quot;">
-      <m:csymbol>arrow</m:csymbol>
-      <xsl:apply-templates select="source/*[1]" mode="noannot"/>
-     </xsl:when>
-     <xsl:otherwise>
-      <m:csymbol>prod</m:csymbol>
-       <m:bvar>
-        <m:ci>
-         <xsl:value-of select="target/@binder"/>
-        </m:ci>
-        <m:type>
-         <xsl:apply-templates select="source/*[1]" mode="noannot"/>
-        </m:type>
-       </m:bvar>
-     </xsl:otherwise>
-     </xsl:choose>
-     <xsl:apply-templates select="target/*[1]" mode="noannot"/>
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="CAST" mode="noannot">
-    <m:apply helm:xref="{@id}">
-     <m:csymbol>cast</m:csymbol>
-     <xsl:apply-templates mode="noannot" select="*/*"/>
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="REL" mode="noannot">
-    <m:ci helm:xref="{@id}">
-     <xsl:value-of select="@binder"/>
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="SORT" mode="noannot">
-    <m:apply helm:xref="{@id}">
-     <m:csymbol>
-      <xsl:value-of select="@value"/>
-     </m:csymbol>
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="APPLY" mode="noannot">
-    <m:apply helm:xref="{@id}">
-    <m:csymbol>app</m:csymbol>
-     <xsl:apply-templates mode="noannot" select="*"/>
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="VAR" mode="noannot">
-    <m:ci helm:xref="{@id}">
-     <xsl:value-of select="substring-after(@relUri,&quot;,&quot;)"/>
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="META" mode="noannot">
-    <m:ci helm:xref="{@id}">
-     <xsl:value-of select="@no"/>
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="CONST" mode="noannot">
-    <m:ci definitionURL="{@uri}" helm:xref="{@id}">
-     <xsl:call-template name="name_of_uri">
-      <xsl:with-param name="uri" select="@uri"/>
-     </xsl:call-template>
-     <!-- <xsl:value-of select="document(concat(string($absPath),@uri))/*/@name"/> -->
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="MUTIND" mode="noannot">
-    <m:ci definitionURL="{@uri}" helm:xref="{@id}">
-     <xsl:variable name="index"><xsl:value-of select="@noType"/></xsl:variable>
-     <xsl:value-of select="document(concat(string($absPath),@uri))/InductiveDefinition/InductiveType[position()=number($index)+1]/@name"/>
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="MUTCONSTRUCT" mode="noannot">
-    <m:ci definitionURL="{@uri}" helm:xref="{@id}">
-     <xsl:variable name="Tindex"><xsl:value-of select="@noType"/></xsl:variable>
-     <xsl:variable name="Cindex"><xsl:value-of select="@noConstr"/></xsl:variable>
-     <xsl:value-of select="document(concat(string($absPath),@uri))/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($Cindex)]/@name"/>
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="MUTCASE" mode="noannot">
-    <xsl:variable name="Tindex"><xsl:value-of select="@noType"/></xsl:variable>
-    <xsl:variable name="Turi"><xsl:value-of select="@uriType"/></xsl:variable>
-    <m:apply helm:xref="{@id}">
-     <m:csymbol>mutcase</m:csymbol>
-     <xsl:apply-templates select="patternsType/*[1]" mode="noannot"/>
-     <xsl:apply-templates select="inductiveTerm/*[1]" mode="noannot"/>
-     <xsl:variable name="nop"><xsl:value-of select="document(concat(string($absPath),$Turi))/InductiveDefinition/@noParams"/></xsl:variable>
-     <xsl:for-each select="pattern">
-      <xsl:variable name="pos" select="position()"/>
-      <xsl:variable name="nopar"><xsl:apply-templates select="document(concat(string($absPath),$Turi))/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/*[1]" mode="counting"><xsl:with-param name="noparams" select="$nop"/></xsl:apply-templates></xsl:variable>
-      <xsl:choose>
-      <xsl:when test="$nopar = 0">
-       <m:ci>
-        <xsl:value-of select="document(concat(string($absPath),$Turi))/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/@name"/>
-       </m:ci>
-      </xsl:when>
-      <xsl:otherwise>
-       <m:apply>
-        <m:csymbol>app</m:csymbol>
-        <m:ci>
-         <xsl:value-of select="document(concat(string($absPath),$Turi))/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/@name"/>
-        </m:ci>
-        <xsl:apply-templates select="./*[1]" mode="abstparams"><xsl:with-param name="noparams" select="$nopar"/><xsl:with-param name="binder">LAMBDA</xsl:with-param></xsl:apply-templates>
-        </m:apply>
-       </xsl:otherwise>
-       </xsl:choose>
-      <xsl:apply-templates select="./*[1]" mode="abstparams"><xsl:with-param name="noparams" select="$nopar"/><xsl:with-param name="target" select="1"/><xsl:with-param name="binder">LAMBDA</xsl:with-param></xsl:apply-templates>
-     </xsl:for-each> 
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="FIX" mode="noannot">
-    <m:apply helm:xref="{@id}">
-     <xsl:variable name="findex"><xsl:value-of select="@noFun"/></xsl:variable>
-     <m:csymbol>fix</m:csymbol>
-     <m:ci><xsl:value-of select="FixFunction[position()=number($findex)+1]/@name"/></m:ci>
-     <xsl:apply-templates mode="noannot" select="*"/>
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="COFIX" mode="noannot">
-   <m:apply helm:xref="{@id}">
-     <xsl:variable name="findex"><xsl:value-of select="@noFun"/></xsl:variable>
-     <m:csymbol>cofix</m:csymbol>
-     <m:ci><xsl:value-of select="CofixFunction[position()=number($findex)+1]/@name"/></m:ci>
-     <xsl:apply-templates mode="noannot" select="*"/>
-    </m:apply>
-</xsl:template>
-
-<!-- ELEMENTS OF CIC TERMS -->
-
-<xsl:template match="FixFunction" mode="noannot">
-    <m:bvar>
-     <m:ci><xsl:value-of select="@name"/></m:ci>
-     <m:type><xsl:apply-templates select="type/*[1]" mode="noannot"/></m:type>
-    </m:bvar> 
-    <xsl:apply-templates select="body/*[1]" mode="noannot"/>
-</xsl:template>
-
-<xsl:template match="CofixFunction" mode="noannot">
-    <m:bvar>
-     <m:ci><xsl:value-of select="@name"/></m:ci>
-     <m:type><xsl:apply-templates select="type/*[1]" mode="noannot"/></m:type>
-    </m:bvar> 
-    <xsl:apply-templates select="body/*[1]" mode="noannot"/>
-</xsl:template>
-
-</xsl:stylesheet>
index 67e1accfbe2189c9776317d4566a483c1c3a6311..330da7a24d6e6806e353ed10840b27f4ce6fc603 100644 (file)
 <!--  Added the declaration of the xlink namespace          --> 
 <!-- ====================================================== -->
 
+<!-- ====================================================== -->
+<!--  June, 2000 - HELM group:                              -->
+<!--  Added auxiliary function to inser:                    -->
+<!--  1) backwards pointers: helm:xref                      -->
+<!--  2) references to definitions: xlink:href              -->
+<!--  Added call-templates to the functions:                -->
+<!--  insert_xref, insert, insert1, insert2                 -->
+<!-- ====================================================== -->
+
+
+<!-- HELM: namespace helm added -->
 <xsl:stylesheet id="mml2mml"
                 version="1.0"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -67,7 +78,7 @@
 <xsl:variable name="NEG_PREC" select="13"/>
 <xsl:variable name="FUNCTION_PREC" select="99"/>
 
-<!-- AUXILIARY FUNCTIONS FOR BACKWARD POINTERS AND REFS (by andrea) -->
+<!-- HELM: auxiliary functions for backwards pointers and refs -->
 
 <xsl:template name = "insert_xref">
  <xsl:if test="@helm:xref">
  </xsl:if>
 </xsl:template>
 
-<!-- for use inside m:apply -->
+<!-- HELM: for use inside m:apply -->
 <xsl:template name = "insert1">
  <xsl:if test="*[1]/@definitionURL">
   <xsl:attribute name="xlink:href">
  </xsl:if>
 </xsl:template>
 
-<!-- For use inside "for-each" -->
+<!-- HELM: for use inside "for-each" -->
 <xsl:template name = "insert2">
  <xsl:if test="../*[1]/@definitionURL">
   <xsl:attribute name="xlink:href">
  </m:mrow>
 </xsl:template>
 
-<!-- These "semantical" Transformations are REALLY questionable.
+<!-- HELM: these "semantical" Transformations are REALLY questionable.
      Andrea -->
 
 <xsl:template match = "m:apply[*[1][self::m:inverse]]">
   </xsl:apply-templates>
   <xsl:if test="*[3]">
     <xsl:for-each select = "*[position()>2]">
-<!-- MODIFICA PROVVISORIA -->
+<!-- HELM: MODIFICA PROVVISORIA -->
 <!--      <m:mo><xsl:call-template name="insert2"/>
                 <mchar name="InvisibleTimes"/> </m:mo> -->
       <m:mo><xsl:call-template name="insert2"/>*</m:mo>
   </xsl:if>
 </xsl:template>
 
-<!-- COMMENTO : dove metto la uri della definizione di radice ???? -->
+<!-- HELM: COMMENTO : dove metto la uri della definizione di radice ???? -->
 
 <xsl:template match = "m:apply[m:root[1]]">
   <m:msqrt>
 </xsl:template>
 
 </xsl:stylesheet>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/helm/style/mml2mmlv1_0_original.xsl b/helm/style/mml2mmlv1_0_original.xsl
deleted file mode 100644 (file)
index 44c34df..0000000
+++ /dev/null
@@ -1,1848 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- ====================================================== -->
-<!-- XSL Transform of MathML content to MathML presentation -->
-<!--    By Igor Rodionov, Computer Science Department of    -->
-<!--   the University of Western Ontario, London, Canada    -->
-<!--  Complies with the W3C Working Draft from Dec.3, 1999  -->
-<!--             Version x.xx from Feb. 18, 2000            -->
-<!--              Comments to:  igor@csd.uwo.ca             -->
-<!--                                                        -->
-<!-- (C) Copyright 1999, 2000 Symbolic Computation          -->
-<!--     Laboratory, University of Western Ontario.         -->
-<!-- ====================================================== -->
-
-<!-- ====================================================== -->
-<!--  May 11, 2000 - HELM group:                            -->
-<!--  Added the namespace prefix to all the output elements -->
-<!--  Changed the mml prefix into m                         -->
-<!--  Swapped math element out of the semantic element      -->
-<!--  Added the declaration of the xlink namespace          --> 
-<!-- ====================================================== -->
-
-<xsl:stylesheet id="mml2mml"
-                version="1.0"
-                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:m="http://www.w3.org/1998/Math/MathML"
-                xmlns:xlink="http://www.w3.org/1999/xlink">
-
-<xsl:output method="xml" indent="yes" encoding="iso-8859-1"/>
-
-<!-- ***************************************************** -->
-<!--  Parameters affectin' stylesheet's run-time behavior  -->
-<!-- ***************************************************** -->
-
-<!-- SEM_SW: -1 - strip off all semantics
-             0  - pass semantics "as is" (default)
-             1  - add semantics at top level only
-             2  - add semantics at all levels
-             3  - semantics at top level with cross-references
--->
-<!-- HELM: SEM_SW was 0 -->
-<xsl:param name="SEM_SW" select="1"/>
-
-<!-- Miscellaneous Variable Definitions -->
-
-<xsl:variable name="NO" select="0"/>
-<xsl:variable name="YES" select="1"/>
-<xsl:variable name="PAR_NO" select="-7"/>
-<xsl:variable name="PAR_YES" select="-5"/>
-<xsl:variable name="PAR_SAME" select="-3"/>
-<xsl:variable name="NO_PARAM" select="-1"/>
-
-<!-- Operator Precedence Definitions -->
-
-<xsl:variable name="NO_PREC" select="0"/>
-<xsl:variable name="UNION_PREC" select="1"/>
-<xsl:variable name="SETDIFF_PREC" select="1"/>
-<xsl:variable name="INTERSECT_PREC" select="3"/>
-<xsl:variable name="OR_PREC" select="5"/>
-<xsl:variable name="XOR_PREC" select="5"/>
-<xsl:variable name="AND_PREC" select="7"/>
-<xsl:variable name="PLUS_PREC" select="9"/>
-<xsl:variable name="MINUS_PREC" select="9"/>
-<xsl:variable name="MUL_PREC" select="11"/>
-<xsl:variable name="DIV_PREC" select="11"/>
-<xsl:variable name="NEG_PREC" select="13"/>
-<xsl:variable name="FUNCTION_PREC" select="99"/>
-
-
-<!-- THE TOPMOST ELEMENT: MATH -->
-
-<xsl:template match = "m:math">
-  <xsl:choose>
-    <xsl:when test="$SEM_SW>0">
-<!-- HELM: deleted math (we have already inserted at object level) -->
-     <!--<m:math>-->
-      <m:semantics>
-          <xsl:apply-templates mode = "semantics"/>
-       <m:annotation-xml encoding="MathML">
-          <xsl:copy-of select = "*"/>
-       </m:annotation-xml>
-      </m:semantics>
-     <!--</m:math>-->
-    </xsl:when>
-    <xsl:otherwise>
-      <!--<m:math>-->
-        <xsl:apply-templates mode = "semantics"/>
-      <!--</m:math>-->  
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- SEMANTICS -->
-
-<xsl:template match = "m:*" mode = "semantics">
-  <xsl:param name="IN_PREC" select="$NO_PREC"/>
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:choose>
-    <xsl:when test="$SEM_SW=-1 and self::m:semantics">
-      <xsl:apply-templates select="*[1]">
-        <xsl:with-param name="IN_PREC" select="$IN_PREC"/>
-        <xsl:with-param name="PARAM" select="$PARAM"/>
-        <xsl:with-param name="PAREN" select="$PAREN"/>
-        <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="$SEM_SW=0 and self::m:semantics">
-      <m:semantics>
-        <xsl:apply-templates select="*[1]">
-          <xsl:with-param name="IN_PREC" select="$IN_PREC"/>
-          <xsl:with-param name="PARAM" select="$PARAM"/>
-          <xsl:with-param name="PAREN" select="$PAREN"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-        <xsl:copy-of select="m:annotation-xml"/>
-      </m:semantics>
-    </xsl:when>
-    <xsl:when test="$SEM_SW=2">
-      <m:semantics>
-        <xsl:choose>
-          <xsl:when test="self::m:semantics">
-            <xsl:apply-templates select="*[1]">
-              <xsl:with-param name="IN_PREC" select="$IN_PREC"/>
-              <xsl:with-param name="PARAM" select="$PARAM"/>
-              <xsl:with-param name="PAREN" select="$PAREN"/>
-              <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-            </xsl:apply-templates>
-            <xsl:copy-of select="m:annotation-xml"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates select=".">
-              <xsl:with-param name="IN_PREC" select="$IN_PREC"/>
-              <xsl:with-param name="PARAM" select="$PARAM"/>
-              <xsl:with-param name="PAREN" select="$PAREN"/>
-              <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-            </xsl:apply-templates>
-            <m:annotation-xml encoding="MathML">
-              <xsl:copy-of select="."/>
-            </m:annotation-xml>
-          </xsl:otherwise>
-        </xsl:choose>
-      </m:semantics>
-    </xsl:when>
-    <xsl:when test="$SEM_SW=3 and @id">
-      <m:mrow idref="{@id}">
-        <xsl:apply-templates select=".">
-          <xsl:with-param name="IN_PREC" select="$IN_PREC"/>
-          <xsl:with-param name="PARAM" select="$PARAM"/>
-          <xsl:with-param name="PAREN" select="$PAREN"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mrow>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select=".">
-        <xsl:with-param name="IN_PREC" select="$IN_PREC"/>
-        <xsl:with-param name="PARAM" select="$PARAM"/>
-        <xsl:with-param name="PAREN" select="$PAREN"/>
-        <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:semantics">
-  <xsl:apply-templates select="*[1]" mode = "semantics"/>
-</xsl:template>
-
-
-<!-- BASIC ELEMENTS -->
-
-<xsl:template match = "m:cn">
-  <xsl:param name="IN_PREC" select="$NO_PREC"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:choose>
-    <xsl:when test=". &lt; 0 and $IN_PREC &gt; 0 and $PAREN=$PAR_NO and $PAR_NO_IGNORE=$NO">
-      <m:mfenced separators="">
-        <xsl:apply-templates select="." mode="cn"/>
-      </m:mfenced>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="." mode="cn"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:cn" mode="cn">
-  <xsl:choose>
-    <xsl:when test="@base and (not(@type) or @type='integer' or @type='real')">
-      <m:msub>
-        <m:mn> <xsl:apply-templates mode = "semantics"/> </m:mn>
-        <m:mn> <xsl:value-of select="@base"/> </m:mn>
-      </m:msub>
-    </xsl:when>
-    <xsl:when test="@type='complex' and not(@base) and child::m:sep[1]">
-      <m:mfenced separators="">
-        <m:mn> <xsl:apply-templates select="text()[1]" mode = "semantics"/> </m:mn>
-        <xsl:if test="text()[2] &lt; 0">
-          <m:mo>-</m:mo>
-          <m:mn> <xsl:value-of select="-text()[2]"/> </m:mn>
-        </xsl:if>
-        <xsl:if test="not(text()[2] &lt; 0)">
-          <m:mo>+</m:mo>
-          <xsl:apply-templates select="text()[2]" mode = "semantics"/>
-        </xsl:if>
-        <m:mo> <mchar name="InvisibleTimes"/> </m:mo>
-        <m:mo>i</m:mo>
-      </m:mfenced>
-    </xsl:when>
-    <xsl:when test="@type='complex' and @base and child::m:sep[1]">
-      <m:msub>
-        <m:mfenced separators="">
-          <m:mn> <xsl:apply-templates select="text()[1]" mode = "semantics"/> </m:mn>
-          <xsl:if test="text()[2] &lt; 0">
-            <m:mo>-</m:mo>
-            <m:mn> <xsl:value-of select="-text()[2]"/> </m:mn>
-          </xsl:if>
-          <xsl:if test="not(text()[2] &lt; 0)">
-            <m:mo>+</m:mo>
-            <m:mn> <xsl:apply-templates select="text()[2]" mode = "semantics"/> </m:mn>
-          </xsl:if>
-          <m:mo> <mchar name="InvisibleTimes"/> </m:mo>
-          <m:mo>i</m:mo>
-        </m:mfenced>
-        <m:mn> <xsl:value-of select="@base"/> </m:mn>
-      </m:msub>
-    </xsl:when>
-    <xsl:when test="@type='rational' and not(@base) and child::m:sep[1]">
-      <m:mrow>
-        <m:mn> <xsl:apply-templates select="text()[1]" mode = "semantics"/> </m:mn>
-        <m:mo>/</m:mo>
-        <m:mn> <xsl:apply-templates select="text()[2]" mode = "semantics"/> </m:mn>
-      </m:mrow>
-    </xsl:when>
-    <xsl:when test="@type='rational' and @base and child::m:sep[1]">
-      <m:msub>
-        <m:mfenced separators="">
-          <m:mn> <xsl:apply-templates select="text()[1]" mode = "semantics"/> </m:mn>
-          <m:mo>/</m:mo>
-          <m:mn> <xsl:apply-templates select="text()[2]" mode = "semantics"/> </m:mn>
-        </m:mfenced>
-        <m:mn> <xsl:value-of select="@base"/> </m:mn>
-      </m:msub>
-    </xsl:when>
-    <xsl:when test="@type='polar' and not(@base) and child::m:sep[1]">
-      <m:mrow>
-        <m:mo>Polar</m:mo>
-        <m:mfenced separators=",">
-          <m:mn> <xsl:apply-templates select="text()[1]" mode = "semantics"/> </m:mn>
-          <m:mn> <xsl:apply-templates select="text()[2]" mode = "semantics"/> </m:mn>
-        </m:mfenced>
-      </m:mrow>
-    </xsl:when>
-    <xsl:when test="@type='polar' and @base and child::m:sep[1]">
-      <m:msub>
-        <m:mrow>
-          <m:mo>Polar</m:mo>
-          <m:mfenced separators=",">
-            <m:mn> <xsl:apply-templates select="text()[1]" mode = "semantics"/> </m:mn>
-            <m:mn> <xsl:apply-templates select="text()[2]" mode = "semantics"/> </m:mn>
-          </m:mfenced>
-        </m:mrow>
-        <m:mn> <xsl:value-of select="@base"/> </m:mn>
-      </m:msub>
-   </xsl:when>
-    <xsl:otherwise>
-      <m:mn> <xsl:apply-templates mode = "semantics"/> </m:mn>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:ci">
-  <xsl:choose>
-    <xsl:when test="@type='vector' or @type=matrix or @type=set">
-      <m:mi fontweight="bold"> <xsl:apply-templates mode = "semantics"/> </m:mi>
-    </xsl:when>
-    <xsl:otherwise>
-<!-- HELM: aggiunta choose temporanea per HREF invece di:
-<m:mi> <xsl:apply-templates mode = "semantics"/> </m:mi>-->
-     <xsl:choose>
-     <xsl:when test="string(@definitionURL) = &quot;&quot;">
-      <m:mi> <xsl:apply-templates mode = "semantics"/> </m:mi>
-     </xsl:when>
-     <xsl:otherwise>
-      <m:mi xlink:href="{@definitionURL}"> <xsl:apply-templates mode = "semantics"/> </m:mi>
-     </xsl:otherwise>
-     </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:csymbol">
-  <xsl:choose>
-    <xsl:when test="*[1]">
-      <xsl:copy-of select = "*"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <m:mo> <xsl:apply-templates mode = "semantics"/> </m:mo>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-
-<!-- BASIC CONTENT ELEMENTS -->
-
-<xsl:template match = "m:apply[m:fn[1]]">
-  <m:mrow>
-    <xsl:apply-templates select = "m:fn[1]" mode = "semantics"/>
-    <m:mfenced separators=",">
-      <xsl:apply-templates select = "*[position()>1]" mode = "semantics"/>
-    </m:mfenced>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:fn">
-  <xsl:apply-templates select = "*[1]" mode = "semantics">
-    <xsl:with-param name="IN_PREC" select="$FUNCTION_PREC"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match = "m:interval">
-  <xsl:choose>
-    <xsl:when test="@closure='closed'">
-      <m:mfenced open="[" close="]" separators=",">
-        <xsl:apply-templates mode = "semantics"/>
-      </m:mfenced>
-    </xsl:when>
-    <xsl:when test="@closure='open'">
-      <m:mfenced separators=",">
-        <xsl:apply-templates mode = "semantics"/>
-      </m:mfenced>
-    </xsl:when>
-    <xsl:when test="@closure='open-closed'">
-      <m:mfenced open="(" close="]" separators=",">
-        <xsl:apply-templates mode = "semantics"/>
-      </m:mfenced>
-    </xsl:when>
-    <xsl:when test="@closure='closed-open'">
-      <m:mfenced open="[" close=")" separators=",">
-        <xsl:apply-templates mode = "semantics"/>
-      </m:mfenced>
-    </xsl:when>
-    <xsl:otherwise>
-      <m:mfenced open="[" close="]" separators=",">
-        <xsl:apply-templates mode = "semantics"/>
-      </m:mfenced>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:*[1][self::m:apply[m:inverse[1]]]]">
-  <m:mrow>
-    <xsl:apply-templates select = "*[1]" mode = "semantics"/>
-    <m:mfenced separators=",">
-      <xsl:apply-templates select = "*[position()>1]" mode = "semantics"/>
-    </m:mfenced>
- </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[*[1][self::m:inverse]]">
-  <xsl:choose>
-    <xsl:when test="*[2]=m:exp">
-      <m:mo>ln</m:mo>
-    </xsl:when>
-    <xsl:when test="*[2]=m:ln | m:log">
-      <m:mo>exp</m:mo>
-    </xsl:when>
-    <xsl:when test="*[2]=m:sin">
-      <m:mo>arcsin</m:mo>
-    </xsl:when>
-    <xsl:when test="*[2]=m:cos">
-      <m:mo>arccos</m:mo>
-    </xsl:when>
-    <xsl:when test="*[2]=m:tan">
-      <m:mo>arctan</m:mo>
-    </xsl:when>
-    <xsl:when test="*[2]=m:sec">
-      <m:mo>arcsec</m:mo>
-    </xsl:when>
-    <xsl:when test="*[2]=m:csc">
-      <m:mo>arccsc</m:mo>
-    </xsl:when>
-    <xsl:when test="*[2]=m:cot">
-      <m:mo>arccot</m:mo>
-    </xsl:when>
-    <xsl:when test="*[2]=m:sinh">
-      <m:mo>arcsinh</m:mo>
-    </xsl:when>
-    <xsl:when test="*[2]=m:cosh">
-      <m:mo>arccosh</m:mo>
-    </xsl:when>
-    <xsl:when test="*[2]=m:tanh">
-      <m:mo>arctanh</m:mo>
-    </xsl:when>
-    <xsl:when test="*[2]=m:sech">
-      <m:mo>arcsech</m:mo>
-    </xsl:when>
-    <xsl:when test="*[2]=m:csch">
-      <m:mo>arccsch</m:mo>
-    </xsl:when>
-    <xsl:when test="*[2]=m:coth">
-      <m:mo>arccoth</m:mo>
-    </xsl:when>
-    <xsl:when test="*[2]=m:arcsin">
-      <m:mo>sin</m:mo>
-    </xsl:when>
-    <xsl:when test="*[2]=m:arccos">
-      <m:mo>cos</m:mo>
-    </xsl:when>
-    <xsl:when test="*[2]=m:arctan">
-      <m:mo>tan</m:mo>
-    </xsl:when>
-    <xsl:otherwise>
-      <m:msup>
-        <xsl:apply-templates select = "*[2]" mode = "semantics"/>
-        <m:mfenced>
-          <m:mn>-1</m:mn>
-        </m:mfenced>
-      </m:msup>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:sep"/>
-
-<xsl:template match = "m:condition">
-  <xsl:choose>
-    <xsl:when test="parent::m:apply[m:forall[1]]"/>
-    <xsl:otherwise>
-      <xsl:if test="not(*[2])">
-        <xsl:apply-templates mode = "semantics"/>
-      </xsl:if>
-      <xsl:if test="*[2]">
-        <m:mrow>
-          <xsl:apply-templates mode = "semantics"/>
-        </m:mrow>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:declare"/>
-
-<xsl:template match = "m:lambda">
-  <m:mrow>
-    <m:mo> &#x039b; </m:mo>
-    <m:mfenced separators=",">
-      <xsl:for-each select = "*">
-        <xsl:choose>
-          <xsl:when test="self::m:ci or self::m:cn">
-            <xsl:apply-templates select = "." mode="semantics"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <m:mrow>
-              <xsl:apply-templates select = "." mode="semantics"/>
-            </m:mrow>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:for-each>
-    </m:mfenced>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:*[1][self::m:apply[m:compose[1]]]]">
-  <m:mrow>
-    <xsl:apply-templates select = "*[1]" mode = "semantics"/>
-    <m:mfenced separators=",">
-      <xsl:apply-templates select = "*[position()>1]" mode = "semantics"/>
-    </m:mfenced>
- </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[*[1][self::m:compose]]">
-  <m:mfenced separators="">
-    <xsl:apply-templates select = "m:*[2][self::m:ci[@type='fn'] | self::m:fn]" mode="semantics"/>
-    <xsl:for-each select = "m:*[position()>2][self::m:ci[@type='fn'] | self::m:fn]">
-      <m:mo> <mchar name="SmallCircle"/> </m:mo>
-      <xsl:apply-templates select = "." mode="semantics"/>
-    </xsl:for-each>
-  </m:mfenced>
-</xsl:template>
-
-<xsl:template match = "m:ident">
-  <m:mo>id</m:mo>
-</xsl:template>
-
-
-<!-- ARITHMETIC, ALGEBRA & LOGIC -->
-
-<xsl:template match = "m:apply[m:quotient[1]]">
-  <m:mfenced open="&#x230a;" close="&#x230b;" separators="">
-    <xsl:apply-templates select="*[2]" mode = "semantics">
-      <xsl:with-param name="IN_PREC" select="$FUNCTION_PREC"/>
-    </xsl:apply-templates>
-    <m:mo>/</m:mo>
-    <xsl:apply-templates select="*[3]" mode = "semantics">
-      <xsl:with-param name="IN_PREC" select="$FUNCTION_PREC"/>
-      <xsl:with-param name="PAR_NO_IGNORE" select="$NO"/>
-    </xsl:apply-templates>
-  </m:mfenced>
-</xsl:template>
-
-<xsl:template match = "m:apply[*[1][self::m:exp]]">
-  <m:msup>
-    <m:mo>e</m:mo>
-    <xsl:apply-templates select = "*[2]" mode = "semantics"/>
-  </m:msup>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:factorial[1]]">
-  <m:mrow>
-    <xsl:apply-templates select = "*[2]" mode = "semantics">
-      <xsl:with-param name="IN_PREC" select="$FUNCTION_PREC"/>
-      <xsl:with-param name="PAR_NO_IGNORE" select="$NO"/>
-    </xsl:apply-templates>
-    <m:mo>!</m:mo>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:max[1] | m:min[1]]">
-  <m:mrow>
-    <xsl:if test="*[2]=m:bvar">
-      <m:munder>
-        <xsl:if test="*[1]=m:max">
-          <m:mo>max</m:mo>
-        </xsl:if>
-        <xsl:if test="*[1]=m:min">
-          <m:mo>min</m:mo>
-        </xsl:if>
-        <xsl:apply-templates select="*[2]" mode = "semantics"/>
-      </m:munder>
-      <xsl:if test="*[3]=m:condition">
-        <m:mfenced open="{{" close="}}" separators="">
-          <m:mfenced open="" close="" separators=",">
-            <xsl:for-each select = "*[position()>3]">
-              <xsl:apply-templates select = "." mode="semantics"/>
-            </xsl:for-each>
-          </m:mfenced>
-          <m:mo>|</m:mo>
-          <xsl:apply-templates select="*[3]" mode = "semantics"/>
-        </m:mfenced>
-      </xsl:if>
-      <xsl:if test="not(*[3]=m:condition)">
-        <m:mfenced open="{{" close="}}" separators=",">
-          <xsl:for-each select = "*[position()>2]">
-            <xsl:apply-templates select = "." mode="semantics"/>
-          </xsl:for-each>
-        </m:mfenced>
-      </xsl:if>
-    </xsl:if>
-    <xsl:if test="*[2]=m:condition">
-      <xsl:if test="*[1]=m:max">
-        <m:mo>max</m:mo>
-      </xsl:if>
-      <xsl:if test="*[1]=m:min">
-        <m:mo>min</m:mo>
-      </xsl:if>
-      <m:mfenced open="{{" close="}}" separators="">
-        <xsl:if test="*[3]">
-          <m:mfenced open="" close="" separators=",">
-            <xsl:for-each select = "*[position()>2]">
-              <xsl:apply-templates select = "." mode="semantics"/>
-            </xsl:for-each>
-          </m:mfenced>
-          <m:mo>|</m:mo>
-        </xsl:if>
-        <xsl:apply-templates select="*[2]" mode = "semantics"/>
-      </m:mfenced>
-    </xsl:if>
-    <xsl:if test="not(*[2]=m:condition) and not(*[2]=m:bvar)">
-      <xsl:if test="*[1]=m:max">
-        <m:mo>max</m:mo>
-      </xsl:if>
-      <xsl:if test="*[1]=m:min">
-        <m:mo>min</m:mo>
-      </xsl:if>
-      <m:mfenced open="{{" close="}}" separators=",">
-        <xsl:for-each select = "*[position()>1]">
-          <xsl:apply-templates select = "." mode="semantics"/>
-        </xsl:for-each>
-      </m:mfenced>
-    </xsl:if>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:minus[1]]">
-  <xsl:param name="IN_PREC" select="$NO_PREC"/>
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:choose>
-    <xsl:when test="$IN_PREC &gt; $MINUS_PREC or $IN_PREC=$MINUS_PREC and $PARAM=$PAR_SAME">
-      <m:mfenced separators="">
-        <xsl:apply-templates select="." mode="minus">
-          <xsl:with-param name="PARAM" select="$PARAM"/>
-          <xsl:with-param name="PAREN" select="$PAR_YES"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mfenced>
-    </xsl:when>
-    <xsl:when test="$IN_PREC &gt; $NO_PREC and $IN_PREC &lt; $FUNCTION_PREC and not($SEM_SW=2)">
-      <xsl:apply-templates select="." mode="minus">
-        <xsl:with-param name="PARAM" select="$PARAM"/>
-        <xsl:with-param name="PAREN" select="$PAREN"/>
-        <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <m:mrow>
-        <xsl:apply-templates select="." mode="minus">
-          <xsl:with-param name="PARAM" select="$PARAM"/>
-          <xsl:with-param name="PAREN" select="$PAREN"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mrow>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:minus[1]]" mode="minus">
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:if test="not(*[3])">
-    <m:mo>-</m:mo>
-    <xsl:apply-templates select="*[2]" mode = "semantics">
-      <xsl:with-param name="IN_PREC" select="$NEG_PREC"/>
-      <xsl:with-param name="PAREN" select="$PAREN"/>
-      <xsl:with-param name="PAR_NO_IGNORE" select="$NO"/>
-    </xsl:apply-templates>
-  </xsl:if>
-  <xsl:if test="*[3]">
-    <xsl:apply-templates select="*[2]" mode = "semantics">
-      <xsl:with-param name="IN_PREC" select="$MINUS_PREC"/>
-      <xsl:with-param name="PARAM" select="$PARAM"/>
-      <xsl:with-param name="PAREN" select="$PAREN"/>
-      <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-    </xsl:apply-templates>
-    <m:mo>-</m:mo>
-    <xsl:apply-templates select="*[3]" mode = "semantics">
-      <xsl:with-param name="IN_PREC" select="$MINUS_PREC"/>
-      <xsl:with-param name="PARAM" select="$PAR_SAME"/>
-      <xsl:with-param name="PAREN" select="$PAREN"/>
-      <xsl:with-param name="PAR_NO_IGNORE" select="$NO"/>
-    </xsl:apply-templates>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:plus[1]]">
-  <xsl:param name="IN_PREC" select="$NO_PREC"/>
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:choose>
-    <xsl:when test="$IN_PREC &gt; $PLUS_PREC or $IN_PREC=$PLUS_PREC and $PARAM=$PAR_SAME">
-      <m:mfenced separators="">
-        <xsl:apply-templates select="." mode="plus">
-          <xsl:with-param name="PARAM" select="$IN_PREC"/>
-          <xsl:with-param name="PAREN" select="$PAR_YES"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mfenced>
-    </xsl:when>
-    <xsl:when test="$IN_PREC &gt; $NO_PREC and $IN_PREC &lt; $FUNCTION_PREC and not($SEM_SW=2)">
-      <xsl:apply-templates select="." mode="plus">
-        <xsl:with-param name="PARAM" select="$PARAM"/>
-        <xsl:with-param name="PAREN" select="$PAREN"/>
-        <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <m:mrow>
-        <xsl:apply-templates select="." mode="plus">
-          <xsl:with-param name="PARAM" select="$IN_PREC"/>
-          <xsl:with-param name="PAREN" select="$PAREN"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mrow>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:plus[1]]" mode="plus">
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:if test="*[2]">
-    <xsl:apply-templates select="*[2]" mode = "semantics">
-      <xsl:with-param name="IN_PREC" select="$PLUS_PREC"/>
-      <xsl:with-param name="PARAM" select="$PARAM"/>
-      <xsl:with-param name="PAREN" select="$PAREN"/>
-      <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-    </xsl:apply-templates>
-    <xsl:for-each select = "*[position()>2]">
-      <xsl:choose>
-        <xsl:when test=". &lt; 0">
-          <m:mo>-</m:mo>
-          <m:mn> <xsl:value-of select="-."/> </m:mn>
-        </xsl:when>
-        <xsl:when test="self::m:apply[m:minus[1]] and not(*[3])">
-          <xsl:apply-templates select="." mode = "semantics">
-            <xsl:with-param name="IN_PREC" select="$PLUS_PREC"/>
-            <xsl:with-param name="PAREN" select="$PAREN"/>
-            <xsl:with-param name="PAR_NO_IGNORE" select="$NO"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <m:mo>+</m:mo>
-          <xsl:apply-templates select="." mode = "semantics">
-            <xsl:with-param name="IN_PREC" select="$PLUS_PREC"/>
-            <xsl:with-param name="PAREN" select="$PAREN"/>
-            <xsl:with-param name="PAR_NO_IGNORE" select="$NO"/>
-          </xsl:apply-templates>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:for-each>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:power[1]]">
-  <xsl:choose>
-    <xsl:when test="*[2]=m:apply[m:ln[1] | m:log[1] | m:abs[1] | m:gcd[1] | m:sin[1] | m:cos[1] | m:tan[1] | m:sec[1] | m:csc[1] | m:cot[1] | m:sinh[1] | m:cosh[1] | m:tanh[1] | m:sech[1] | m:csch[1] | m:coth[1] | m:arcsin[1] | m:arccos[1] | m:arctan[1]]">
-      <xsl:apply-templates select="*[2]" mode = "semantics"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <m:msup>
-        <xsl:apply-templates select = "*[2]" mode = "semantics">
-          <xsl:with-param name="IN_PREC" select="$FUNCTION_PREC"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$NO"/>
-        </xsl:apply-templates>
-        <xsl:apply-templates select = "*[3]" mode = "semantics"/>
-      </m:msup>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:rem[1] | m:divide[1]]">
-  <xsl:param name="IN_PREC" select="$NO_PREC"/>
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:choose>
-    <xsl:when test="$IN_PREC &gt; $DIV_PREC or $IN_PREC=$DIV_PREC and $PARAM=$PAR_SAME">
-      <m:mfenced separators="">
-        <xsl:apply-templates select="." mode="remdiv">
-          <xsl:with-param name="PARAM" select="$IN_PREC"/>
-          <xsl:with-param name="PAREN" select="$PAR_YES"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mfenced>
-    </xsl:when>
-    <xsl:when test="$IN_PREC &gt; $NO_PREC and $IN_PREC &lt; $FUNCTION_PREC and not($SEM_SW=2)">
-      <xsl:apply-templates select="." mode="remdiv">
-        <xsl:with-param name="PARAM" select="$PARAM"/>
-        <xsl:with-param name="PAREN" select="$PAREN"/>
-        <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <m:mrow>
-        <xsl:apply-templates select="." mode="remdiv">
-          <xsl:with-param name="PARAM" select="$IN_PREC"/>
-          <xsl:with-param name="PAREN" select="$PAREN"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mrow>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:rem[1] | m:divide[1]]" mode="remdiv">
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:apply-templates select = "*[2]" mode = "semantics">
-    <xsl:with-param name="IN_PREC" select="$DIV_PREC"/>
-      <xsl:with-param name="PARAM" select="$PARAM"/>
-      <xsl:with-param name="PAREN" select="$PAREN"/>
-      <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-  </xsl:apply-templates>
-  <xsl:if test="m:rem">
-    <m:mo>%</m:mo>
-  </xsl:if>
-  <xsl:if test="m:divide">
-    <m:mo>/</m:mo>
-  </xsl:if>
-  <xsl:apply-templates select = "*[3]" mode = "semantics">
-    <xsl:with-param name="IN_PREC" select="$DIV_PREC"/>
-    <xsl:with-param name="PARAM" select="$PAR_SAME"/>
-    <xsl:with-param name="PAREN" select="$PAREN"/>
-    <xsl:with-param name="PAR_NO_IGNORE" select="$NO"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:times[1]]">
-  <xsl:param name="IN_PREC" select="$NO_PREC"/>
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:choose>
-    <xsl:when test="$IN_PREC &gt; $MUL_PREC or $IN_PREC=$MUL_PREC and $PARAM=$PAR_SAME">
-      <m:mfenced separators="">
-        <xsl:apply-templates select="." mode="times">
-          <xsl:with-param name="PARAM" select="$IN_PREC"/>
-          <xsl:with-param name="PAREN" select="$PAR_YES"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mfenced>
-    </xsl:when>
-    <xsl:when test="$IN_PREC &gt; $NO_PREC and $IN_PREC &lt; $FUNCTION_PREC and not($SEM_SW=2)">
-      <xsl:apply-templates select="." mode="times">
-        <xsl:with-param name="PARAM" select="$PARAM"/>
-        <xsl:with-param name="PAREN" select="$PAREN"/>
-        <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <m:mrow>
-        <xsl:apply-templates select="." mode="times">
-          <xsl:with-param name="PARAM" select="$IN_PREC"/>
-          <xsl:with-param name="PAREN" select="$PAREN"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mrow>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:times[1]]" mode="times">
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:apply-templates select="*[2]" mode = "semantics">
-    <xsl:with-param name="IN_PREC" select="$MUL_PREC"/>
-    <xsl:with-param name="PARAM" select="$PARAM"/>
-    <xsl:with-param name="PAREN" select="$PAREN"/>
-    <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-  </xsl:apply-templates>
-  <xsl:if test="*[3]">
-    <xsl:for-each select = "*[position()>2]">
-      <m:mo> <mchar name="InvisibleTimes"/> </m:mo>
-      <xsl:apply-templates select="." mode = "semantics">
-        <xsl:with-param name="IN_PREC" select="$MUL_PREC"/>
-        <xsl:with-param name="PAREN" select="$PAREN"/>
-        <xsl:with-param name="PAR_NO_IGNORE" select="$NO"/>
-      </xsl:apply-templates>
-    </xsl:for-each>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:root[1]]">
-  <m:msqrt>
-    <xsl:if test="*[2]=m:degree">
-      <xsl:apply-templates select="*[3]" mode = "semantics"/>
-      <xsl:apply-templates select="*[2]" mode = "semantics"/>
-    </xsl:if>
-    <xsl:if test="not(*[2]=m:degree)">
-      <xsl:apply-templates select="*[2]" mode = "semantics"/>
-      <m:mn>2</m:mn>
-    </xsl:if>
-  </m:msqrt>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:gcd[1]]">
-  <m:mrow>
-    <xsl:if test="not(parent::m:apply[m:power[1]])">
-      <m:mo>gcd</m:mo>
-    </xsl:if>
-    <xsl:if test="parent::m:apply[m:power[1]]">
-      <m:msup>
-        <m:mo>gcd</m:mo>
-        <xsl:apply-templates select = "../*[3]" mode = "semantics"/>
-      </m:msup>
-    </xsl:if>
-    <m:mfenced separators=",">
-      <xsl:for-each select = "*[position()>1]">
-        <xsl:apply-templates select = "." mode="semantics"/>
-      </xsl:for-each>
-    </m:mfenced>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:and[1]]">
-  <xsl:param name="IN_PREC" select="$NO_PREC"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:choose>
-    <xsl:when test="$IN_PREC &gt; $AND_PREC">
-      <m:mfenced separators="">
-        <xsl:apply-templates select="." mode="and">
-          <xsl:with-param name="PARAM" select="$IN_PREC"/>
-          <xsl:with-param name="PAREN" select="$PAR_YES"/>
-        </xsl:apply-templates>
-      </m:mfenced>
-    </xsl:when>
-    <xsl:when test="$IN_PREC &gt; $NO_PREC and $IN_PREC &lt; $FUNCTION_PREC and not($SEM_SW=2)">
-      <xsl:apply-templates select="." mode="and">
-        <xsl:with-param name="PARAM" select="$IN_PREC"/>
-        <xsl:with-param name="PAREN" select="$PAREN"/>
-        <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <m:mrow>
-        <xsl:apply-templates select="." mode="and">
-          <xsl:with-param name="PARAM" select="$IN_PREC"/>
-          <xsl:with-param name="PAREN" select="$PAREN"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mrow>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:and[1]]" mode="and">
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:apply-templates select="*[2]" mode = "semantics">
-    <xsl:with-param name="IN_PREC" select="$AND_PREC"/>
-    <xsl:with-param name="PARAM" select="$PARAM"/>
-    <xsl:with-param name="PAREN" select="$PAREN"/>
-    <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-  </xsl:apply-templates>
-  <xsl:for-each select = "*[position()>2]">
-    <m:mo> <mchar name="wedge"/> </m:mo>
-    <xsl:apply-templates select="." mode = "semantics">
-      <xsl:with-param name="IN_PREC" select="$AND_PREC"/>
-      <xsl:with-param name="PAREN" select="$PAREN"/>
-      <xsl:with-param name="PAR_NO_IGNORE" select="$NO"/>
-    </xsl:apply-templates>
-  </xsl:for-each>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:or[1]]">
-  <xsl:param name="IN_PREC" select="$NO_PREC"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:choose>
-    <xsl:when test="$IN_PREC &gt; $OR_PREC">
-      <m:mfenced separators="">
-        <xsl:apply-templates select="." mode="or">
-          <xsl:with-param name="PARAM" select="$IN_PREC"/>
-          <xsl:with-param name="PAREN" select="$PAR_YES"/>
-        </xsl:apply-templates>
-      </m:mfenced>
-    </xsl:when>
-    <xsl:when test="$IN_PREC &gt; $NO_PREC and $IN_PREC &lt; $FUNCTION_PREC and not($SEM_SW=2)">
-      <xsl:apply-templates select="." mode="or">
-        <xsl:with-param name="PARAM" select="$IN_PREC"/>
-        <xsl:with-param name="PAREN" select="$PAREN"/>
-        <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <m:mrow>
-        <xsl:apply-templates select="." mode="or">
-          <xsl:with-param name="PARAM" select="$IN_PREC"/>
-          <xsl:with-param name="PAREN" select="$PAREN"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mrow>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:or[1]]" mode="or">
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:apply-templates select="*[2]" mode = "semantics">
-    <xsl:with-param name="IN_PREC" select="$OR_PREC"/>
-    <xsl:with-param name="PARAM" select="$PARAM"/>
-    <xsl:with-param name="PAREN" select="$PAREN"/>
-    <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-  </xsl:apply-templates>
-  <xsl:for-each select = "*[position()>2]">
-    <m:mo> <mchar name="vee"/> </m:mo>
-    <xsl:apply-templates select="." mode = "semantics">
-      <xsl:with-param name="IN_PREC" select="$OR_PREC"/>
-      <xsl:with-param name="PAREN" select="$PAREN"/>
-      <xsl:with-param name="PAR_NO_IGNORE" select="$NO"/>
-    </xsl:apply-templates>
-  </xsl:for-each>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:xor[1]]">
-  <xsl:param name="IN_PREC" select="$NO_PREC"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:choose>
-    <xsl:when test="$IN_PREC &gt; $XOR_PREC">
-      <m:mfenced separators="">
-        <xsl:apply-templates select="." mode="xor">
-          <xsl:with-param name="PARAM" select="$IN_PREC"/>
-          <xsl:with-param name="PAREN" select="$PAR_YES"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mfenced>
-    </xsl:when>
-    <xsl:when test="$IN_PREC &gt; $NO_PREC and $IN_PREC &lt; $FUNCTION_PREC and not($SEM_SW=2)">
-      <xsl:apply-templates select="." mode="xor">
-        <xsl:with-param name="PARAM" select="$IN_PREC"/>
-        <xsl:with-param name="PAREN" select="$PAREN"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <m:mrow>
-        <xsl:apply-templates select="." mode="xor">
-          <xsl:with-param name="PARAM" select="$IN_PREC"/>
-          <xsl:with-param name="PAREN" select="$PAREN"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mrow>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:xor[1]]" mode="xor">
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:apply-templates select="*[2]" mode = "semantics">
-    <xsl:with-param name="IN_PREC" select="$XOR_PREC"/>
-    <xsl:with-param name="PARAM" select="$PARAM"/>
-    <xsl:with-param name="PAREN" select="$PAREN"/>
-    <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-  </xsl:apply-templates>
-  <xsl:for-each select = "*[position()>2]">
-    <m:mo> <mchar name="xor"/> </m:mo>
-    <xsl:apply-templates select="." mode = "semantics">
-      <xsl:with-param name="IN_PREC" select="$XOR_PREC"/>
-      <xsl:with-param name="PAREN" select="$PAREN"/>
-      <xsl:with-param name="PAR_NO_IGNORE" select="$NO"/>
-    </xsl:apply-templates>
-  </xsl:for-each>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:not[1]]">
-  <m:mrow>
-    <m:mo>not</m:mo>
-    <xsl:apply-templates select = "*[2]" mode = "semantics">
-      <xsl:with-param name="IN_PREC" select="$FUNCTION_PREC"/>
-    </xsl:apply-templates>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:forall[1]]">
-  <m:mrow>
-    <m:mo>for all</m:mo>
-    <m:mfenced separators=",">
-      <xsl:for-each select = "m:bvar">
-        <xsl:apply-templates select = "." mode="semantics"/>
-      </xsl:for-each>
-    </m:mfenced>
-    <xsl:if test="m:condition">
-      <m:mo>:</m:mo>
-      <xsl:apply-templates select = "m:condition/*" mode = "semantics"/>
-      <m:mo>,</m:mo>
-    </xsl:if>
-    <xsl:apply-templates select = "*[position()>1 and not(self::m:bvar) and not(self::m:condition)]" mode = "semantics"/>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:exists[1]]">
-  <m:mrow>
-    <m:mo> <mchar name="Exists"/> </m:mo>
-    <m:mfenced separators=",">
-      <xsl:for-each select = "m:bvar">
-        <xsl:apply-templates select = "." mode="semantics"/>
-      </xsl:for-each>
-    </m:mfenced>
-    <xsl:if test="m:condition">
-      <m:mo>,</m:mo>
-      <xsl:apply-templates select = "m:condition/*" mode = "semantics"/>
-    </xsl:if>
-    <m:mo>:</m:mo>
-    <xsl:apply-templates select = "*[position()>1 and not(self::m:bvar) and not(self::m:condition)]" mode = "semantics"/>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:abs[1]]">
-  <xsl:if test="not(parent::m:apply[m:power[1]])">
-    <m:mfenced open="|" close="|" separators="">
-      <xsl:apply-templates select = "*[position()>1]" mode = "semantics"/>
-    </m:mfenced>
-  </xsl:if>
-  <xsl:if test="parent::m:apply[m:power[1]]">
-    <m:msup>
-      <m:mfenced open="|" close="|" separators="">
-        <xsl:apply-templates select = "*[position()>1]" mode = "semantics"/>
-      </m:mfenced>
-      <xsl:apply-templates select = "../*[3]" mode = "semantics"/>
-    </m:msup>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:conjugate[1]]">
-  <m:mover>
-    <m:mrow>
-      <xsl:apply-templates select = "*[position()>1]" mode = "semantics"/>
-    </m:mrow>
-    <m:mo> <mchar name="UnderBar"/> </m:mo>
-  </m:mover>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:arg[1] | m:real[1] | m:imaginary[1]]">
-  <m:mrow>
-    <xsl:choose>
-      <xsl:when test="m:arg">
-        <m:mo>arg</m:mo>
-      </xsl:when>
-      <xsl:when test="m:real">
-        <m:mo>Real</m:mo>
-      </xsl:when>
-      <xsl:when test="m:imaginary">
-        <m:mo>Imaginary</m:mo>
-      </xsl:when>
-    </xsl:choose>
-    <m:mfenced separators="">
-      <xsl:apply-templates select = "*[2]" mode = "semantics"/>
-    </m:mfenced>
-  </m:mrow>
-</xsl:template>
-
-
-<!-- RELATIONS -->
-
-<xsl:template match = "m:apply[m:neq | m:approx | m:tendsto | m:implies | m:in | m:notin | m:notsubset | m:notprsubset | m:subset | m:prsubset | m:eq | m:gt | m:lt | m:geq | m:leq | m:equivalent]">
-  <m:mrow>
-    <xsl:if test="*[1]=m:neq or *[1]=m:approx or *[1]=m:tendsto or *[1]=m:implies or *[1]=m:in or *[1]=m:notin or *[1]=m:notsubset or *[1]=m:notprsubset">
-      <xsl:apply-templates select = "*[2]" mode = "semantics"/>
-      <xsl:if test="*[1]=m:neq">
-        <m:mo> <mchar name="NotEqual"/> </m:mo>
-      </xsl:if>
-      <xsl:if test="*[1]=m:approx">
-        <m:mo> <mchar name="approxeq"/> </m:mo>
-      </xsl:if>
-      <xsl:if test="*[1]=m:tendsto">
-        <m:mo> <mchar name="RightArrow"/> </m:mo>
-      </xsl:if>
-      <xsl:if test="*[1]=m:implies">
-        <m:mo> <mchar name="DoubleRightArrow"/> </m:mo>
-      </xsl:if>
-      <xsl:if test="*[1]=m:in">
-        <m:mo> <mchar name="Element"/> </m:mo>
-      </xsl:if>
-      <xsl:if test="*[1]=m:notin">
-        <m:mo> <mchar name="NotElement"/> </m:mo>
-      </xsl:if>
-      <xsl:if test="*[1]=m:notsubset">
-        <m:mo> <mchar name="NotSubset"/> </m:mo>
-      </xsl:if>
-      <xsl:if test="*[1]=m:notprsubset">
-        <m:mo> <mchar name="NotSubsetEqual"/> </m:mo>
-      </xsl:if>
-      <xsl:apply-templates select = "*[3]" mode = "semantics"/>
-      <xsl:if test="*[1]=m:tendsto and m:tendsto[1][@type='below']">
-        <m:mo>-</m:mo>
-      </xsl:if>
-      <xsl:if test="*[1]=m:tendsto and m:tendsto[1][@type='above']">
-        <m:mo>+</m:mo>
-      </xsl:if>
-    </xsl:if>
-    <xsl:if test="*[1]=m:subset or *[1]=m:prsubset or *[1]=m:eq or *[1]=m:gt or *[1]=m:lt or *[1]=m:geq or *[1]=m:leq or *[1]=m:equivalent">
-      <xsl:apply-templates select = "*[2]" mode="semantics"/>
-      <xsl:for-each select = "*[position()>2]">
-        <xsl:if test="../*[self::m:subset][1]">
-          <m:mo>  <mchar name="SubsetEqual"/> </m:mo>
-        </xsl:if>
-        <xsl:if test="../*[self::m:prsubset][1]">
-          <m:mo> <mchar name="subset"/> </m:mo>
-        </xsl:if>
-        <xsl:if test="../*[self::m:eq][1]">
-          <m:mo>=</m:mo>
-        </xsl:if>
-        <xsl:if test="../*[self::m:gt][1]">
-          <m:mo>&gt;</m:mo>
-        </xsl:if>
-        <xsl:if test="../*[self::m:lt][1]">
-          <m:mo>&lt;</m:mo>
-        </xsl:if>
-        <xsl:if test="../*[self::m:geq][1]">
-          <m:mo> <mchar name="geq"/> </m:mo>
-        </xsl:if>
-        <xsl:if test="../*[self::m:leq][1]">
-          <m:mo> <mchar name="leq"/> </m:mo>
-        </xsl:if>
-        <xsl:if test="../*[self::m:equivalent][1]">
-          <m:mo> <mchar name="Congruent"/> </m:mo>
-        </xsl:if>
-        <xsl:apply-templates select = "." mode="semantics"/>
-      </xsl:for-each>
-    </xsl:if>
-  </m:mrow>
-</xsl:template>
-
-
-<!-- CALCULUS -->
-
-<xsl:template match = "m:apply[*[1][self::m:ln]]">
-  <m:mrow>
-    <xsl:choose>
-      <xsl:when test="parent::m:apply[m:power[1]]">
-        <m:msup>
-          <m:mo>ln</m:mo>
-          <xsl:apply-templates select = "../*[3]" mode = "semantics"/>
-        </m:msup>
-      </xsl:when>
-      <xsl:otherwise>
-        <m:mo>ln</m:mo>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:apply-templates select = "*[2]" mode = "semantics">
-      <xsl:with-param name="IN_PREC" select="$FUNCTION_PREC"/>
-    </xsl:apply-templates>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:log[1]]">
-  <m:mrow>
-    <xsl:choose>
-      <xsl:when test="parent::m:apply[m:power[1]]">
-        <xsl:if test="not(*[2]=m:logbase)">
-          <m:msup>
-            <m:mo>log</m:mo>
-            <xsl:apply-templates select = "../*[3]" mode = "semantics"/>
-          </m:msup>
-        </xsl:if>
-        <xsl:if test="*[2]=m:logbase">
-          <m:msubsup>
-            <m:mo>log</m:mo>
-            <xsl:apply-templates select = "../*[3]" mode = "semantics"/>
-            <xsl:apply-templates select = "m:logbase" mode = "semantics"/>
-          </m:msubsup>
-        </xsl:if>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:if test="not(*[2]=m:logbase)">
-          <m:mo>log</m:mo>
-        </xsl:if>
-        <xsl:if test="*[2]=m:logbase">
-          <m:msub>
-            <m:mo>log</m:mo>
-            <xsl:apply-templates select = "m:logbase" mode = "semantics"/>
-          </m:msub>
-        </xsl:if>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:if test="*[2]=m:logbase">
-      <xsl:apply-templates select = "*[3]" mode = "semantics">
-        <xsl:with-param name="IN_PREC" select="$FUNCTION_PREC"/>
-      </xsl:apply-templates>
-    </xsl:if>
-    <xsl:if test="not(*[2]=m:logbase)">
-      <xsl:apply-templates select = "*[2]" mode = "semantics">
-        <xsl:with-param name="IN_PREC" select="$FUNCTION_PREC"/>
-      </xsl:apply-templates>
-    </xsl:if>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:diff[1]]">
-  <m:mrow>
-    <xsl:if test="*[2]=m:bvar and m:bvar[*[2]=m:degree]">
-      <m:mfrac>
-        <m:msup>
-          <m:mo>d</m:mo>
-          <xsl:apply-templates select = "m:bvar/m:degree" mode = "semantics"/>
-        </m:msup>
-        <m:mrow>
-          <m:mo>d</m:mo>
-          <m:msup>
-            <xsl:apply-templates select = "m:bvar/*[1]" mode = "semantics"/>
-            <xsl:apply-templates select = "m:bvar/m:degree" mode = "semantics"/>
-          </m:msup>
-        </m:mrow>
-      </m:mfrac>
-    </xsl:if>
-    <xsl:if test="*[2]=m:bvar and not(m:bvar[*[2]=m:degree])">
-      <m:mfrac>
-        <m:mo>d</m:mo>
-        <m:mrow>
-          <m:mo>d</m:mo>
-          <xsl:apply-templates select = "m:bvar/*[1]" mode = "semantics"/>
-        </m:mrow>
-      </m:mfrac>
-    </xsl:if>
-    <xsl:apply-templates select = "*[3]" mode = "semantics"/>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:partialdiff[1]]">
-  <m:mrow>
-    <xsl:for-each select = "m:bvar">
-      <xsl:if test="*[last()]=m:degree">
-        <m:mfrac>
-          <m:msup>
-             <m:mo>d</m:mo>
-             <xsl:apply-templates select = "m:degree" mode = "semantics"/>
-          </m:msup>
-          <m:mrow>
-            <m:mo>d</m:mo>
-            <m:msup>
-              <xsl:apply-templates select = "*[1]" mode = "semantics"/>
-              <xsl:apply-templates select = "m:degree" mode = "semantics"/>
-            </m:msup>
-          </m:mrow>
-        </m:mfrac>
-      </xsl:if>
-      <xsl:if test="not(*[last()]=m:degree)">
-        <m:mfrac>
-          <m:mo>d</m:mo>
-          <m:mrow>
-            <m:mo>d</m:mo>
-            <xsl:apply-templates select = "*[1]" mode = "semantics"/>
-          </m:mrow>
-        </m:mfrac>
-      </xsl:if>
-    </xsl:for-each>
-    <xsl:apply-templates select = "*[last()]" mode = "semantics"/>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:lowlimit | m:uplimit | m:bvar | m:degree | m:logbase">
-  <xsl:apply-templates mode = "semantics"/>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:divergence[1] | m:grad[1] | m:curl[1]]">
-  <m:mrow>
-    <xsl:if test="*[1]=m:divergence">
-      <m:mo>div</m:mo>
-    </xsl:if>
-    <xsl:if test="*[1]=m:grad">
-    <m:mo>grad</m:mo>
-    </xsl:if>
-    <xsl:if test="*[1]=m:curl">
-    <m:mo>curl</m:mo>
-    </xsl:if>
-    <xsl:choose>
-      <xsl:when test="*[2]=m:ci">
-        <xsl:apply-templates select = "*[2]" mode = "semantics"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <m:mfenced separators="">
-          <xsl:apply-templates select = "*[2]" mode = "semantics"/>
-        </m:mfenced>
-      </xsl:otherwise>
-    </xsl:choose>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:laplacian[1]]">
-  <m:mrow>
-    <m:msup>
-      <m:mo> &#x0394; </m:mo>
-      <m:mn>2</m:mn>
-    </m:msup>
-    <xsl:apply-templates select = "*[2]" mode = "semantics"/>
-  </m:mrow>
-</xsl:template>
-
-
-<!-- SET THEORY -->
-
-<xsl:template match = "m:set | m:list">
-  <m:mfenced open="{{" close="}}" separators="">
-    <xsl:if test="*[1]=m:bvar and *[2]=m:condition">
-      <xsl:apply-templates select="m:bvar" mode = "semantics"/>
-      <m:mo>|</m:mo>
-      <xsl:apply-templates select="m:condition" mode = "semantics"/>
-    </xsl:if>
-    <xsl:if test="*[1]=m:condition and not(child::m:bvar)">
-      <m:mfenced open="" close="" separators=",">
-        <xsl:for-each select = "*[not(self::m:condition) and not(self::m:bvar)]">
-          <xsl:apply-templates select = "." mode="semantics"/>
-        </xsl:for-each>
-      </m:mfenced>
-      <m:mo>|</m:mo>
-      <xsl:apply-templates select="m:condition" mode = "semantics"/>
-    </xsl:if>
-    <xsl:if test="not(child::m:bvar) and not(child::m:condition)">
-      <m:mfenced open="" close="" separators=",">
-        <xsl:for-each select = "*">
-          <xsl:apply-templates select = "." mode="semantics"/>
-        </xsl:for-each>
-      </m:mfenced>
-    </xsl:if>
-  </m:mfenced>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:union[1]]">
-  <xsl:param name="IN_PREC" select="$NO_PREC"/>
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:choose>
-    <xsl:when test="$IN_PREC &gt; $UNION_PREC or $IN_PREC=$UNION_PREC and $PARAM=$PAR_SAME">
-      <m:mfenced separators="">
-        <xsl:apply-templates select="." mode="union">
-          <xsl:with-param name="PARAM" select="$PARAM"/>
-          <xsl:with-param name="PAREN" select="$PAREN"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mfenced>
-    </xsl:when>
-    <xsl:when test="$IN_PREC &gt; $NO_PREC and $IN_PREC &lt; $FUNCTION_PREC and not($SEM_SW=2)">
-      <xsl:apply-templates select="." mode="union">
-        <xsl:with-param name="PARAM" select="$PARAM"/>
-        <xsl:with-param name="PAREN" select="$PAREN"/>
-        <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <m:mrow>
-        <xsl:apply-templates select="." mode="union">
-          <xsl:with-param name="PARAM" select="$PARAM"/>
-          <xsl:with-param name="PAREN" select="$PAREN"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mrow>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:union[1]]" mode="union">
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:apply-templates select = "*[2]" mode="semantics">
-    <xsl:with-param name="IN_PREC" select="$UNION_PREC"/>
-    <xsl:with-param name="PARAM" select="$PARAM"/>
-    <xsl:with-param name="PAREN" select="$PAREN"/>
-    <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-  </xsl:apply-templates>
-  <xsl:for-each select = "*[position()>2]">
-    <m:mo> <mchar name="Union"/> </m:mo>
-    <xsl:apply-templates select = "." mode="semantics">
-      <xsl:with-param name="IN_PREC" select="$UNION_PREC"/>
-      <xsl:with-param name="PAREN" select="$PAREN"/>
-      <xsl:with-param name="PAR_NO_IGNORE" select="$NO"/>
-    </xsl:apply-templates>
-  </xsl:for-each>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:intersect[1]]">
-  <xsl:param name="IN_PREC" select="$NO_PREC"/>
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:choose>
-    <xsl:when test="$IN_PREC &gt; $INTERSECT_PREC">
-      <m:mfenced separators="">
-        <xsl:apply-templates select="." mode="intersect">
-          <xsl:with-param name="PARAM" select="$PARAM"/>
-          <xsl:with-param name="PAREN" select="$PAREN"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mfenced>
-    </xsl:when>
-    <xsl:when test="$IN_PREC &gt; $NO_PREC and $IN_PREC &lt; $FUNCTION_PREC and not($SEM_SW=2)">
-      <xsl:apply-templates select="." mode="intersect">
-        <xsl:with-param name="PARAM" select="$PARAM"/>
-        <xsl:with-param name="PAREN" select="$PAREN"/>
-        <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <m:mrow>
-        <xsl:apply-templates select="." mode="intersect">
-          <xsl:with-param name="PARAM" select="$PARAM"/>
-          <xsl:with-param name="PAREN" select="$PAREN"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mrow>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:intersect[1]]" mode="intersect">
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:apply-templates select = "*[2]" mode="semantics">
-    <xsl:with-param name="IN_PREC" select="$INTERSECT_PREC"/>
-    <xsl:with-param name="PARAM" select="$PARAM"/>
-    <xsl:with-param name="PAREN" select="$PAREN"/>
-    <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-  </xsl:apply-templates>
-  <xsl:for-each select = "*[position()>2]">
-    <m:mo> <mchar name="Intersection"/> </m:mo>
-    <xsl:apply-templates select = "." mode="semantics">
-      <xsl:with-param name="IN_PREC" select="$INTERSECT_PREC"/>
-      <xsl:with-param name="PAREN" select="$PAREN"/>
-      <xsl:with-param name="PAR_NO_IGNORE" select="$NO"/>
-    </xsl:apply-templates>
-  </xsl:for-each>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:setdiff[1]]">
-  <xsl:param name="IN_PREC" select="$NO_PREC"/>
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:choose>
-    <xsl:when test="$IN_PREC &gt; $SETDIFF_PREC or $IN_PREC=$SETDIFF_PREC and $PARAM=$PAR_SAME">
-      <m:mfenced separators="">
-        <xsl:apply-templates select="." mode="setdiff">
-          <xsl:with-param name="PARAM" select="$PARAM"/>
-          <xsl:with-param name="PAREN" select="$PAREN"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mfenced>
-    </xsl:when>
-    <xsl:when test="$IN_PREC &gt; $NO_PREC and $IN_PREC &lt; $FUNCTION_PREC and not($SEM_SW=2)">
-      <xsl:apply-templates select="." mode="setdiff">
-        <xsl:with-param name="PARAM" select="$PARAM"/>
-        <xsl:with-param name="PAREN" select="$PAREN"/>
-        <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <m:mrow>
-        <xsl:apply-templates select="." mode="setdiff">
-          <xsl:with-param name="PARAM" select="$PARAM"/>
-          <xsl:with-param name="PAREN" select="$PAREN"/>
-          <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-        </xsl:apply-templates>
-      </m:mrow>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:setdiff[1]]" mode="setdiff">
-  <xsl:param name="PARAM" select="$NO_PARAM"/>
-  <xsl:param name="PAREN" select="$PAR_NO"/>
-  <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
-  <xsl:apply-templates select = "*[2]" mode = "semantics">
-    <xsl:with-param name="IN_PREC" select="$SETDIFF_PREC"/>
-    <xsl:with-param name="PARAM" select="$PARAM"/>
-    <xsl:with-param name="PAREN" select="$PAREN"/>
-    <xsl:with-param name="PAR_NO_IGNORE" select="$PAR_NO_IGNORE"/>
-  </xsl:apply-templates>
-  <m:mo>\</m:mo>
-  <xsl:apply-templates select = "*[3]" mode = "semantics">
-    <xsl:with-param name="IN_PREC" select="$SETDIFF_PREC"/>
-    <xsl:with-param name="PARAM" select="$PAR_SAME"/>
-    <xsl:with-param name="PAREN" select="$PAREN"/>
-    <xsl:with-param name="PAR_NO_IGNORE" select="$NO"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:card[1]]">
-  <m:mfenced open="|" close="|" separators=",">
-    <xsl:for-each select = "*[position()>1]">
-      <xsl:apply-templates select = "." mode="semantics"/>
-    </xsl:for-each>
-  </m:mfenced>
-</xsl:template>
-
-
-<!-- SEQUENCES AND SERIES -->
-
-<xsl:template match = "m:apply[m:sum[1] | m:product[1]]">
-  <m:mrow>
-    <xsl:choose>
-      <xsl:when test="*[2]=m:bvar and m:lowlimit and m:uplimit">
-        <m:munderover>
-          <xsl:if test="*[1]=m:sum">
-            <m:mo> <mchar name="Sum"/> </m:mo>
-          </xsl:if>
-          <xsl:if test="*[1]=m:product">
-            <m:mo> <mchar name="Product"/> </m:mo>
-          </xsl:if>
-          <m:mrow>
-            <xsl:apply-templates select = "*[2]" mode = "semantics"/>
-            <m:mo>=</m:mo>
-            <xsl:apply-templates select = "m:lowlimit" mode = "semantics"/>
-          </m:mrow>
-          <xsl:apply-templates select = "m:uplimit" mode = "semantics"/>
-        </m:munderover>
-        <xsl:apply-templates select = "*[5]" mode = "semantics"/>
-      </xsl:when>
-      <xsl:when test="*[2]=m:bvar and *[3]=m:condition">
-        <m:munder>
-          <xsl:if test="*[1]=m:sum">
-            <m:mo> <mchar name="Sum"/> </m:mo>
-          </xsl:if>
-          <xsl:if test="*[1]=m:product">
-            <m:mo> <mchar name="Product"/> </m:mo>
-          </xsl:if>
-          <xsl:apply-templates select = "*[3]" mode = "semantics"/>
-        </m:munder>
-        <xsl:apply-templates select = "*[4]" mode = "semantics"/>
-      </xsl:when>
-    </xsl:choose>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:limit[1]]">
-  <m:mrow>
-    <m:munder>
-      <m:mo>lim</m:mo>
-      <m:mrow>
-        <xsl:if test="*[2]=m:bvar and *[3]=m:lowlimit">
-            <xsl:apply-templates select = "*[2]" mode = "semantics"/>
-            <m:mo> <mchar name="RightArrow"/> </m:mo>
-            <xsl:apply-templates select = "*[3]" mode = "semantics"/>
-        </xsl:if>
-        <xsl:if test="*[2]=m:bvar and *[3]=m:condition">
-          <xsl:apply-templates select = "*[3]" mode = "semantics"/>
-        </xsl:if>
-      </m:mrow>
-    </m:munder>
-    <xsl:apply-templates select = "*[4]" mode = "semantics"/>
-  </m:mrow>
-</xsl:template>
-
-
-<!-- TRIGONOMETRY -->
-
-<xsl:template match = "m:apply[*[1][self::m:sin | self::m:cos | self::m:tan | self::m:sec | self::m:csc | self::m:cot | self::m:sinh | self::m:cosh | self::m:tanh | self::m:sech | self::m:csch | self::m:coth | self::m:arcsin | self::m:arccos | self::m:arctan]]">
-  <m:mrow>
-    <xsl:if test="not(parent::m:apply[m:power[1]])">
-      <xsl:apply-templates select = "*[1]" mode = "trigonometry"/>
-    </xsl:if>
-    <xsl:if test="parent::m:apply[m:power[1]]">
-      <m:msup>
-        <xsl:apply-templates select = "*[1]" mode = "trigonometry"/>
-        <xsl:apply-templates select = "../*[3]" mode = "semantics"/>
-      </m:msup>
-    </xsl:if>
-    <xsl:apply-templates select = "*[2]" mode = "semantics">
-      <xsl:with-param name="IN_PREC" select="$FUNCTION_PREC"/>
-      <xsl:with-param name="PAR_NO_IGNORE" select="$NO"/>
-    </xsl:apply-templates>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:*" mode = "trigonometry">
-    <xsl:choose>
-      <xsl:when test="self::m:sin">
-        <m:mo>sin</m:mo>
-      </xsl:when>
-      <xsl:when test="self::m:cos">
-        <m:mo>cos</m:mo>
-      </xsl:when>
-      <xsl:when test="self::m:tan">
-        <m:mo>tan</m:mo>
-      </xsl:when>
-      <xsl:when test="self::m:sec">
-        <m:mo>sec</m:mo>
-      </xsl:when>
-      <xsl:when test="self::m:csc">
-        <m:mo>csc</m:mo>
-      </xsl:when>
-      <xsl:when test="self::m:cot">
-        <m:mo>cot</m:mo>
-      </xsl:when>
-      <xsl:when test="self::m:sinh">
-        <m:mo>sinh</m:mo>
-      </xsl:when>
-      <xsl:when test="self::m:cosh">
-        <m:mo>cosh</m:mo>
-      </xsl:when>
-      <xsl:when test="self::m:tanh">
-        <m:mo>tanh</m:mo>
-      </xsl:when>
-      <xsl:when test="self::m:sech">
-        <m:mo>sech</m:mo>
-      </xsl:when>
-      <xsl:when test="self::m:csch">
-        <m:mo>csch</m:mo>
-      </xsl:when>
-      <xsl:when test="self::m:coth">
-        <m:mo>coth</m:mo>
-      </xsl:when>
-      <xsl:when test="self::m:arcsin">
-        <m:mo>arcsin</m:mo>
-      </xsl:when>
-      <xsl:when test="self::m:arccos">
-        <m:mo>arccos</m:mo>
-      </xsl:when>
-      <xsl:when test="self::m:arctan">
-        <m:mo>arctan</m:mo>
-      </xsl:when>
-    </xsl:choose>
-</xsl:template>
-
-
-<!-- STATISTICS -->
-
-<xsl:template match = "m:apply[m:mean[1]]">
-  <m:mfenced open="&lt;" close="&gt;" separators=",">
-    <xsl:for-each select = "*[position()>1]">
-      <xsl:apply-templates select = "." mode="semantics"/>
-    </xsl:for-each>
-  </m:mfenced>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:sdev[1]]">
-  <m:mrow>
-    <m:mo> &#x03c3; </m:mo>
-    <m:mfenced separators=",">
-      <xsl:for-each select = "*[position()>1]">
-        <xsl:apply-templates select = "." mode="semantics"/>
-      </xsl:for-each>
-    </m:mfenced>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:variance[1]]">
-  <m:mrow>
-    <m:mo> &#x03c3; </m:mo>
-    <m:msup>
-      <m:mfenced separators=",">
-        <xsl:for-each select = "*[position()>1]">
-          <xsl:apply-templates select = "." mode="semantics"/>
-        </xsl:for-each>
-      </m:mfenced>
-      <m:mn>2</m:mn>
-    </m:msup>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:median[1]]">
-  <m:mrow>
-    <m:mo>median</m:mo>
-    <m:mfenced separators=",">
-      <xsl:for-each select = "*[position()>1]">
-        <xsl:apply-templates select = "." mode="semantics"/>
-      </xsl:for-each>
-    </m:mfenced>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:mode[1]]">
-  <m:mrow>
-    <m:mo>mode</m:mo>
-    <m:mfenced separators=",">
-      <xsl:for-each select = "*[position()>1]">
-        <xsl:apply-templates select = "." mode="semantics"/>
-      </xsl:for-each>
-    </m:mfenced>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:moment[1]]">
-  <m:mfenced open="&lt;" close="&gt;" separators="">
-    <xsl:if test="*[2]=m:degree">
-      <m:msup>
-        <xsl:apply-templates select="*[3]" mode = "semantics"/>
-        <xsl:apply-templates select="*[2]" mode = "semantics"/>
-      </m:msup>
-    </xsl:if>
-    <xsl:if test="not(*[2]=m:degree)">
-      <xsl:for-each select = "*[position()>1]">
-        <xsl:apply-templates select = "." mode="semantics"/>
-      </xsl:for-each>
-    </xsl:if>
-  </m:mfenced>
-</xsl:template>
-
-
-<!-- LINEAR ALGEBRA -->
-
-<xsl:template match="m:vector">
-  <m:mfenced separators="">
-    <m:mtable>
-      <xsl:for-each select="*">
-        <m:mtd>
-          <xsl:apply-templates select="." mode = "semantics"/>
-        </m:mtd>
-      </xsl:for-each>
-    </m:mtable>
-  </m:mfenced>
-</xsl:template>
-
-<xsl:template match = "m:matrix">
-  <m:mfenced separators="">
-    <m:mtable>
-      <xsl:apply-templates mode = "semantics"/>
-    </m:mtable>
-  </m:mfenced>
-</xsl:template>
-
-<xsl:template match = "m:matrixrow">
-  <m:mtr>
-    <xsl:for-each select="*">
-      <m:mtd>
-        <xsl:apply-templates select="." mode = "semantics"/>
-      </m:mtd>
-    </xsl:for-each>
-  </m:mtr>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:determinant[1]]">
-  <m:mrow>
-    <m:mo>det</m:mo>
-    <xsl:apply-templates select = "*[2]" mode = "semantics"/>
-  </m:mrow>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:transpose[1]]">
-  <m:msup>
-    <xsl:apply-templates select = "*[2]" mode = "semantics"/>
-    <m:mo>T</m:mo>
-  </m:msup>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:selector[1]]">
-  <xsl:if test="*[2]=m:matrix and *[3]=m:cn">
-      <xsl:variable name="m" select = "*[3]"/>
-      <xsl:choose>
-        <xsl:when test="*[4]=m:cn">
-          <xsl:variable name="n" select = "*[4]"/>
-          <xsl:copy-of select = "m:matrix/*[position()=$m]/*[position()=$n]"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:copy-of select = "m:matrix/*[position()=$m]"/>
-        </xsl:otherwise>
-      </xsl:choose>
-  </xsl:if>
-  <xsl:if test="(*[2]=m:vector or *[2]=m:list) and *[3]=m:cn">
-    <xsl:variable name="m" select = "*[3]"/>
-    <xsl:copy-of select = "*[2]/*[position()=$m]"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match = "m:apply[m:vectorproduct[1] | m:scalarproduct[1] | m:outerproduct[1]]">
-  <m:mrow>
-    <xsl:apply-templates select="*[2]" mode = "semantics"/>
-    <xsl:choose>
-      <xsl:when test="m:vectorproduct[1]">
-        <m:mo> <mchar name="Cross"/> </m:mo>
-      </xsl:when>
-      <xsl:when test="m:scalarproduct[1] | m:outerproduct[1]">
-        <m:mo>.</m:mo>
-      </xsl:when>
-    </xsl:choose>
-    <xsl:apply-templates select="*[3]" mode = "semantics"/>
-  </m:mrow>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/helm/style/mmlextension_andrea.xsl b/helm/style/mmlextension_andrea.xsl
deleted file mode 100644 (file)
index b4bbcdb..0000000
+++ /dev/null
@@ -1,1052 +0,0 @@
-<?xml version="1.0"?>
-
-<!--***********************************************************************--> 
-<!-- Extension to the XSLT version 0.07 of MathML content to presentation: -->
-<!-- First draft: February 19 2000, Andrea Asperti, Irene Schena           -->
-<!-- Revised: March 3 2000, Irene Schena                                   -->
-<!-- Revised: March 15 2000, Claudio Sacerdoti Coen, Irene Schena          -->
-<!-- Revised: March 21 2000, Irene Schena                                  -->
-<!--***********************************************************************--> 
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                              xmlns:m="http://www.w3.org/1998/Math/MathML"
-                              xmlns:helm="http://www.cs.unibo.it/helm">
-
-<xsl:import href="mml2mmlv1_0.xsl"/>
-
-<!--***********************************************************************-->
-<!-- Parameter affecting line-breaking                                     -->
-<!--***********************************************************************-->
-
-<xsl:variable name="framewidth" select="15"/>
-
-<!--***********************************************************************-->
-<!-- Gli oggetti sono stampati come mtext all'interno di una marca toplevel-->
-<!-- math ma al di fuori di semantics. Ora vi sono tanti semantics quanti  -->
-<!-- sono i termini: la presentation per un termine e' generata come primo -->
-<!-- figlio di un semantics e l'originario content viene inserito nel      -->
-<!-- nel secondo figlio di semantics, annotation-xml                       -->
-<!--***********************************************************************-->
-
-<!--**********************-->
-<!--        OBJECTS       -->
-<!--**********************-->
-
-<xsl:template match="/">
- <xsl:processing-instruction name="cocoon-format">type="text/xhtml"</xsl:processing-instruction>
- <xsl:apply-templates select="*"/>
-</xsl:template>
-
-<!-- DEFINITION -->
-
-<xsl:template match="Definition">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>DEFINITION <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != &quot;&quot;"><xsl:value-of select="Params"/></xsl:if>) OF TYPE</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="type/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>AS</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="body/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!-- AXIOM -->
-
-<xsl:template match="Axiom">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>AXIOM <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != &quot;&quot;"><xsl:value-of select="Params"/></xsl:if>) OF TYPE</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="type/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!-- UNFINISHED PROOF -->
-
-<xsl:template match="CurrentProof">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>UNFINISHED PROOF <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != &quot;&quot;"><xsl:value-of select="Params"/></xsl:if>)</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>THESIS:</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="type/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>CONJECTURES:</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <xsl:for-each select="Conjecture">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <m:mtext><xsl:value-of select="./@no"/>:</m:mtext>
-         <xsl:apply-templates select="./*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      </xsl:for-each>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>CORRESPONDING PROOF:</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="body/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!-- MUTUAL INDUCTIVE DEFINITION -->
-
-<xsl:template match="InductiveDefinition">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-     <xsl:for-each select="InductiveType">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <xsl:choose>
-         <xsl:when test="position() = 1">
-          <xsl:choose>
-          <xsl:when test="string(./@inductive) = &quot;true&quot;">
-           <m:mtext>INDUCTIVE DEFINITION</m:mtext>
-          </xsl:when>
-          <xsl:otherwise>
-           <m:mtext>COINDUCTIVE DEFINITION</m:mtext>
-          </xsl:otherwise>
-          </xsl:choose>  
-         </xsl:when>
-         <xsl:otherwise>
-          <m:mtext>AND</m:mtext>
-         </xsl:otherwise>
-         </xsl:choose>
-         <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         <m:mtext><xsl:value-of select="./@name"/>(<xsl:if test="string(../Params) != &quot;&quot;"><xsl:value-of select="../Params"/></xsl:if>)</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow> 
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <m:mtext>[</m:mtext>
-         <xsl:choose>
-         <xsl:when test="string(../Param) != &quot;&quot;">         
-          <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-           <xsl:for-each select="../Param">
-            <m:mtr>
-             <m:mtd>
-              <m:mrow>   
-               <m:mi><xsl:value-of select="./@name"/></m:mi>
-               <m:mo>:</m:mo>
-               <xsl:apply-templates select="*"/>
-              </m:mrow>
-             </m:mtd>
-            </m:mtr>
-           </xsl:for-each>
-            <m:mtr>
-             <m:mtd>
-              <m:mrow>
-               <m:mtext>]</m:mtext>
-              </m:mrow>
-             </m:mtd>
-            </m:mtr>
-          </m:mtable>
-         </xsl:when>
-         <xsl:otherwise>
-          <m:mtext>]</m:mtext>
-         </xsl:otherwise>
-         </xsl:choose>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>OF ARITY</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="./arity/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>BUILT FROM</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <xsl:for-each select="./Constructor">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <xsl:choose>
-         <xsl:when test="position() = 1">
-          <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         </xsl:when>
-         <xsl:otherwise>
-          <m:mtext>|</m:mtext>
-          <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         </xsl:otherwise>
-         </xsl:choose>
-         <m:mtext><xsl:value-of select="./@name"/> OF</m:mtext>
-         <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         <xsl:apply-templates select="./*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      </xsl:for-each>
-     </xsl:for-each>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!-- VARIABLE -->
-
-<xsl:template match="Variable">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>VARIABLE <xsl:value-of select="@name"/> OF TYPE</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="type/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!--**********************-->
-<!--        TERMS         -->
-<!--**********************-->
-
-<xsl:template match="m:bvar">
- <xsl:choose>
-  <xsl:when test="m:type">
-   <xsl:variable name="charlength">
-    <xsl:apply-templates select="m:ci" mode="charcount"/>
-   </xsl:variable>
-   <xsl:choose>
-    <xsl:when test="$charlength >= $framewidth">
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-      <m:mtr>
-       <m:mtd>
-        <xsl:apply-templates select="m:ci"/>
-        <m:mo>:</m:mo>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-         <xsl:apply-templates select="m:type"/>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:apply-templates select="m:ci"/>
-     <m:mo>:</m:mo>
-     <xsl:apply-templates select="m:type"/>
-    </xsl:otherwise>
-   </xsl:choose>
-  </xsl:when>
-  <xsl:otherwise>
-   <xsl:apply-templates select="m:ci"/>
-  </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<!-- CSYMBOL -->
-
-<xsl:template match="m:apply[m:csymbol]">
-    <xsl:variable name="name"><xsl:value-of select="m:csymbol"/></xsl:variable>
-    <xsl:variable name="charlength"><xsl:apply-templates select="m:csymbol" mode="charcount"/></xsl:variable>
-    <m:mrow>
-     <xsl:if test="@helm:xref">
-      <xsl:attribute name="helm:xref"><xsl:value-of select="@helm:xref"/></xsl:attribute>
-     </xsl:if>
-     <xsl:choose>
-      <xsl:when test="$name='prod'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-            <m:mo color="Blue">&#x03a0;</m:mo>
-            <xsl:apply-templates select="m:bvar"/>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>.</m:mo>
-            <xsl:apply-templates select="*[position()=3]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo color="Blue">&#x03a0;</m:mo>
-        <xsl:apply-templates select="m:bvar/m:ci"/>
-        <m:mo>:</m:mo>
-        <xsl:apply-templates select="m:bvar/m:type"/>
-        <m:mo>.</m:mo>
-        <xsl:apply-templates select="*[position()=3]"/>
-       </xsl:otherwise>
-       </xsl:choose> 
-      </xsl:when>
-      <xsl:when test="$name='arrow'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">(</m:mo>
-            <xsl:apply-templates select="*[position()=2]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo color="Blue">&#x2192;</m:mo>
-            <xsl:apply-templates select="*[position()=3]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">)</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo stretchy="false">(</m:mo>
-        <xsl:apply-templates select="*[position()=2]"/>
-        <m:mo color="Blue">&#x2192;</m:mo>
-        <xsl:apply-templates select="*[position()=3]"/>
-        <m:mo stretchy="false">)</m:mo>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='app'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">(</m:mo>
-            <xsl:apply-templates select="*[position()=2]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:for-each select="*[position()>2]">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>(</m:mtext></m:mphantom>
-            <xsl:apply-templates select="."/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:for-each>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">)</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo stretchy="false">(</m:mo>
-        <xsl:apply-templates select="*[position()=2]"/>
-        <xsl:for-each select="*[position()>2]">
-         <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         <xsl:apply-templates select="."/>
-        </xsl:for-each>
-        <m:mo stretchy="false">)</m:mo>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='cast'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">(</m:mo>
-            <xsl:apply-templates select="*[position()=2]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo color="#b03060">:></m:mo>
-            <xsl:apply-templates select="*[position()=3]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">)</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo stretchy="false">(</m:mo>
-        <xsl:apply-templates select="*[position()=2]"/>
-        <m:mo color="#b03060">:></m:mo>
-        <xsl:apply-templates select="*[position()=3]"/>
-        <m:mo stretchy="false">)</m:mo>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='Prop'">
-       <m:mo>Prop</m:mo>
-      </xsl:when>
-      <xsl:when test="$name='Set'">
-       <m:mo>Set</m:mo>
-      </xsl:when>
-      <xsl:when test="$name='Type'">
-       <m:mo>Type</m:mo>
-      </xsl:when>
-      <xsl:when test="$name='mutcase'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <xsl:variable name="charlength"><xsl:apply-templates select="*[position()=2]" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>&lt;</m:mo>
-            <xsl:apply-templates select="*[position()=2]"/>
-            <xsl:if test="$framewidth > $charlength">
-             <m:mo>&gt;</m:mo>
-             <m:mo>CASES</m:mo>
-             <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-             <xsl:apply-templates select="*[position()=3]"/>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:if test="$charlength >= $framewidth">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>&gt;</m:mo>
-            <m:mo>CASES</m:mo>
-            <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-            <xsl:apply-templates select="*[position()=3]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:if>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>OF</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
-         <xsl:variable name="charlength"><xsl:apply-templates select="." mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <xsl:choose>
-            <xsl:when test="position() = 1">
-              <m:mphantom><m:mtext>|</m:mtext></m:mphantom>
-            </xsl:when>
-            <xsl:otherwise>
-             <m:mo stretchy="false">|</m:mo>
-            </xsl:otherwise>
-            </xsl:choose>
-            <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-            <xsl:apply-templates select="."/>
-            <xsl:if test="$framewidth > $charlength">
-             <m:mo color="Green">&#x21d2;</m:mo>
-             <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:if test="$charlength >= $framewidth">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>|_</m:mtext></m:mphantom>  
-            <m:mo color="Green">&#x21d2;</m:mo>
-            <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:if>
-        </xsl:for-each>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>END</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo>&lt;</m:mo><xsl:apply-templates select="*[position()=2]"/><m:mo>&gt;</m:mo>
-        <m:mo>CASES</m:mo>
-        <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-        <xsl:apply-templates select="*[position()=3]"/>
-        <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-        <m:mo>OF</m:mo>
-        <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
-         <xsl:choose>
-         <xsl:when test="position() != 1">
-          <m:mo stretchy="false">|</m:mo>
-         </xsl:when> 
-         </xsl:choose>
-         <xsl:apply-templates select="."/>
-         <m:mo color="Green">&#x21d2;</m:mo>
-         <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
-        </xsl:for-each>
-        <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-        <m:mo>END</m:mo>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='fix'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>FIX</m:mo>
-            <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-            <m:mi><xsl:value-of select="m:ci"/></m:mi>
-            <m:mo stretchy="false">{</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-            <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-            <xsl:for-each select="m:bvar"> 
-             <xsl:variable name="charlength"><xsl:apply-templates select="m:type" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mi><xsl:value-of select="m:ci"/></m:mi>
-                <m:mo>:</m:mo>
-                <xsl:if test="$framewidth > $charlength">
-                 <xsl:apply-templates select="m:type"/>
-                </xsl:if>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr> 
-             <xsl:if test="$charlength >= $framewidth">
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mphantom><m:mtext>:=</m:mtext></m:mphantom>
-                <xsl:apply-templates select="m:type"/>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr>
-             </xsl:if>
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mo>:=</m:mo>
-                <xsl:apply-templates select="following-sibling::*[position()=1]"/>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr> 
-            </xsl:for-each>
-            </m:mtable>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">}</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo>FIX</m:mo>
-        <m:mi><xsl:value-of select="m:ci"/></m:mi>
-        <m:mo stretchy="false">{</m:mo>
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-        <xsl:for-each select="m:bvar"> 
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mi><xsl:value-of select="m:ci"/></m:mi>
-            <m:mo>:</m:mo>
-            <xsl:apply-templates select="m:type"/>
-            <m:mo>:=</m:mo>
-            <xsl:apply-templates select="following-sibling::*[position() = 1]"/>
-            <xsl:if test="position()=last()">
-             <m:mo stretchy="false">}</m:mo>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:for-each>
-        </m:mtable>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='cofix'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>COFIX</m:mo>
-            <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-            <m:mi><xsl:value-of select="m:ci"/></m:mi>
-            <m:mo stretchy="false">{</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-            <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-            <xsl:for-each select="m:bvar">
-             <xsl:variable name="charlength"><xsl:apply-templates select="m:type" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable> 
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mi><xsl:value-of select="m:ci"/></m:mi>
-                <m:mo>:</m:mo>
-                <xsl:if test="$framewidth > $charlength">
-                 <xsl:apply-templates select="m:type"/>
-                </xsl:if>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr> 
-             <xsl:if test="$charlength >= $framewidth">
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mphantom><m:mtext>:=</m:mtext></m:mphantom>
-                <xsl:apply-templates select="m:type"/>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr>
-             </xsl:if>
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mo>:=</m:mo>
-                <xsl:apply-templates select="following-sibling::*[position() = 1]"/>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr>
-            </xsl:for-each>
-            </m:mtable>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">}</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo>COFIX</m:mo>
-        <m:mi><xsl:value-of select="m:ci"/></m:mi>
-        <m:mo stretchy="false">{</m:mo>
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">  
-        <xsl:for-each select="m:bvar"> 
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mi><xsl:value-of select="m:ci"/></m:mi>
-            <m:mo>:</m:mo>
-            <xsl:apply-templates select="m:type"/>
-            <m:mo>:=</m:mo>
-            <xsl:apply-templates select="following-sibling::*[position() = 1]"/>
-            <xsl:if test="position()=last()">
-             <m:mo stretchy="false">}</m:mo>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:for-each>
-        </m:mtable>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      </xsl:choose>
-     </m:mrow>
-</xsl:template>
-
-<!-- LAMBDA -->
-
-<xsl:template match="m:lambda">
-    <xsl:variable name="charlength"><xsl:apply-templates select="*[position()=1]" mode="charcount"/></xsl:variable>
-    <m:mrow helm:xref="{@helm:xref}">
-     <xsl:choose>
-     <xsl:when test="$charlength >= $framewidth">
-      <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-        <m:mtr>
-          <m:mtd>
-            <m:mo color="Blue">&#x03bb;</m:mo>
-            <xsl:apply-templates select="m:bvar"/>
-          </m:mtd>
-         </m:mtr>
-       <m:mtr>
-        <m:mtd>
-         <m:mrow>
-          <m:mo>.</m:mo>
-          <xsl:apply-templates select="*[position()=2]"/>
-         </m:mrow>
-        </m:mtd>
-       </m:mtr>
-      </m:mtable>
-     </xsl:when>
-     <xsl:otherwise>
-      <m:mo color="Red">&#x03bb;</m:mo>
-      <xsl:apply-templates select="m:bvar/m:ci"/>
-      <m:mo>:</m:mo>
-      <xsl:apply-templates select="m:bvar/m:type"/>
-      <m:mo>.</m:mo>
-      <xsl:apply-templates select="*[position()=2]"/>
-     </xsl:otherwise>
-     </xsl:choose>
-    </m:mrow>
-</xsl:template>
-
-<!-- *********************************** -->
-<!-- BASE SET OF MATHML CONTENT ELEMENTS -->
-<!-- *********************************** -->
-
-<!-- Logic -->
-
-<xsl:template match = "m:apply[m:and[1]|m:or[1]
-          |m:geq[1]|m:leq[1]|m:gt[1]|m:lt[1]|m:eq[1]
-          |m:intesect[1]|m:union[1]|m:subset[1]|m:prsubset]">
- <xsl:variable name="symbol">
-  <xsl:choose>
-   <xsl:when test="m:and[1]">
-    <xsl:value-of select="'wedge'"/>
-   </xsl:when>
-   <xsl:when test="m:or[1]">
-    <xsl:value-of select="'vee'"/>
-   </xsl:when>
-   <xsl:when test="m:geq[1]">
-    <xsl:value-of select="'geq'"/>
-   </xsl:when>
-   <xsl:when test="m:leq[1]">
-    <xsl:value-of select="'leq'"/>
-   </xsl:when>
-   <xsl:when test="m:gt[1]">
-    <xsl:value-of select="'gt'"/>
-   </xsl:when>
-   <xsl:when test="m:lt[1]">
-    <xsl:value-of select="'lt'"/>
-   </xsl:when>
-   <xsl:when test="m:eq[1]">
-    <xsl:value-of select="'eq'"/>
-   </xsl:when>
-   <xsl:when test="m:subset[1]">
-    <xsl:value-of select="'SubsetEqual'"/>
-   </xsl:when>
-   <xsl:when test="m:prsubset[1]">
-    <xsl:value-of select="'subset'"/>
-   </xsl:when>
-   <xsl:when test="m:intersect[1]">
-    <xsl:value-of select="'Intersection'"/>
-   </xsl:when>
-   <xsl:when test="m:union[1]">
-    <xsl:value-of select="'Union'"/>
-   </xsl:when>
-  </xsl:choose>
- </xsl:variable>
- <xsl:variable name="charlength">
-  <xsl:apply-templates select="*[1]" mode="charcount"/>
- </xsl:variable>
- <xsl:choose>
-  <xsl:when test="$charlength >= $framewidth">
-   <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-    <m:mtr>
-     <m:mtd>
-      <m:mo stretchy="false">(</m:mo>
-      <xsl:apply-templates select="*[position()=2]"/>
-     </m:mtd>
-    </m:mtr>
-    <xsl:for-each select = "*[position()>2]">
-     <m:mtr>
-      <m:mtd>
-       <m:mrow>
-        <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-        <m:mo> 
-         <m:mchar name="{$symbol}"/>
-        </m:mo>
-        <xsl:apply-templates select="."/>
-       </m:mrow>
-      </m:mtd>
-     </m:mtr>
-    </xsl:for-each>
-    <m:mtr>
-     <m:mtd>
-      <m:mo stretchy="false">)</m:mo>
-     </m:mtd>
-    </m:mtr>
-   </m:mtable>
-  </xsl:when>
-  <xsl:otherwise>
-   <xsl:apply-imports/>
-  </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:set">
- <xsl:variable name="charlength">
-  <xsl:apply-templates select="." mode="charcount"/>
- </xsl:variable>
- <xsl:choose>
-  <xsl:when test="$charlength >= $framewidth">
-   <xsl:choose>
-    <xsl:when test="name(*[1]) = 'm:bvar'">
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-      <m:mtr>
-       <m:mtd>
-        <m:mo stretchy="false">{</m:mo>
-        <xsl:apply-templates select="m:bvar"/>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-        <m:mo>|</m:mo>
-        <xsl:apply-templates select="m:condition"/>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mo stretchy="false">}</m:mo>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </xsl:when>
-    <xsl:otherwise>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-      <m:mtr>
-       <m:mtd>
-        <m:mo stretchy="false">{</m:mo>
-        <xsl:apply-templates select="*[1]"/>
-        <xsl:if test="count(child::*) != 1">
-         <m:mo>,</m:mo>
-        </xsl:if>
-       </m:mtd>
-      </m:mtr>
-      <xsl:for-each select = "*[position()>1]">
-       <m:mtr>
-        <m:mtd>
-         <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         <xsl:apply-templates select="."/>
-         <xsl:if test="position() != last()">
-          <m:mo>,</m:mo>
-         </xsl:if>
-        </m:mtd>
-       </m:mtr>
-      </xsl:for-each>
-      <m:mtr>
-       <m:mtd>
-        <m:mo stretchy="false">}</m:mo>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </xsl:otherwise>
-   </xsl:choose>
-  </xsl:when>
-  <xsl:otherwise>
-   <xsl:apply-imports/>
-  </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!--**********************-->
-<!--       COUNTING       -->
-<!--**********************-->
-
-<xsl:template match="m:and|m:or|m:not|m:exists|m:eq|m:lt|m:leq|m:gt|m:geq
- |m:in|m:notin|m:intersect|m:union|m:subset|m:prsubset|m:card|m:setdiff" mode="charcount">
-<xsl:param name="incurrent_length" select="0"/> 
-    <xsl:choose>
-    <xsl:when test="$framewidth > ($incurrent_length + 3 + string-length())">
-     <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>
-     <xsl:choose>
-     <xsl:when test="string($siblength) = &quot;&quot;">
-      <xsl:value-of select="$incurrent_length + 3 + string-length()"/>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:value-of select="number($siblength)"/>
-     </xsl:otherwise>
-     </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:value-of select="$incurrent_length + 3 + string-length()"/>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<xsl:template match="m:ci|m:csymbol" mode="charcount">
-<xsl:param name="incurrent_length" select="0"/> 
-<xsl:param name="nosibling" select="0"/>
-    <xsl:choose>
-    <xsl:when test="$framewidth > ($incurrent_length + string-length()) and ($nosibling = 0)">
-     <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>
-     <xsl:choose>
-     <xsl:when test="string($siblength) = &quot;&quot;">
-      <xsl:value-of select="$incurrent_length + string-length()"/>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:value-of select="number($siblength)"/>
-     </xsl:otherwise>
-     </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:value-of select="$incurrent_length + string-length()"/>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template> 
-
-<xsl:template match="*" mode="charcount">
-<xsl:param name="incurrent_length" select="0"/>
-<xsl:param name="nosibling" select="0"/>
-    <xsl:variable name="childlength"><xsl:apply-templates select="*[position()=1]" mode="charcount"><xsl:with-param name="incurrent_length" select="$incurrent_length"/><xsl:with-param name="nosibling" select="0"/></xsl:apply-templates></xsl:variable>
-    <xsl:choose>
-    <xsl:when test="$framewidth > number($childlength) and ($nosibling = 0)">
-     <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>
-     <xsl:choose>
-     <xsl:when test="string($siblength) = &quot;&quot;">
-      <xsl:value-of select="number($childlength)"/>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:value-of select="number($siblength)"/>
-     </xsl:otherwise>
-     </xsl:choose>>
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:value-of select="number($childlength)"/>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet> 
diff --git a/helm/style/mmlextension_irene.xsl b/helm/style/mmlextension_irene.xsl
deleted file mode 100644 (file)
index 90852b7..0000000
+++ /dev/null
@@ -1,868 +0,0 @@
-<?xml version="1.0"?>
-
-<!--***********************************************************************--> 
-<!-- Extension to the XSLT version 0.07 of MathML content to presentation: -->
-<!-- First draft: February 19 2000, Andrea Asperti, Irene Schena           -->
-<!-- Revised: March 3 2000, Irene Schena                                   -->
-<!-- Revised: March 15 2000, Claudio Sacerdoti Coen, Irene Schena          -->
-<!-- Revised: March 21 2000, Irene Schena                                  -->
-<!--***********************************************************************--> 
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                              xmlns:m="http://www.w3.org/1998/Math/MathML"
-                              xmlns:helm="http://www.cs.unibo.it/helm">
-
-<xsl:import href="mml2mmlv1_0.xsl"/>
-
-<!--***********************************************************************-->
-<!-- Parameter affecting line-breaking                                     -->
-<!--***********************************************************************-->
-
-<xsl:variable name="framewidth" select="30"/>
-
-<!--***********************************************************************-->
-<!-- Gli oggetti sono stampati come mtext all'interno di una marca toplevel-->
-<!-- math ma al di fuori di semantics. Ora vi sono tanti semantics quanti  -->
-<!-- sono i termini: la presentation per un termine e' generata come primo -->
-<!-- figlio di un semantics e l'originario content viene inserito nel      -->
-<!-- nel secondo figlio di semantics, annotation-xml                       -->
-<!--***********************************************************************-->
-
-<!--**********************-->
-<!--        OBJECTS       -->
-<!--**********************-->
-
-<!-- DEFINITION -->
-
-<xsl:template match="Definition">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>DEFINITION <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != &quot;&quot;"><xsl:value-of select="Params"/></xsl:if>) OF TYPE</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="type/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>AS</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="body/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!-- AXIOM -->
-
-<xsl:template match="Axiom">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>AXIOM <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != &quot;&quot;"><xsl:value-of select="Params"/></xsl:if>) OF TYPE</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="type/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!-- UNFINISHED PROOF -->
-
-<xsl:template match="CurrentProof">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>UNFINISHED PROOF <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != &quot;&quot;"><xsl:value-of select="Params"/></xsl:if>)</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>THESIS:</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="type/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>CONJECTURES:</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <xsl:for-each select="Conjecture">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <m:mtext><xsl:value-of select="./@no"/>:</m:mtext>
-         <xsl:apply-templates select="./*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      </xsl:for-each>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>CORRESPONDING PROOF:</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="body/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!-- MUTUAL INDUCTIVE DEFINITION -->
-
-<xsl:template match="InductiveDefinition">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-     <xsl:for-each select="InductiveType">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <xsl:choose>
-         <xsl:when test="position() = 1">
-          <xsl:choose>
-          <xsl:when test="string(./@inductive) = &quot;true&quot;">
-           <m:mtext>INDUCTIVE DEFINITION</m:mtext>
-          </xsl:when>
-          <xsl:otherwise>
-           <m:mtext>COINDUCTIVE DEFINITION</m:mtext>
-          </xsl:otherwise>
-          </xsl:choose>  
-         </xsl:when>
-         <xsl:otherwise>
-          <m:mtext>AND</m:mtext>
-         </xsl:otherwise>
-         </xsl:choose>
-         <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         <m:mtext><xsl:value-of select="./@name"/>(<xsl:if test="string(../Params) != &quot;&quot;"><xsl:value-of select="../Params"/></xsl:if>)</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow> 
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <m:mtext>[</m:mtext>
-         <xsl:choose>
-         <xsl:when test="string(../Param) != &quot;&quot;">         
-          <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-           <xsl:for-each select="../Param">
-            <m:mtr>
-             <m:mtd>
-              <m:mrow>   
-               <m:mi><xsl:value-of select="./@name"/></m:mi>
-               <m:mo>:</m:mo>
-               <xsl:apply-templates select="*"/>
-              </m:mrow>
-             </m:mtd>
-            </m:mtr>
-           </xsl:for-each>
-            <m:mtr>
-             <m:mtd>
-              <m:mrow>
-               <m:mtext>]</m:mtext>
-              </m:mrow>
-             </m:mtd>
-            </m:mtr>
-          </m:mtable>
-         </xsl:when>
-         <xsl:otherwise>
-          <m:mtext>]</m:mtext>
-         </xsl:otherwise>
-         </xsl:choose>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>OF ARITY</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="./arity/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>BUILT FROM</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <xsl:for-each select="./Constructor">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <xsl:choose>
-         <xsl:when test="position() = 1">
-          <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         </xsl:when>
-         <xsl:otherwise>
-          <m:mtext>|</m:mtext>
-          <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         </xsl:otherwise>
-         </xsl:choose>
-         <m:mtext><xsl:value-of select="./@name"/> OF</m:mtext>
-         <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         <xsl:apply-templates select="./*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      </xsl:for-each>
-     </xsl:for-each>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!-- VARIABLE -->
-
-<xsl:template match="Variable">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>VARIABLE <xsl:value-of select="@name"/> OF TYPE</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="type/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!--**********************-->
-<!--        TERMS         -->
-<!--**********************-->
-
-<!-- CSYMBOL -->
-
-<xsl:template match="m:apply[m:csymbol]">
-    <xsl:variable name="name"><xsl:value-of select="m:csymbol"/></xsl:variable>
-    <xsl:variable name="charlength"><xsl:apply-templates select="m:csymbol" mode="charcount"/></xsl:variable>
-    <m:mrow helm:xref="{@helm:xref}">
-     <xsl:choose>
-      <xsl:when test="$name='prod'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <xsl:variable name="charlength"><xsl:apply-templates select="m:bvar/m:type" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo color="Blue">&#x03a0;</m:mo>
-            <xsl:apply-templates select="m:bvar/m:ci"/>
-            <m:mo>:</m:mo>
-            <xsl:if test="$framewidth > $charlength">
-             <xsl:apply-templates select="m:bvar/m:type"/>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:if test="$charlength >= $framewidth">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>.</m:mtext></m:mphantom>
-            <xsl:apply-templates select="m:bvar/m:type"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:if>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>.</m:mo>
-            <xsl:apply-templates select="*[position()=3]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo color="Blue">&#x03a0;</m:mo>
-        <xsl:apply-templates select="m:bvar/m:ci"/>
-        <m:mo>:</m:mo>
-        <xsl:apply-templates select="m:bvar/m:type"/>
-        <m:mo>.</m:mo>
-        <xsl:apply-templates select="*[position()=3]"/>
-       </xsl:otherwise>
-       </xsl:choose> 
-      </xsl:when>
-      <xsl:when test="$name='arrow'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">(</m:mo>
-            <xsl:apply-templates select="*[position()=2]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo color="Blue">&#x2192;</m:mo>
-            <xsl:apply-templates select="*[position()=3]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">)</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo stretchy="false">(</m:mo>
-        <xsl:apply-templates select="*[position()=2]"/>
-        <m:mo color="Blue">&#x2192;</m:mo>
-        <xsl:apply-templates select="*[position()=3]"/>
-        <m:mo stretchy="false">)</m:mo>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='app'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">(</m:mo>
-            <xsl:apply-templates select="*[position()=2]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:for-each select="*[position()>2]">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>(</m:mtext></m:mphantom>
-            <xsl:apply-templates select="."/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:for-each>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">)</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo stretchy="false">(</m:mo>
-        <xsl:apply-templates select="*[position()=2]"/>
-        <xsl:for-each select="*[position()>2]">
-         <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         <xsl:apply-templates select="."/>
-        </xsl:for-each>
-        <m:mo stretchy="false">)</m:mo>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='cast'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">(</m:mo>
-            <xsl:apply-templates select="*[position()=2]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo color="#b03060">:></m:mo>
-            <xsl:apply-templates select="*[position()=3]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">)</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo stretchy="false">(</m:mo>
-        <xsl:apply-templates select="*[position()=2]"/>
-        <m:mo color="#b03060">:></m:mo>
-        <xsl:apply-templates select="*[position()=3]"/>
-        <m:mo stretchy="false">)</m:mo>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='Prop'">
-       <m:mo>Prop</m:mo>
-      </xsl:when>
-      <xsl:when test="$name='Set'">
-       <m:mo>Set</m:mo>
-      </xsl:when>
-      <xsl:when test="$name='Type'">
-       <m:mo>Type</m:mo>
-      </xsl:when>
-      <xsl:when test="$name='mutcase'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <xsl:variable name="charlength"><xsl:apply-templates select="*[position()=2]" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>&lt;</m:mo>
-            <xsl:apply-templates select="*[position()=2]"/>
-            <xsl:if test="$framewidth > $charlength">
-             <m:mo>&gt;</m:mo>
-             <m:mo>CASES</m:mo>
-             <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-             <xsl:apply-templates select="*[position()=3]"/>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:if test="$charlength >= $framewidth">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>&gt;</m:mo>
-            <m:mo>CASES</m:mo>
-            <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-            <xsl:apply-templates select="*[position()=3]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:if>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>OF</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
-         <xsl:variable name="charlength"><xsl:apply-templates select="." mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <xsl:choose>
-            <xsl:when test="position() = 1">
-              <m:mphantom><m:mtext>|</m:mtext></m:mphantom>
-            </xsl:when>
-            <xsl:otherwise>
-             <m:mo stretchy="false">|</m:mo>
-            </xsl:otherwise>
-            </xsl:choose>
-            <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-            <xsl:apply-templates select="."/>
-            <xsl:if test="$framewidth > $charlength">
-             <m:mo color="Green">&#x21d2;</m:mo>
-             <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:if test="$charlength >= $framewidth">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>|_</m:mtext></m:mphantom>  
-            <m:mo color="Green">&#x21d2;</m:mo>
-            <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:if>
-        </xsl:for-each>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>END</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo>&lt;</m:mo><xsl:apply-templates select="*[position()=2]"/><m:mo>&gt;</m:mo>
-        <m:mo>CASES</m:mo>
-        <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-        <xsl:apply-templates select="*[position()=3]"/>
-        <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-        <m:mo>OF</m:mo>
-        <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
-         <xsl:choose>
-         <xsl:when test="position() != 1">
-          <m:mo stretchy="false">|</m:mo>
-         </xsl:when> 
-         </xsl:choose>
-         <xsl:apply-templates select="."/>
-         <m:mo color="Green">&#x21d2;</m:mo>
-         <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
-        </xsl:for-each>
-        <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-        <m:mo>END</m:mo>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='fix'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>FIX</m:mo>
-            <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-            <m:mi><xsl:value-of select="m:ci"/></m:mi>
-            <m:mo stretchy="false">{</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-            <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-            <xsl:for-each select="m:bvar"> 
-             <xsl:variable name="charlength"><xsl:apply-templates select="m:type" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mi><xsl:value-of select="m:ci"/></m:mi>
-                <m:mo>:</m:mo>
-                <xsl:if test="$framewidth > $charlength">
-                 <xsl:apply-templates select="m:type"/>
-                </xsl:if>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr> 
-             <xsl:if test="$charlength >= $framewidth">
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mphantom><m:mtext>:=</m:mtext></m:mphantom>
-                <xsl:apply-templates select="m:type"/>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr>
-             </xsl:if>
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mo>:=</m:mo>
-                <xsl:apply-templates select="following-sibling::*[position()=1]"/>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr> 
-            </xsl:for-each>
-            </m:mtable>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">}</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo>FIX</m:mo>
-        <m:mi><xsl:value-of select="m:ci"/></m:mi>
-        <m:mo stretchy="false">{</m:mo>
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-        <xsl:for-each select="m:bvar"> 
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mi><xsl:value-of select="m:ci"/></m:mi>
-            <m:mo>:</m:mo>
-            <xsl:apply-templates select="m:type"/>
-            <m:mo>:=</m:mo>
-            <xsl:apply-templates select="following-sibling::*[position() = 1]"/>
-            <xsl:if test="position()=last()">
-             <m:mo stretchy="false">}</m:mo>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:for-each>
-        </m:mtable>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='cofix'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>COFIX</m:mo>
-            <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-            <m:mi><xsl:value-of select="m:ci"/></m:mi>
-            <m:mo stretchy="false">{</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-            <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-            <xsl:for-each select="m:bvar">
-             <xsl:variable name="charlength"><xsl:apply-templates select="m:type" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable> 
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mi><xsl:value-of select="m:ci"/></m:mi>
-                <m:mo>:</m:mo>
-                <xsl:if test="$framewidth > $charlength">
-                 <xsl:apply-templates select="m:type"/>
-                </xsl:if>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr> 
-             <xsl:if test="$charlength >= $framewidth">
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mphantom><m:mtext>:=</m:mtext></m:mphantom>
-                <xsl:apply-templates select="m:type"/>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr>
-             </xsl:if>
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mo>:=</m:mo>
-                <xsl:apply-templates select="following-sibling::*[position() = 1]"/>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr>
-            </xsl:for-each>
-            </m:mtable>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">}</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo>COFIX</m:mo>
-        <m:mi><xsl:value-of select="m:ci"/></m:mi>
-        <m:mo stretchy="false">{</m:mo>
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">  
-        <xsl:for-each select="m:bvar"> 
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mi><xsl:value-of select="m:ci"/></m:mi>
-            <m:mo>:</m:mo>
-            <xsl:apply-templates select="m:type"/>
-            <m:mo>:=</m:mo>
-            <xsl:apply-templates select="following-sibling::*[position() = 1]"/>
-            <xsl:if test="position()=last()">
-             <m:mo stretchy="false">}</m:mo>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:for-each>
-        </m:mtable>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      </xsl:choose>
-     </m:mrow>
-</xsl:template>
-
-<!-- LAMBDA -->
-
-<xsl:template match="m:lambda">
-    <xsl:variable name="charlength"><xsl:apply-templates select="*[position()=1]" mode="charcount"/></xsl:variable>
-    <m:mrow helm:xref="{@helm:xref}">
-     <xsl:choose>
-     <xsl:when test="$charlength >= $framewidth">
-      <xsl:variable name="charlength"><xsl:apply-templates select="m:bvar/m:type" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
-      <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-       <m:mtr>
-        <m:mtd>
-         <m:mrow>
-          <m:mo color="Red">&#x03bb;</m:mo>
-<!--<xsl:text disable-output-escaping="yes">&amp;lambda;</xsl:text>-->
-          <xsl:apply-templates select="m:bvar/m:ci"/>
-          <m:mo>:</m:mo>
-          <xsl:if test="$framewidth > $charlength">
-           <xsl:apply-templates select="m:bvar/m:type"/>
-          </xsl:if>
-         </m:mrow>
-        </m:mtd>
-       </m:mtr>
-       <xsl:if test="$charlength >= $framewidth">
-       <m:mtr>
-        <m:mtd>
-         <m:mrow>
-          <m:mphantom><m:mtext>.</m:mtext></m:mphantom>
-          <xsl:apply-templates select="m:bvar/m:type"/>
-         </m:mrow>
-        </m:mtd>
-       </m:mtr>
-       </xsl:if>
-       <m:mtr>
-        <m:mtd>
-         <m:mrow>
-          <m:mo>.</m:mo>
-          <xsl:apply-templates select="*[position()=2]"/>
-         </m:mrow>
-        </m:mtd>
-       </m:mtr>
-      </m:mtable>
-     </xsl:when>
-     <xsl:otherwise>
-      <m:mo color="Red">&#x03bb;</m:mo>
-      <xsl:apply-templates select="m:bvar/m:ci"/>
-      <m:mo>:</m:mo>
-      <xsl:apply-templates select="m:bvar/m:type"/>
-      <m:mo>.</m:mo>
-      <xsl:apply-templates select="*[position()=2]"/>
-     </xsl:otherwise>
-     </xsl:choose>
-    </m:mrow>
-</xsl:template>
-
-<!--**********************-->
-<!--       COUNTING       -->
-<!--**********************-->
-
-<xsl:template match="m:ci|m:csymbol" mode="charcount">
-<xsl:param name="incurrent_length" select="0"/> 
-<xsl:param name="nosibling" select="0"/>
-    <xsl:choose>
-    <xsl:when test="$framewidth > ($incurrent_length + string-length()) and ($nosibling = 0)">
-     <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>
-     <xsl:choose>
-     <xsl:when test="string($siblength) = &quot;&quot;">
-      <xsl:value-of select="$incurrent_length + string-length()"/>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:value-of select="number($siblength)"/>
-     </xsl:otherwise>
-     </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:value-of select="$incurrent_length + string-length()"/>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template> 
-
-<xsl:template match="*" mode="charcount">
-<xsl:param name="incurrent_length" select="0"/>
-<xsl:param name="nosibling" select="0"/>
-    <xsl:variable name="childlength"><xsl:apply-templates select="*[position()=1]" mode="charcount"><xsl:with-param name="incurrent_length" select="$incurrent_length"/><xsl:with-param name="nosibling" select="0"/></xsl:apply-templates></xsl:variable>
-    <xsl:choose>
-    <xsl:when test="$framewidth > number($childlength) and ($nosibling = 0)">
-     <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>
-     <xsl:choose>
-     <xsl:when test="string($siblength) = &quot;&quot;">
-      <xsl:value-of select="number($childlength)"/>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:value-of select="number($siblength)"/>
-     </xsl:otherwise>
-     </xsl:choose>>
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:value-of select="number($childlength)"/>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet> 
diff --git a/helm/style/objcontent.xsl.csc b/helm/style/objcontent.xsl.csc
deleted file mode 100644 (file)
index d2a846c..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-<?xml version="1.0"?>
-
-<!--******************************************************************--> 
-<!-- XSLT version 0.1 of CIC objects to objects and MathML content:   -->
-<!-- First draft: March 21 2000, Irene Schena                         -->
-<!--******************************************************************-->
-
-<!--******************************************************************-->
-<!-- MANCA: gestione annotation e linking                             -->
-<!--******************************************************************-->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                              xmlns:m="http://www.w3.org/1998/Math/MathML">
-
-<xsl:import href="content.xsl"/>
-
-<!-- ROOT -->
-
-<xsl:template match="cicxml">
-    <xsl:variable name="url"><xsl:value-of select="@baseurl"/></xsl:variable>
-    <xsl:variable name="stylesheet"><xsl:value-of select="@stylesheet"/></xsl:variable>
-    <xsl:processing-instruction name="cocoon-format">type="text/xml"</xsl:processing-instruction>
-    <xsl:processing-instruction name="xml-stylesheet">href="<xsl:value-of select='concat($url,$stylesheet)'/>" type="text/xsl"</xsl:processing-instruction>
-    <xsl:processing-instruction name="cocoon-process">type="xslt"</xsl:processing-instruction>
-    <xsl:apply-templates/>
-</xsl:template>
-
-<!-- CIC OBJECTS -->
-
-<xsl:template match="Definition" mode="noannot">
-    <Definition name="{@name}">  
-     <xsl:if test="string(@params) != &quot;&quot;">
-      <Params>
-       <xsl:value-of select="@params"/>
-      </Params>
-     </xsl:if>
-     <body>
-       <xsl:apply-templates select="body/*[1]">
-        <xsl:with-param name="backpointer" select="&quot;*[1]&quot;"/>
-       </xsl:apply-templates>
-     </body>
-     <type>
-       <xsl:apply-templates select="type/*[1]">
-        <xsl:with-param name="backpointer" select="&quot;*[2]&quot;"/>
-       </xsl:apply-templates>
-     </type>
-    </Definition> 
-</xsl:template>
-
-<xsl:template match="Axiom" mode="noannot"> 
-    <Axiom name="{@name}">
-     <xsl:if test="string(@params) != &quot;&quot;">
-      <Params>
-       <xsl:value-of select="@params"/>
-      </Params>
-     </xsl:if>
-     <type>
-       <xsl:apply-templates select="type"/>
-     </type>
-    </Axiom> 
-</xsl:template>
-
-<xsl:template match="CurrentProof" mode="noannot">
-    <CurrentProof name="{@name}">
-     <xsl:for-each select="Conjecture">
-      <Conjecture no="./{@no}">
-        <xsl:apply-templates select="."/>
-      </Conjecture>
-     </xsl:for-each>
-     <body>
-       <xsl:apply-templates select="body"/>
-     </body>
-     <type>
-       <xsl:apply-templates select="type"/>
-     </type>
-    </CurrentProof> 
-</xsl:template>
-
-<xsl:template match="InductiveDefinition" mode="noannot">
-    <InductiveDefinition>
-     <xsl:if test="string(@params) != &quot;&quot;">
-      <Params>
-       <xsl:value-of select="@params"/>
-      </Params>
-     </xsl:if> 
-     <xsl:if test="string(@noParams) != 0"> 
-      <xsl:apply-templates select="InductiveType/arity/*[1]" mode="abstparams">
-       <xsl:with-param name="noparams" select="@noParams"/>
-      </xsl:apply-templates>
-     </xsl:if>
-     <xsl:for-each select="InductiveType">
-      <InductiveType name="{./@name}" inductive="{./@inductive}">
-       <arity>
-         <xsl:apply-templates select="./arity/*[1]" mode="abstparams">
-          <xsl:with-param name="noparams" select="../@noParams"/>
-          <xsl:with-param name="target" select="1"/>
-         </xsl:apply-templates>
-       </arity>
-       <xsl:for-each select="./Constructor">
-        <Constructor name="{./@name}">
-          <xsl:apply-templates select="./*[1]" mode="abstparams">
-           <xsl:with-param name="noparams" select="../../@noParams"/>
-           <xsl:with-param name="target" select="1"/>
-          </xsl:apply-templates>
-        </Constructor>
-       </xsl:for-each>
-      </InductiveType>
-     </xsl:for-each> 
-    </InductiveDefinition>       
-</xsl:template>
-
-<xsl:template match="Variable" mode="noannot"> 
-    <Variable name="{@name}">
-     <type>
-       <xsl:apply-templates select="type"/>
-     </type>
-    </Variable> 
-</xsl:template>
-
-<!--*******************************************-->
-<!--    ABSTRACTING PARAMETERS AND COUNTING    -->
-<!--*******************************************-->
-<!-- Si dimentica i CAST dei termini che astrae. Nel caso dell'astrazione -->
-<!-- dei lambda dei pattern del CASE, qualora i lambda non si trovino     -->
-<!-- nella forma weak-head, astrae solo i lambda che trova e restituisce  -->
-<!-- un corpo depurato da tutti i primi cast che precedono il termine     -->
-<!-- restituito.                                                          -->
-
-<xsl:template match="*" mode="abstparams">
-<xsl:param name="noparams" select="0"/>
-<xsl:param name="target" select="0"/>
-<xsl:param name="binder">PROD</xsl:param>
-    <xsl:choose>
-    <xsl:when test="($noparams != 0) and ((name(.)=string($binder)) or (name(.)=&quot;CAST&quot;))">
-     <xsl:choose>
-     <xsl:when test="name(.) = string($binder)">
-      <xsl:if test="$target = 0">
-       <xsl:choose>
-       <xsl:when test="string($binder) = &quot;LAMBDA&quot;">
-        <m:ci>
-         <xsl:value-of select="target/@binder"/>
-        </m:ci>
-       </xsl:when>
-       <xsl:otherwise> 
-        <Param name="{target/@binder}">
-         <xsl:apply-templates select="source" mode="noannot"/>
-        </Param>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:if>
-      <xsl:apply-templates select="target/*[1]" mode="abstparams">
-       <xsl:with-param name="noparams" select="$noparams - 1"/>
-       <xsl:with-param name="target" select="$target"/>
-       <xsl:with-param name="binder" select="$binder"/>
-      </xsl:apply-templates>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:apply-templates select="term/*[1]" mode="abstparams">
-       <xsl:with-param name="noparams" select="$noparams"/>
-       <xsl:with-param name="target" select="$target"/>
-       <xsl:with-param name="binder" select="$binder"/>
-      </xsl:apply-templates>
-     </xsl:otherwise>
-     </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise> 
-     <xsl:choose>
-     <xsl:when test="($target = 1) and ($noparams != 0)">
-      <m:apply>
-      <m:csymbol>app</m:csymbol>
-      <xsl:apply-templates select="." mode="noannot"/>
-      <xsl:call-template name="printparam"><xsl:with-param name="noleft" select="$noparams"/></xsl:call-template>
-      </m:apply>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:choose>
-      <xsl:when test="$noparams != 0">
-      <xsl:call-template name="printparam"><xsl:with-param name="noleft" select="$noparams"/></xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-       <xsl:if test="$target = 1">
-        <xsl:apply-templates select="." mode="noannot"/>
-       </xsl:if>
-      </xsl:otherwise>
-      </xsl:choose>
-     </xsl:otherwise>
-     </xsl:choose>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<xsl:template name="printparam">
-<xsl:param name="noleft" select="0"/>
-<xsl:param name="number" select="1"/>
-    <xsl:if test="$noleft != 0">
-     <m:ci>$<xsl:value-of select="$number"/></m:ci>
-     <xsl:call-template name="printparam"><xsl:with-param name="noleft" select="$noleft - 1"/><xsl:with-param name="number" select="$number + 1"/></xsl:call-template>  
-    </xsl:if>
-</xsl:template>
-
-<xsl:template match="*" mode="counting">
-<xsl:param name="noparams" select="0"/>
-<xsl:param name="count" select="0"/>
- <xsl:choose>
- <xsl:when test="name(.) = &quot;PROD&quot;">
-  <xsl:apply-templates select="target/*[1]" mode="counting">
-   <xsl:with-param name="noparams" select="$noparams"/>
-   <xsl:with-param name="count" select="$count + 1"/>
-  </xsl:apply-templates>
- </xsl:when>
- <xsl:when test="name(.) = &quot;CAST&quot;">
-  <xsl:apply-templates select="term/*[1]" mode="counting">
-   <xsl:with-param name="noparams" select="$noparams"/>
-   <xsl:with-param name="count" select="$count"/> 
-  </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
-  <xsl:value-of select="$count - $noparams"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/helm/style/objcontent_old.xsl b/helm/style/objcontent_old.xsl
deleted file mode 100644 (file)
index d3514b4..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-<?xml version="1.0"?>
-
-<!--******************************************************************--> 
-<!-- XSLT version 0.1 of CIC objects to objects and MathML content:   -->
-<!-- First draft: March 21 2000, Irene Schena                         -->
-<!--******************************************************************-->
-
-<!--******************************************************************-->
-<!-- MANCA: gestione annotation e linking                             -->
-<!--******************************************************************-->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                              xmlns:m="http://www.w3.org/1998/Math/MathML"
-                              xmlns:helm="http://www.cs.unibo.it/helm">
-
-<xsl:import href="content.xsl"/>
-
-<!-- ROOT -->
-
-<xsl:template match="cicxml">
-    <xsl:variable name="url"><xsl:value-of select="@baseurl"/></xsl:variable>
-    <xsl:variable name="stylesheet"><xsl:value-of select="@stylesheet"/></xsl:variable>
-    <xsl:processing-instruction name="cocoon-format">type="text/xml"</xsl:processing-instruction>
-    <xsl:processing-instruction name="xml-stylesheet">href="<xsl:value-of select='concat($url,$stylesheet)'/>" type="text/xsl"</xsl:processing-instruction>
-    <xsl:processing-instruction name="cocoon-process">type="xslt"</xsl:processing-instruction>
-    <xsl:apply-templates select="*[1]"/>
-</xsl:template>
-
-<!-- CIC OBJECTS -->
-
-<xsl:template match="Definition" mode="noannot">
-    <Definition name="{@name}" helm:xref="{@id}">  
-     <xsl:if test="string(@params) != &quot;&quot;">
-      <Params>
-       <xsl:value-of select="@params"/>
-      </Params>
-     </xsl:if>
-     <body>
-      <xsl:apply-templates select="body"/>
-     </body>
-     <type>
-       <xsl:apply-templates select="type"/>
-     </type>
-    </Definition> 
-</xsl:template>
-
-<xsl:template match="Axiom" mode="noannot"> 
-    <Axiom name="{@name}" helm:xref="{@id}">
-     <xsl:if test="string(@params) != &quot;&quot;">
-      <Params>
-       <xsl:value-of select="@params"/>
-      </Params>
-     </xsl:if>
-     <type>
-       <xsl:apply-templates select="type"/>
-     </type>
-    </Axiom> 
-</xsl:template>
-
-<xsl:template match="CurrentProof" mode="noannot">
-    <CurrentProof name="{@name}" helm:xref="{@id}">
-     <xsl:for-each select="Conjecture">
-      <Conjecture no="./{@no}">
-        <xsl:apply-templates select="."/>
-      </Conjecture>
-     </xsl:for-each>
-     <body>
-       <xsl:apply-templates select="body"/>
-     </body>
-     <type>
-       <xsl:apply-templates select="type"/>
-     </type>
-    </CurrentProof> 
-</xsl:template>
-
-<xsl:template match="InductiveDefinition" mode="noannot">
-    <InductiveDefinition helm:xref="{@id}">
-     <xsl:if test="string(@params) != &quot;&quot;">
-      <Params>
-       <xsl:value-of select="@params"/>
-      </Params>
-     </xsl:if> 
-     <xsl:if test="string(@noParams) != 0"> 
-      <xsl:apply-templates select="InductiveType/arity/*[1]" mode="abstparams">
-       <xsl:with-param name="noparams" select="@noParams"/>
-      </xsl:apply-templates>
-     </xsl:if>
-     <xsl:for-each select="InductiveType">
-      <InductiveType name="{./@name}" inductive="{./@inductive}">
-       <arity>
-         <xsl:apply-templates select="./arity/*[1]" mode="abstparams">
-          <xsl:with-param name="noparams" select="../@noParams"/>
-          <xsl:with-param name="target" select="1"/>
-         </xsl:apply-templates>
-       </arity>
-       <xsl:for-each select="./Constructor">
-        <Constructor name="{./@name}">
-          <xsl:apply-templates select="./*[1]" mode="abstparams">
-           <xsl:with-param name="noparams" select="../../@noParams"/>
-           <xsl:with-param name="target" select="1"/>
-          </xsl:apply-templates>
-        </Constructor>
-       </xsl:for-each>
-      </InductiveType>
-     </xsl:for-each> 
-    </InductiveDefinition>       
-</xsl:template>
-
-<xsl:template match="Variable" mode="noannot"> 
-    <Variable name="{@name}" helm:xref="{@id}">
-     <type>
-       <xsl:apply-templates select="type"/>
-     </type>
-    </Variable> 
-</xsl:template>
-
-<!--*******************************************-->
-<!--    ABSTRACTING PARAMETERS AND COUNTING    -->
-<!--*******************************************-->
-<!-- Si dimentica i CAST dei termini che astrae. Nel caso dell'astrazione -->
-<!-- dei lambda dei pattern del CASE, qualora i lambda non si trovino     -->
-<!-- nella forma weak-head, astrae solo i lambda che trova e restituisce  -->
-<!-- un corpo depurato da tutti i primi cast che precedono il termine     -->
-<!-- restituito.                                                          -->
-
-<xsl:template match="*" mode="abstparams">
-<xsl:param name="noparams" select="0"/>
-<xsl:param name="target" select="0"/>
-<xsl:param name="binder">PROD</xsl:param>
-    <xsl:choose>
-    <xsl:when test="($noparams != 0) and ((name(.)=string($binder)) or (name(.)=&quot;CAST&quot;))">
-     <xsl:choose>
-     <xsl:when test="name(.) = string($binder)">
-      <xsl:if test="$target = 0">
-       <xsl:choose>
-       <xsl:when test="string($binder) = &quot;LAMBDA&quot;">
-        <m:ci>
-         <xsl:value-of select="target/@binder"/>
-        </m:ci>
-       </xsl:when>
-       <xsl:otherwise> 
-        <Param name="{target/@binder}">
-         <xsl:apply-templates select="source" mode="noannot"/>
-        </Param>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:if>
-      <xsl:apply-templates select="target/*[1]" mode="abstparams">
-       <xsl:with-param name="noparams" select="$noparams - 1"/>
-       <xsl:with-param name="target" select="$target"/>
-       <xsl:with-param name="binder" select="$binder"/>
-      </xsl:apply-templates>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:apply-templates select="term/*[1]" mode="abstparams">
-       <xsl:with-param name="noparams" select="$noparams"/>
-       <xsl:with-param name="target" select="$target"/>
-       <xsl:with-param name="binder" select="$binder"/>
-      </xsl:apply-templates>
-     </xsl:otherwise>
-     </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise> 
-     <xsl:choose>
-     <xsl:when test="($target = 1) and ($noparams != 0)">
-      <m:apply>
-      <m:csymbol>app</m:csymbol>
-      <xsl:apply-templates select="." mode="noannot"/>
-      <xsl:call-template name="printparam"><xsl:with-param name="noleft" select="$noparams"/></xsl:call-template>
-      </m:apply>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:choose>
-      <xsl:when test="$noparams != 0">
-      <xsl:call-template name="printparam"><xsl:with-param name="noleft" select="$noparams"/></xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-       <xsl:if test="$target = 1">
-        <xsl:apply-templates select="." mode="noannot"/>
-       </xsl:if>
-      </xsl:otherwise>
-      </xsl:choose>
-     </xsl:otherwise>
-     </xsl:choose>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<xsl:template name="printparam">
-<xsl:param name="noleft" select="0"/>
-<xsl:param name="number" select="1"/>
-    <xsl:if test="$noleft != 0">
-     <m:ci>$<xsl:value-of select="$number"/></m:ci>
-     <xsl:call-template name="printparam"><xsl:with-param name="noleft" select="$noleft - 1"/><xsl:with-param name="number" select="$number + 1"/></xsl:call-template>  
-    </xsl:if>
-</xsl:template>
-
-<xsl:template match="*" mode="counting">
-<xsl:param name="noparams" select="0"/>
-<xsl:param name="count" select="0"/>
- <xsl:choose>
- <xsl:when test="name(.) = &quot;PROD&quot;">
-  <xsl:apply-templates select="target/*[1]" mode="counting">
-   <xsl:with-param name="noparams" select="$noparams"/>
-   <xsl:with-param name="count" select="$count + 1"/>
-  </xsl:apply-templates>
- </xsl:when>
- <xsl:when test="name(.) = &quot;CAST&quot;">
-  <xsl:apply-templates select="term/*[1]" mode="counting">
-   <xsl:with-param name="noparams" select="$noparams"/>
-   <xsl:with-param name="count" select="$count"/> 
-  </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
-  <xsl:value-of select="$count - $noparams"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/helm/style/proof31-10-00.xsl b/helm/style/proof31-10-00.xsl
deleted file mode 100644 (file)
index 3c42343..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml version="1.0"?>
-
-<!--******************************************************************--> 
-<!-- Basic Logic                                                      -->
-<!-- First draft: April 3 2000                                        -->
-<!-- HELM Group: Asperti, Padovani, Sacerdoti, Schena                 -->
-<!--******************************************************************-->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                              xmlns:m="http://www.w3.org/1998/Math/MathML"
-                              xmlns:helm="http://www.cs.unibo.it/helm">
-
-<!--******************************************************************-->
-<!-- Variable containing the absolute path of the CIC file            -->
-<!--******************************************************************-->
-
-<xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>
-
-<!-- ************************* LOGIC *********************************-->
-
-<!-- Proof objects -->
-
-<!-- <xsl:key name="typeid" use="@id" match="TYPE"/> -->
-
-<xsl:template match="LAMBDA|PROD|CAST|REL|SORT|APPLY|VAR|META|CONST|MUTIND|MUTCONSTRUCT|MUTCASE|FIX|COFIX" mode="noannot">
-  <xsl:choose> 
-   <xsl:when test="@id">
-    <xsl:variable name="id" select="@id"/>
-    <xsl:choose>
-     <!-- <xsl:when test="//ALLTYPES and key('typeid',@id)"> -->
-     <xsl:when test="//ALLTYPES/TYPE[@id=$id]">
-     <xsl:choose>
-      <xsl:when test="name()= 'APPLY' and CONST[
- attribute::uri='cic:/coq/INIT/Logic_Type/eqT_ind.con' or
- attribute::uri='cic:/coq/ZARITH/auxiliary/eqT_ind_r.con'] and count(child::*) = 7">
-       <m:apply helm:xref="{@id}">
-        <m:csymbol>rewrite</m:csymbol>
-        <xsl:apply-templates mode="pure" select="//ALLTYPES/TYPE[@id=$id]"/>
-        <m:apply>
-         <m:csymbol>rw_step</m:csymbol>
-         <xsl:apply-templates mode="pure" select="*[3]"/>
-         <xsl:apply-templates mode="pure" select="*[6]"/>
-         <xsl:apply-templates mode="pure" select="*[7]"/>
-        </m:apply>
-        <xsl:apply-templates mode="rewrite" select="*[5]"/>
-       </m:apply>
-      </xsl:when>
-      <!-- aggiungere la verifica dell'esistenza dei lambda per and_ind -->
-      <xsl:when test="name()= 'APPLY' and CONST[
- attribute::uri='cic:/coq/INIT/Logic/Conjunction/and_ind.con'] 
- and count(child::*) = 6">
-       <m:apply helm:xref="{@id}">
-        <m:csymbol>and_ind</m:csymbol>
-        <xsl:apply-templates mode="noannot" select="*[6]"/>
-        <m:ci><xsl:value-of select="*[5]/target/@binder"/></m:ci>
-        <xsl:apply-templates mode="pure" select="*[5]/source/*"/>
-        <m:ci><xsl:value-of select="*[5]/target/LAMBDA/target/@binder"/></m:ci>
-        <xsl:apply-templates mode="pure" select="*[5]/target/LAMBDA/source/*"/>
-        <xsl:apply-templates mode="noannot" select="*[5]/target/LAMBDA/target/*"/>
-       </m:apply>
-      </xsl:when>
-      <xsl:when test="name()= 'APPLY' and CONST[
- attribute::uri='cic:/coq/INIT/Logic/Disjunction/or_ind.con'] 
- and count(child::*) = 7">
-       <m:apply helm:xref="{@id}">
-        <m:csymbol>or_ind</m:csymbol>
-        <xsl:apply-templates mode="noannot" select="*[7]"/>
-        <xsl:apply-templates mode="pure" select="//ALLTYPES/TYPE[@id=$id]"/>
-        <xsl:apply-templates mode="pure" select="*[5]"/>
-        <xsl:apply-templates mode="pure" select="*[6]"/>
-       </m:apply>
-      </xsl:when>
-      <xsl:otherwise>
-       <m:apply helm:xref="{@id}">
-        <m:csymbol>proof</m:csymbol>
-        <xsl:apply-templates select="." mode="pure"/>
-        <!-- <xsl:apply-templates select="key('typeid',@id)" mode="pure"/> -->
-        <xsl:apply-templates select="//ALLTYPES/TYPE[@id=$id]" mode="pure"/>
-       </m:apply>
-      </xsl:otherwise>
-     </xsl:choose>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:apply-templates select="." mode="pure"/>
-     </xsl:otherwise>
-    </xsl:choose>
-   </xsl:when>
-   <xsl:otherwise>
-    <xsl:apply-templates select="." mode="pure"/>
-   </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="rewrite">
-  <xsl:choose>
-   <xsl:when test="name()= 'APPLY' and CONST[
- attribute::uri='cic:/coq/INIT/Logic_Type/eqT_ind.con' or
- attribute::uri='cic:/coq/ZARITH/auxiliary/eqT_ind_r.con'] and count(child::*) = 7">
-    <xsl:variable name="id" select="@id"/>
-     <xsl:apply-templates mode="pure" select="//ALLTYPES/TYPE[@id=$id]"/>
-     <m:apply>
-      <m:csymbol>rw_step</m:csymbol>
-      <xsl:apply-templates mode="pure" select="*[3]"/>
-      <xsl:apply-templates mode="pure" select="*[6]"/>
-      <xsl:apply-templates mode="pure" select="*[7]"/>
-     </m:apply>
-     <xsl:apply-templates mode="rewrite" select="*[5]"/>
-   </xsl:when>
-   <xsl:otherwise>
-    <xsl:apply-templates mode="noannot" select="."/>
-   </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-
-<!-- Basic proof operators -->
-
-<!-- non del tutto soddisfacente, ma .... -->
-<xsl:template match="APPLY[CONST[
- attribute::uri='cic:/coq/INIT/Logic_Type/eqT_ind.con' or
- attribute::uri='cic:/coq/ZARITH/auxiliary/eqT_ind_r.con']]" mode="appflat">
-    <xsl:choose>
-     <xsl:when test="count(child::*) > 7">
-      <xsl:variable name="id" select="@id"/>
-      <xsl:variable name="ideqp" select="*[7]/@id"/>
-      <xsl:variable name="idsubp" select="*[5]/@id"/>
-      <xsl:variable name="leteqp" select="boolean(//ALLTYPES/TYPE[@id=$ideqp])"/>
-      <xsl:variable name="letsubp" select="boolean(//ALLTYPES/TYPE[@id=$idsubp])"/>
-      <m:apply helm:xref="{@id}">
-       <m:csymbol>rewrite_and_apply</m:csymbol>
-       <m:apply>
-        <m:csymbol>rw_step</m:csymbol>
-        <xsl:apply-templates mode="pure" select="*[3]"/>
-        <xsl:apply-templates mode="pure" select="*[6]"/>
-        <xsl:choose>
-         <xsl:when test="$leteqp">
-          <xsl:choose>
-           <xsl:when test="$letsubp">
-            <m:ci>
-             <xsl:value-of select="'h2'"/>
-            </m:ci>
-           </xsl:when>
-           <xsl:otherwise>
-            <m:ci>
-             <xsl:value-of select="'h1'"/>
-            </m:ci>
-           </xsl:otherwise>
-          </xsl:choose>
-         </xsl:when>
-         <xsl:otherwise>
-          <xsl:apply-templates mode="pure" select="*[7]"/>
-         </xsl:otherwise>
-        </xsl:choose>
-       </m:apply>
-      <xsl:choose>
-       <xsl:when test="$letsubp">
-        <m:ci>
-         <xsl:value-of select="'h1'"/>
-        </m:ci>
-       </xsl:when>
-       <xsl:otherwise>
-        <xsl:apply-templates mode="pure" select="*[5]"/>
-       </xsl:otherwise>
-      </xsl:choose>
-      <xsl:apply-templates mode="flat" select="*[8]">
-       <xsl:with-param name="n">
-        <xsl:value-of select="1+$letsubp+$leteqp"/>
-       </xsl:with-param>
-      </xsl:apply-templates>
-     </m:apply>
-    </xsl:when>
-    <xsl:otherwise>
-     <m:apply helm:xref="{@id}">
-      <m:csymbol>app</m:csymbol>
-      <xsl:apply-templates mode="flat" select="*[1]"/>
-     </m:apply>
-    </xsl:otherwise>
-   </xsl:choose>
-</xsl:template> 
-
-<xsl:template match="APPLY[CONST[
- attribute::uri='cic:/coq/INIT/Logic/Conjunction/and_ind.con']]" mode="appflat">
-    <xsl:choose>
-     <xsl:when test="count(child::*) > 4">
-      <m:apply helm:xref="{@id}">
-       <m:csymbol>app</m:csymbol>
-       <xsl:apply-templates mode="pure" select="*[1]"/>
-       <m:ci>*</m:ci>
-       <m:ci>*</m:ci>
-       <m:ci>*</m:ci>
-       <xsl:apply-templates mode="flat" select="*[5]"/>
-      </m:apply>
-     </xsl:when>
-     <xsl:otherwise>
-      <m:apply helm:xref="{@id}">
-       <m:csymbol>app</m:csymbol>
-       <xsl:apply-templates mode="flat" select="*[1]"/>
-      </m:apply>
-     </xsl:otherwise>
-    </xsl:choose>
-</xsl:template> 
-
-
-</xsl:stylesheet>
-
-
-
-
-
-
index 7776afbbf59826a0bf0ef6f4354add0b84a927e1..e82a13d6305ea084475c3ccd2701915040660a03 100644 (file)
@@ -7,11 +7,11 @@
 <!--***********************************************************************-->
 
 <!-- Schema of stylesheet precedences (from highest to lowest):          -->
-<!-- set -> basic -> annotatedcont                                       -->
-<!-- because theory_content is imported and has lower precendence than   -->
+<!-- proofs.xsl-> reals.xsl-> set -> basic -> annotatedcont              -->
+<!-- because annotatedcont is imported and has lower precendence than    -->
 <!-- the templates of rootcontent (i.e. the templates of set and basic). -->
 <!-- annotatedcont -> objcontent -> content                              -->
-<!-- because theory_content generates an import precedence tree.         --> 
+<!-- because annotatedcont generates an import precedence tree.          --> 
 
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
diff --git a/helm/style/rootcontent_withproofs.xsl b/helm/style/rootcontent_withproofs.xsl
deleted file mode 100644 (file)
index 11d6684..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-
-<!--***********************************************************************--> 
-<!-- XSLT version 0.1 of the stylesheet to accomplish the right inclusion  -->
-<!-- of the content stylesheets:                                           -->
-<!-- First draft: May 26 2000, Claudio Sacerdoti Coen, Irene Schena        -->
-<!--***********************************************************************-->
-
-<!-- Schema of stylesheet precedences (from highest to lowest):          -->
-<!-- set -> basic -> annotatedcont                                       -->
-<!-- because theory_content is imported and has lower precendence than   -->
-<!-- the templates of rootcontent (i.e. the templates of set and basic). -->
-<!-- annotatedcont -> objcontent -> content                              -->
-<!-- because theory_content generates an import precedence tree.         --> 
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-
-<xsl:import href="annotatedcont.xsl"/>
-<xsl:key name="id" use="@id" match="LAMBDA|PROD|CAST|REL|SORT|APPLY|VAR|META|CONST|MUTIND|MUTCONSTRUCT|MUTCASE|FIX|COFIX|Definition|Axiom|CurrentProof|InductiveDefinition|Variable"/>
-<xsl:include href="basic.xsl"/>
-<xsl:include href="set.xsl"/>
-<xsl:include href="reals.xsl"/>
-
-<xsl:variable name="showproof" select="1"/>
-</xsl:stylesheet>
-
-
-
index d293ee6f2423fc5dde11a2d2589ae5b1a5842fba..5ba277e8d4251afbcf6f96f948122bdc661e7f9c 100644 (file)
@@ -4,19 +4,22 @@
 <!-- XSLT version 0.1 of the stylesheet to accomplish the right inclusion  -->
 <!-- of the theory content stylesheets:                                    -->
 <!-- First draft: May 26 2000, Claudio Sacerdoti Coen, Irene Schena        -->
+<!--              November 15 2000, Irene Schena                           -->
 <!--***********************************************************************-->
 
 <!-- Schema of stylesheet precedences (from highest to lowest):          -->
-<!-- set -> basic -> theory_content                                      -->
-<!-- because theory_content is imported and has lower precendence than   -->
-<!-- the templates of rootcontent (i.e. the templates of set and basic). -->
-<!-- theory_content -> annotatedcont -> objcontent -> content            -->
-<!-- because theory_content generates an import precedence tree.         --> 
+<!-- theory_content -> rootcontent.xsl                                   -->
+<!-- because theory_content is included and has higher precendence than  -->
+<!-- the templates of rootcontent which are imported.                    -->
 
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
-<xsl:import href="theory_content.xsl"/>
-<xsl:include href="basic.xsl"/>
-<xsl:include href="set.xsl"/>
+<xsl:import href="rootcontent.xsl"/>
+<xsl:include href="theory_content.xsl"/>
 
 </xsl:stylesheet>
+
+
+
+
+
diff --git a/helm/style/style_prima_del_linguaggio_naturale/annotatedcont.xsl.csc b/helm/style/style_prima_del_linguaggio_naturale/annotatedcont.xsl.csc
deleted file mode 100644 (file)
index 3508d6b..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0"?>
-
-<!--***********************************************************************--> 
-<!-- XSLT version 0.1 of annotated MathML content to MathML presentation:  -->
-<!-- First draft: March 29 2000, Claudio Sacerdoti Coen, Irene Schena      -->
-<!--***********************************************************************--> 
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                              xmlns:m="http://www.w3.org/1998/Math/MathML">
-
-<xsl:import href="objcontent.xsl"/>
-
-<xsl:template match="Definition|Axiom|CurrentProof|InductiveDefinition|Variable">
-    <xsl:choose>
-    <xsl:when test="'annotation' != name(*[1])">
-     <xsl:apply-templates select="." mode="noannot"/>
-    </xsl:when>
-    <xsl:otherwise>
-     <annotation>
-      <xsl:apply-templates select="annotation"/>
-     </annotation>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<xsl:template match="LAMBDA|PROD|CAST|REL|SORT|APPLY|VAR|META|CONST|MUTIND|MUTCONSTRUCT|MUTCASE|FIX|COFIX">
-  <xsl:param name="backpointer" select="''"/>
-    <xsl:choose>
-    <xsl:when test="'Annotation' != name(*[1])">
-     <m:math>
-      <xsl:apply-templates select="." mode="noannot">
-       <xsl:with-param name="backpointer" select="$backpointer"/>
-      </xsl:apply-templates>
-     </m:math>
-    </xsl:when>
-    <xsl:otherwise>
-     <annotation>
-      <xsl:apply-templates select="Annotation"/>
-     </annotation>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<!-- DA MODIFICARE PER GESTIRE I RIFERIMENTI A SOTTOANNOTAZIONI O NODI MATH -->
-
-<xsl:template match="nephew">
- <xsl:variable name="select" select="@no"/>
- <xsl:apply-templates select="../../*[2]/*[number($select)]"/>
-</xsl:template>
-
-<xsl:template match="brother">
- <xsl:variable name="select" select="@no"/>
- <xsl:apply-templates select="../../*[number($select) + 1]"/>
-</xsl:template>
-
-<xsl:template match="name">
- <xsl:value-of select="../../*[2]/@name"/>
-</xsl:template>
-
-<xsl:template match="nephew-name">
- <xsl:variable name="select" select="@no"/>
- <xsl:value-of select="../../*[2]/*[number($select)]/@name"/>
-</xsl:template>
-
-</xsl:stylesheet>
-
diff --git a/helm/style/style_prima_del_linguaggio_naturale/content.xsl.csc b/helm/style/style_prima_del_linguaggio_naturale/content.xsl.csc
deleted file mode 100644 (file)
index 5f7c1e1..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-<?xml version="1.0"?>
-
-<!--******************************************************************--> 
-<!-- XSLT version 0.1 of CIC objects to MathML content:               -->
-<!-- First draft: February 14 2000, Andrea Asperti, Irene Schena      -->
-<!-- Revised: March 3 2000, Irene Schena                              -->
-<!-- Revised: March 10 2000, Irene Schena                             -->
-<!-- Revised: March 15 2000, Claudio Sacerdoti Coen, Irene Schena     -->
-<!--******************************************************************-->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                              xmlns:m="http://www.w3.org/1998/Math/MathML">
-
-<xsl:include href="params.xsl"/>
-
-<!--<xsl:output
-           method="xml" 
-           version="1.0" 
-           encoding="ISO-8859-1" 
-           omit-xml-declaration="no"
-           standalone="no" 
-           doctype-public="http://www.w3.org/TR/REC-MathML" 
-           indent="yes"
-           media-type="text/mathml" /> -->
-
-<!-- DA FARE: 
-1)risolvere nella fase di pre-processing le uri relative, settando l'attributo
-definitionURL dell'oggetto corrispondente (alcuni punteranno a nulla! -quelli 
-che non hanno il file di definizione corrispondente-); [le uri assolute hanno
-la forma cic:/.../ in definitionURL e questo schema di uri verra' risolto da
-Amaya o da chi di dovere in /really_very_local/helm/PARSER/example/.../]
-2)aggiungere nei file xml gli ID, affinche' nello stylesheet si setti
-l'attributo xref di ogni oggetto per puntare (tramite ID) al suo corrispondente
-della rappresentazione interna. 
--->
-
-<!--******************************************************************-->
-<!-- Variable containing the absolute path of the CIC file            -->
-<!--******************************************************************-->
-
-<xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>
-
-<!-- CIC TERMS -->
-
-<xsl:template match="LAMBDA" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:lambda>
-     <m:bvar>
-      <m:ci>
-       [[<xsl:value-of select="$backpointer"/>]]
-       <xsl:value-of select="target/@binder"/>
-      </m:ci>
-      <m:type>
-       <xsl:apply-templates select="source/*[1]" mode="noannot">
-        <xsl:with-param name="backpointer" select="concat($backpointer,'/*[1]/*[1]')"/>
-       </xsl:apply-templates>
-      </m:type>
-     </m:bvar>
-     <xsl:apply-templates select="target/*[1]" mode="noannot">
-      <xsl:with-param name="backpointer" select="concat($backpointer,'/*[2]/*[1]')"/>
-     </xsl:apply-templates>
-    </m:lambda>
-</xsl:template>
-
-<xsl:template match="PROD" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:apply>
-     <xsl:choose>
-     <xsl:when test="string(target/@binder)= &quot;&quot;">
-      <m:csymbol>arrow</m:csymbol>
-      <xsl:apply-templates select="source/*[1]" mode="noannot">
-       <xsl:with-param name="backpointer" select="concat($backpointer,'/*[1]/*[1]')"/>
-      </xsl:apply-templates>
-     </xsl:when>
-     <xsl:otherwise>
-      <m:csymbol>prod</m:csymbol>
-       <m:bvar>
-        <m:ci>
-         [[<xsl:value-of select="$backpointer"/>]]
-         <xsl:value-of select="target/@binder"/>
-        </m:ci>
-        <m:type>
-         <xsl:apply-templates select="source/*[1]" mode="noannot">
-          <xsl:with-param name="backpointer" select="concat($backpointer,'/*[1]/*[1]')"/>
-         </xsl:apply-templates>
-        </m:type>
-       </m:bvar>
-     </xsl:otherwise>
-     </xsl:choose>
-     <xsl:apply-templates select="target/*[1]" mode="noannot">
-      <xsl:with-param name="backpointer" select="concat($backpointer,'/*[2]/*[1]')"/>
-     </xsl:apply-templates>
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="CAST" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:apply>
-     <m:csymbol>cast</m:csymbol>
-     <xsl:apply-templates mode="noannot" select="*[1]/*[1]">
-      <xsl:with-param name="backpointer" select="concat($backpointer,'/*[1]/*[1]')"/>
-     </xsl:apply-templates>
-     <xsl:apply-templates mode="noannot" select="*[2]/*[1]">
-      <xsl:with-param name="backpointer" select="concat($backpointer,'/*[2]/*[1]')"/>
-     </xsl:apply-templates>
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="REL" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:ci>
-     [[<xsl:value-of select="$backpointer"/>]]
-     <xsl:value-of select="@binder"/>
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="SORT" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:apply>
-     <m:csymbol>
-      <xsl:value-of select="@value"/>
-     </m:csymbol>
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="APPLY" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:apply>
-    <m:csymbol>app</m:csymbol>
-     <xsl:for-each select="*">
-      <xsl:apply-templates mode="noannot" select=".">
-       <xsl:with-param name="backpointer" select="concat($backpointer,'/*[',position(),']')"/>
-      </xsl:apply-templates>
-     </xsl:for-each>
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="VAR" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:ci>
-     [[<xsl:value-of select="$backpointer"/>]]
-     <xsl:value-of select="substring-after(@relUri,&quot;,&quot;)"/>
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="META" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:ci>
-     [[<xsl:value-of select="$backpointer"/>]]
-     <xsl:value-of select="@no"/>
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="CONST" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:ci definitionURL="{@uri}">
-     [[<xsl:value-of select="$backpointer"/>]]
-     <xsl:call-template name="name_of_uri">
-      <xsl:with-param name="uri" select="@uri"/>
-     </xsl:call-template>
-     <!-- <xsl:value-of select="document(concat(string($absPath),@uri))/*/@name"/> -->
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="MUTIND" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:ci definitionURL="{@uri}">
-     <xsl:variable name="index"><xsl:value-of select="@noType"/></xsl:variable>
-     [[<xsl:value-of select="$backpointer"/>]]
-     <xsl:value-of select="document(concat(string($absPath),@uri))/InductiveDefinition/InductiveType[position()=number($index)+1]/@name"/>
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="MUTCONSTRUCT" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:ci definitionURL="{@uri}">
-     <xsl:variable name="Tindex"><xsl:value-of select="@noType"/></xsl:variable>
-     <xsl:variable name="Cindex"><xsl:value-of select="@noConstr"/></xsl:variable>
-     [[<xsl:value-of select="$backpointer"/>]]
-     <xsl:value-of select="document(concat(string($absPath),@uri))/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($Cindex)]/@name"/>
-    </m:ci>
-</xsl:template>
-
-<xsl:template match="MUTCASE" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <xsl:variable name="Tindex"><xsl:value-of select="@noType"/></xsl:variable>
-    <xsl:variable name="Turi"><xsl:value-of select="@uriType"/></xsl:variable>
-    <m:apply>
-     <m:csymbol>mutcase</m:csymbol>
-     <xsl:apply-templates select="patternsType/*[1]" mode="noannot">
-       <xsl:with-param name="backpointer" select="concat($backpointer,'/*[1]/*[1]')"/>
-     </xsl:apply-templates>
-     <xsl:apply-templates select="inductiveTerm/*[1]" mode="noannot">
-       <xsl:with-param name="backpointer" select="concat($backpointer,'/*[2]/*[1]')"/>
-     </xsl:apply-templates>
-     <xsl:variable name="nop"><xsl:value-of select="document(concat(string($absPath),$Turi))/InductiveDefinition/@noParams"/></xsl:variable>
-     <xsl:for-each select="pattern">
-      <xsl:variable name="pos" select="position()"/>
-      <xsl:variable name="nopar"><xsl:apply-templates select="document(concat(string($absPath),$Turi))/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/*[1]" mode="counting"><xsl:with-param name="noparams" select="$nop"/></xsl:apply-templates></xsl:variable>
-      <xsl:choose>
-      <xsl:when test="$nopar = 0">
-       <m:ci>
-        <xsl:value-of select="document(concat(string($absPath),$Turi))/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/@name"/>
-       </m:ci>
-      </xsl:when>
-      <xsl:otherwise>
-       <m:apply>
-        <m:csymbol>app</m:csymbol>
-        <m:ci>
-         <xsl:value-of select="document(concat(string($absPath),$Turi))/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/@name"/>
-        </m:ci>
-        <xsl:apply-templates select="./*[1]" mode="abstparams"><xsl:with-param name="noparams" select="$nopar"/><xsl:with-param name="binder">LAMBDA</xsl:with-param></xsl:apply-templates>
-        </m:apply>
-       </xsl:otherwise>
-       </xsl:choose>
-      <xsl:apply-templates select="./*[1]" mode="abstparams"><xsl:with-param name="noparams" select="$nopar"/><xsl:with-param name="target" select="1"/><xsl:with-param name="binder">LAMBDA</xsl:with-param></xsl:apply-templates>
-     </xsl:for-each> 
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="FIX" mode="noannot">
-  <xsl:param name="backpointer" select="''"/>
-    <m:apply>
-     <xsl:variable name="findex"><xsl:value-of select="@noFun"/></xsl:variable>
-     <m:csymbol>fix</m:csymbol>
-     <m:ci><xsl:value-of select="FixFunction[position()=number($findex)+1]/@name"/></m:ci>
-     <xsl:apply-templates mode="noannot" select="*"/>
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="COFIX" mode="noannot">
-   <m:apply>
-     <xsl:variable name="findex"><xsl:value-of select="@noFun"/></xsl:variable>
-     <m:csymbol>cofix</m:csymbol>
-     <m:ci><xsl:value-of select="CofixFunction[position()=number($findex)+1]/@name"/></m:ci>
-     <xsl:apply-templates mode="noannot" select="*"/>
-    </m:apply>
-</xsl:template>
-
-<!-- ELEMENTS OF CIC TERMS -->
-
-<xsl:template match="FixFunction" mode="noannot">
-    <m:bvar>
-     <m:ci><xsl:value-of select="@name"/></m:ci>
-     <m:type><xsl:apply-templates select="type/*[1]" mode="noannot"/></m:type>
-    </m:bvar> 
-    <xsl:apply-templates select="body/*[1]" mode="noannot"/>
-</xsl:template>
-
-<xsl:template match="CofixFunction" mode="noannot">
-    <m:bvar>
-     <m:ci><xsl:value-of select="@name"/></m:ci>
-     <m:type><xsl:apply-templates select="type/*[1]" mode="noannot"/></m:type>
-    </m:bvar> 
-    <xsl:apply-templates select="body/*[1]" mode="noannot"/>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/helm/style/style_prima_del_linguaggio_naturale/mmlextension_andrea.xsl b/helm/style/style_prima_del_linguaggio_naturale/mmlextension_andrea.xsl
deleted file mode 100644 (file)
index e75affe..0000000
+++ /dev/null
@@ -1,1052 +0,0 @@
-<?xml version="1.0"?>
-
-<!--***********************************************************************--> 
-<!-- Extension to the XSLT version 0.07 of MathML content to presentation: -->
-<!-- First draft: February 19 2000, Andrea Asperti, Irene Schena           -->
-<!-- Revised: March 3 2000, Irene Schena                                   -->
-<!-- Revised: March 15 2000, Claudio Sacerdoti Coen, Irene Schena          -->
-<!-- Revised: March 21 2000, Irene Schena                                  -->
-<!--***********************************************************************--> 
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                              xmlns:m="http://www.w3.org/1998/Math/MathML"
-                              xmlns:helm="http://www.cs.unibo.it/helm">
-
-<xsl:import href="mml2mmlv1_0.xsl"/>
-
-<!--***********************************************************************-->
-<!-- Parameter affecting line-breaking                                     -->
-<!--***********************************************************************-->
-
-<xsl:variable name="framewidth" select="15"/>
-
-<!--***********************************************************************-->
-<!-- Gli oggetti sono stampati come mtext all'interno di una marca toplevel-->
-<!-- math ma al di fuori di semantics. Ora vi sono tanti semantics quanti  -->
-<!-- sono i termini: la presentation per un termine e' generata come primo -->
-<!-- figlio di un semantics e l'originario content viene inserito nel      -->
-<!-- nel secondo figlio di semantics, annotation-xml                       -->
-<!--***********************************************************************-->
-
-<!--**********************-->
-<!--        OBJECTS       -->
-<!--**********************-->
-
-<xsl:template match="/">
- <xsl:processing-instruction name="cocoon-format">type="text/xhtml"</xsl:processing-instruction>
- <xsl:apply-templates select="*"/>
-</xsl:template>
-
-<!-- DEFINITION -->
-
-<xsl:template match="Definition">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>DEFINITION <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != &quot;&quot;"><xsl:value-of select="Params"/></xsl:if>) OF TYPE</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="type/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>AS</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="body/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!-- AXIOM -->
-
-<xsl:template match="Axiom">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>AXIOM <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != &quot;&quot;"><xsl:value-of select="Params"/></xsl:if>) OF TYPE</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="type/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!-- UNFINISHED PROOF -->
-
-<xsl:template match="CurrentProof">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>UNFINISHED PROOF <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != &quot;&quot;"><xsl:value-of select="Params"/></xsl:if>)</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>THESIS:</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="type/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>CONJECTURES:</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <xsl:for-each select="Conjecture">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <m:mtext><xsl:value-of select="./@no"/>:</m:mtext>
-         <xsl:apply-templates select="./*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      </xsl:for-each>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>CORRESPONDING PROOF:</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="body/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!-- MUTUAL INDUCTIVE DEFINITION -->
-
-<xsl:template match="InductiveDefinition">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-     <xsl:for-each select="InductiveType">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <xsl:choose>
-         <xsl:when test="position() = 1">
-          <xsl:choose>
-          <xsl:when test="string(./@inductive) = &quot;true&quot;">
-           <m:mtext>INDUCTIVE DEFINITION</m:mtext>
-          </xsl:when>
-          <xsl:otherwise>
-           <m:mtext>COINDUCTIVE DEFINITION</m:mtext>
-          </xsl:otherwise>
-          </xsl:choose>  
-         </xsl:when>
-         <xsl:otherwise>
-          <m:mtext>AND</m:mtext>
-         </xsl:otherwise>
-         </xsl:choose>
-         <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         <m:mtext><xsl:value-of select="./@name"/>(<xsl:if test="string(../Params) != &quot;&quot;"><xsl:value-of select="../Params"/></xsl:if>)</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow> 
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <m:mtext>[</m:mtext>
-         <xsl:choose>
-         <xsl:when test="string(../Param) != &quot;&quot;">         
-          <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-           <xsl:for-each select="../Param">
-            <m:mtr>
-             <m:mtd>
-              <m:mrow>   
-               <m:mi><xsl:value-of select="./@name"/></m:mi>
-               <m:mo>:</m:mo>
-               <xsl:apply-templates select="*"/>
-              </m:mrow>
-             </m:mtd>
-            </m:mtr>
-           </xsl:for-each>
-            <m:mtr>
-             <m:mtd>
-              <m:mrow>
-               <m:mtext>]</m:mtext>
-              </m:mrow>
-             </m:mtd>
-            </m:mtr>
-          </m:mtable>
-         </xsl:when>
-         <xsl:otherwise>
-          <m:mtext>]</m:mtext>
-         </xsl:otherwise>
-         </xsl:choose>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>OF ARITY</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="./arity/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>BUILT FROM</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <xsl:for-each select="./Constructor">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <xsl:choose>
-         <xsl:when test="position() = 1">
-          <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         </xsl:when>
-         <xsl:otherwise>
-          <m:mtext>|</m:mtext>
-          <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         </xsl:otherwise>
-         </xsl:choose>
-         <m:mtext><xsl:value-of select="./@name"/> OF</m:mtext>
-         <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         <xsl:apply-templates select="./*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      </xsl:for-each>
-     </xsl:for-each>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!-- VARIABLE -->
-
-<xsl:template match="Variable">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>VARIABLE <xsl:value-of select="@name"/> OF TYPE</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="type/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!--**********************-->
-<!--        TERMS         -->
-<!--**********************-->
-
-<xsl:template match="m:bvar">
- <xsl:choose>
-  <xsl:when test="m:type">
-   <xsl:variable name="charlength">
-    <xsl:apply-templates select="m:ci" mode="charcount"/>
-   </xsl:variable>
-   <xsl:choose>
-    <xsl:when test="$charlength >= $framewidth">
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-      <m:mtr>
-       <m:mtd>
-        <xsl:apply-templates select="m:ci"/>
-        <m:mo>:</m:mo>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-         <xsl:apply-templates select="m:type"/>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:apply-templates select="m:ci"/>
-     <m:mo>:</m:mo>
-     <xsl:apply-templates select="m:type"/>
-    </xsl:otherwise>
-   </xsl:choose>
-  </xsl:when>
-  <xsl:otherwise>
-   <xsl:apply-templates select="m:ci"/>
-  </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<!-- CSYMBOL -->
-
-<xsl:template match="m:apply[m:csymbol]">
-    <xsl:variable name="name"><xsl:value-of select="m:csymbol"/></xsl:variable>
-    <xsl:variable name="charlength"><xsl:apply-templates select="m:csymbol" mode="charcount"/></xsl:variable>
-    <m:mrow>
-     <xsl:if test="@helm:xref">
-      <xsl:attribute name="helm:xref"><xsl:value-of select="@helm:xref"/></xsl:attribute>
-     </xsl:if>
-     <xsl:choose>
-      <xsl:when test="$name='prod'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-            <m:mo color="Blue">&#x03a0;</m:mo>
-            <xsl:apply-templates select="m:bvar"/>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>.</m:mo>
-            <xsl:apply-templates select="*[position()=3]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo color="Blue">&#x03a0;</m:mo>
-        <xsl:apply-templates select="m:bvar/m:ci"/>
-        <m:mo>:</m:mo>
-        <xsl:apply-templates select="m:bvar/m:type"/>
-        <m:mo>.</m:mo>
-        <xsl:apply-templates select="*[position()=3]"/>
-       </xsl:otherwise>
-       </xsl:choose> 
-      </xsl:when>
-      <xsl:when test="$name='arrow'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">(</m:mo>
-            <xsl:apply-templates select="*[position()=2]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo color="Blue">&#x2192;</m:mo>
-            <xsl:apply-templates select="*[position()=3]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">)</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo stretchy="false">(</m:mo>
-        <xsl:apply-templates select="*[position()=2]"/>
-        <m:mo color="Blue">&#x2192;</m:mo>
-        <xsl:apply-templates select="*[position()=3]"/>
-        <m:mo stretchy="false">)</m:mo>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='app'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">(</m:mo>
-            <xsl:apply-templates select="*[position()=2]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:for-each select="*[position()>2]">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>(</m:mtext></m:mphantom>
-            <xsl:apply-templates select="."/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:for-each>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">)</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo stretchy="false">(</m:mo>
-        <xsl:apply-templates select="*[position()=2]"/>
-        <xsl:for-each select="*[position()>2]">
-         <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         <xsl:apply-templates select="."/>
-        </xsl:for-each>
-        <m:mo stretchy="false">)</m:mo>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='cast'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">(</m:mo>
-            <xsl:apply-templates select="*[position()=2]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo color="Yellow">:></m:mo>
-            <xsl:apply-templates select="*[position()=3]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">)</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo stretchy="false">(</m:mo>
-        <xsl:apply-templates select="*[position()=2]"/>
-        <m:mo color="Yellow">:></m:mo>
-        <xsl:apply-templates select="*[position()=3]"/>
-        <m:mo stretchy="false">)</m:mo>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='Prop'">
-       <m:mo>Prop</m:mo>
-      </xsl:when>
-      <xsl:when test="$name='Set'">
-       <m:mo>Set</m:mo>
-      </xsl:when>
-      <xsl:when test="$name='Type'">
-       <m:mo>Type</m:mo>
-      </xsl:when>
-      <xsl:when test="$name='mutcase'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <xsl:variable name="charlength"><xsl:apply-templates select="*[position()=2]" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>&lt;</m:mo>
-            <xsl:apply-templates select="*[position()=2]"/>
-            <xsl:if test="$framewidth > $charlength">
-             <m:mo>&gt;</m:mo>
-             <m:mo>CASES</m:mo>
-             <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-             <xsl:apply-templates select="*[position()=3]"/>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:if test="$charlength >= $framewidth">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>&gt;</m:mo>
-            <m:mo>CASES</m:mo>
-            <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-            <xsl:apply-templates select="*[position()=3]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:if>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>OF</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
-         <xsl:variable name="charlength"><xsl:apply-templates select="." mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <xsl:choose>
-            <xsl:when test="position() = 1">
-              <m:mphantom><m:mtext>|</m:mtext></m:mphantom>
-            </xsl:when>
-            <xsl:otherwise>
-             <m:mo stretchy="false">|</m:mo>
-            </xsl:otherwise>
-            </xsl:choose>
-            <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-            <xsl:apply-templates select="."/>
-            <xsl:if test="$framewidth > $charlength">
-             <m:mo color="Green">&#x21d2;</m:mo>
-             <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:if test="$charlength >= $framewidth">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>|_</m:mtext></m:mphantom>  
-            <m:mo color="Green">&#x21d2;</m:mo>
-            <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:if>
-        </xsl:for-each>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>END</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo>&lt;</m:mo><xsl:apply-templates select="*[position()=2]"/><m:mo>&gt;</m:mo>
-        <m:mo>CASES</m:mo>
-        <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-        <xsl:apply-templates select="*[position()=3]"/>
-        <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-        <m:mo>OF</m:mo>
-        <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
-         <xsl:choose>
-         <xsl:when test="position() != 1">
-          <m:mo stretchy="false">|</m:mo>
-         </xsl:when> 
-         </xsl:choose>
-         <xsl:apply-templates select="."/>
-         <m:mo color="Green">&#x21d2;</m:mo>
-         <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
-        </xsl:for-each>
-        <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-        <m:mo>END</m:mo>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='fix'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>FIX</m:mo>
-            <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-            <m:mi><xsl:value-of select="m:ci"/></m:mi>
-            <m:mo stretchy="false">{</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-            <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-            <xsl:for-each select="m:bvar"> 
-             <xsl:variable name="charlength"><xsl:apply-templates select="m:type" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mi><xsl:value-of select="m:ci"/></m:mi>
-                <m:mo>:</m:mo>
-                <xsl:if test="$framewidth > $charlength">
-                 <xsl:apply-templates select="m:type"/>
-                </xsl:if>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr> 
-             <xsl:if test="$charlength >= $framewidth">
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mphantom><m:mtext>:=</m:mtext></m:mphantom>
-                <xsl:apply-templates select="m:type"/>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr>
-             </xsl:if>
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mo>:=</m:mo>
-                <xsl:apply-templates select="following-sibling::*[position()=1]"/>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr> 
-            </xsl:for-each>
-            </m:mtable>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">}</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo>FIX</m:mo>
-        <m:mi><xsl:value-of select="m:ci"/></m:mi>
-        <m:mo stretchy="false">{</m:mo>
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-        <xsl:for-each select="m:bvar"> 
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mi><xsl:value-of select="m:ci"/></m:mi>
-            <m:mo>:</m:mo>
-            <xsl:apply-templates select="m:type"/>
-            <m:mo>:=</m:mo>
-            <xsl:apply-templates select="following-sibling::*[position() = 1]"/>
-            <xsl:if test="position()=last()">
-             <m:mo stretchy="false">}</m:mo>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:for-each>
-        </m:mtable>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='cofix'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>COFIX</m:mo>
-            <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-            <m:mi><xsl:value-of select="m:ci"/></m:mi>
-            <m:mo stretchy="false">{</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-            <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-            <xsl:for-each select="m:bvar">
-             <xsl:variable name="charlength"><xsl:apply-templates select="m:type" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable> 
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mi><xsl:value-of select="m:ci"/></m:mi>
-                <m:mo>:</m:mo>
-                <xsl:if test="$framewidth > $charlength">
-                 <xsl:apply-templates select="m:type"/>
-                </xsl:if>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr> 
-             <xsl:if test="$charlength >= $framewidth">
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mphantom><m:mtext>:=</m:mtext></m:mphantom>
-                <xsl:apply-templates select="m:type"/>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr>
-             </xsl:if>
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mo>:=</m:mo>
-                <xsl:apply-templates select="following-sibling::*[position() = 1]"/>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr>
-            </xsl:for-each>
-            </m:mtable>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">}</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo>COFIX</m:mo>
-        <m:mi><xsl:value-of select="m:ci"/></m:mi>
-        <m:mo stretchy="false">{</m:mo>
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">  
-        <xsl:for-each select="m:bvar"> 
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mi><xsl:value-of select="m:ci"/></m:mi>
-            <m:mo>:</m:mo>
-            <xsl:apply-templates select="m:type"/>
-            <m:mo>:=</m:mo>
-            <xsl:apply-templates select="following-sibling::*[position() = 1]"/>
-            <xsl:if test="position()=last()">
-             <m:mo stretchy="false">}</m:mo>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:for-each>
-        </m:mtable>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      </xsl:choose>
-     </m:mrow>
-</xsl:template>
-
-<!-- LAMBDA -->
-
-<xsl:template match="m:lambda">
-    <xsl:variable name="charlength"><xsl:apply-templates select="*[position()=1]" mode="charcount"/></xsl:variable>
-    <m:mrow helm:xref="{@helm:xref}">
-     <xsl:choose>
-     <xsl:when test="$charlength >= $framewidth">
-      <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-        <m:mtr>
-          <m:mtd>
-            <m:mo color="Blue">&#x03bb;</m:mo>
-            <xsl:apply-templates select="m:bvar"/>
-          </m:mtd>
-         </m:mtr>
-       <m:mtr>
-        <m:mtd>
-         <m:mrow>
-          <m:mo>.</m:mo>
-          <xsl:apply-templates select="*[position()=2]"/>
-         </m:mrow>
-        </m:mtd>
-       </m:mtr>
-      </m:mtable>
-     </xsl:when>
-     <xsl:otherwise>
-      <m:mo color="Red">&#x03bb;</m:mo>
-      <xsl:apply-templates select="m:bvar/m:ci"/>
-      <m:mo>:</m:mo>
-      <xsl:apply-templates select="m:bvar/m:type"/>
-      <m:mo>.</m:mo>
-      <xsl:apply-templates select="*[position()=2]"/>
-     </xsl:otherwise>
-     </xsl:choose>
-    </m:mrow>
-</xsl:template>
-
-<!-- *********************************** -->
-<!-- BASE SET OF MATHML CONTENT ELEMENTS -->
-<!-- *********************************** -->
-
-<!-- Logic -->
-
-<xsl:template match = "m:apply[m:and[1]|m:or[1]
-          |m:geq[1]|m:leq[1]|m:gt[1]|m:lt[1]|m:eq[1]
-          |m:intesect[1]|m:union[1]|m:subset[1]|m:prsubset]">
- <xsl:variable name="symbol">
-  <xsl:choose>
-   <xsl:when test="m:and[1]">
-    <xsl:value-of select="'wedge'"/>
-   </xsl:when>
-   <xsl:when test="m:or[1]">
-    <xsl:value-of select="'vee'"/>
-   </xsl:when>
-   <xsl:when test="m:geq[1]">
-    <xsl:value-of select="'geq'"/>
-   </xsl:when>
-   <xsl:when test="m:leq[1]">
-    <xsl:value-of select="'leq'"/>
-   </xsl:when>
-   <xsl:when test="m:gt[1]">
-    <xsl:value-of select="'gt'"/>
-   </xsl:when>
-   <xsl:when test="m:lt[1]">
-    <xsl:value-of select="'lt'"/>
-   </xsl:when>
-   <xsl:when test="m:eq[1]">
-    <xsl:value-of select="'eq'"/>
-   </xsl:when>
-   <xsl:when test="m:subset[1]">
-    <xsl:value-of select="'SubsetEqual'"/>
-   </xsl:when>
-   <xsl:when test="m:prsubset[1]">
-    <xsl:value-of select="'subset'"/>
-   </xsl:when>
-   <xsl:when test="m:intersect[1]">
-    <xsl:value-of select="'Intersection'"/>
-   </xsl:when>
-   <xsl:when test="m:union[1]">
-    <xsl:value-of select="'Union'"/>
-   </xsl:when>
-  </xsl:choose>
- </xsl:variable>
- <xsl:variable name="charlength">
-  <xsl:apply-templates select="*[1]" mode="charcount"/>
- </xsl:variable>
- <xsl:choose>
-  <xsl:when test="$charlength >= $framewidth">
-   <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-    <m:mtr>
-     <m:mtd>
-      <m:mo stretchy="false">(</m:mo>
-      <xsl:apply-templates select="*[position()=2]"/>
-     </m:mtd>
-    </m:mtr>
-    <xsl:for-each select = "*[position()>2]">
-     <m:mtr>
-      <m:mtd>
-       <m:mrow>
-        <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-        <m:mo> 
-         <m:mchar name="{$symbol}"/>
-        </m:mo>
-        <xsl:apply-templates select="."/>
-       </m:mrow>
-      </m:mtd>
-     </m:mtr>
-    </xsl:for-each>
-    <m:mtr>
-     <m:mtd>
-      <m:mo stretchy="false">)</m:mo>
-     </m:mtd>
-    </m:mtr>
-   </m:mtable>
-  </xsl:when>
-  <xsl:otherwise>
-   <xsl:apply-imports/>
-  </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<xsl:template match = "m:set">
- <xsl:variable name="charlength">
-  <xsl:apply-templates select="." mode="charcount"/>
- </xsl:variable>
- <xsl:choose>
-  <xsl:when test="$charlength >= $framewidth">
-   <xsl:choose>
-    <xsl:when test="name(*[1]) = 'm:bvar'">
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-      <m:mtr>
-       <m:mtd>
-        <m:mo stretchy="false">{</m:mo>
-        <xsl:apply-templates select="m:bvar"/>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-        <m:mo>|</m:mo>
-        <xsl:apply-templates select="m:condition"/>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mo stretchy="false">}</m:mo>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </xsl:when>
-    <xsl:otherwise>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-      <m:mtr>
-       <m:mtd>
-        <m:mo stretchy="false">{</m:mo>
-        <xsl:apply-templates select="*[1]"/>
-        <xsl:if test="count(child::*) != 1">
-         <m:mo>,</m:mo>
-        </xsl:if>
-       </m:mtd>
-      </m:mtr>
-      <xsl:for-each select = "*[position()>1]">
-       <m:mtr>
-        <m:mtd>
-         <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         <xsl:apply-templates select="."/>
-         <xsl:if test="position() != last()">
-          <m:mo>,</m:mo>
-         </xsl:if>
-        </m:mtd>
-       </m:mtr>
-      </xsl:for-each>
-      <m:mtr>
-       <m:mtd>
-        <m:mo stretchy="false">}</m:mo>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </xsl:otherwise>
-   </xsl:choose>
-  </xsl:when>
-  <xsl:otherwise>
-   <xsl:apply-imports/>
-  </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!--**********************-->
-<!--       COUNTING       -->
-<!--**********************-->
-
-<xsl:template match="m:and|m:or|m:not|m:exists|m:eq|m:lt|m:leq|m:gt|m:geq
- |m:in|m:notin|m:intersect|m:union|m:subset|m:prsubset|m:card|m:setdiff" mode="charcount">
-<xsl:param name="incurrent_length" select="0"/> 
-    <xsl:choose>
-    <xsl:when test="$framewidth > ($incurrent_length + 3 + string-length())">
-     <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>
-     <xsl:choose>
-     <xsl:when test="string($siblength) = &quot;&quot;">
-      <xsl:value-of select="$incurrent_length + 3 + string-length()"/>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:value-of select="number($siblength)"/>
-     </xsl:otherwise>
-     </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:value-of select="$incurrent_length + 3 + string-length()"/>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<xsl:template match="m:ci|m:csymbol" mode="charcount">
-<xsl:param name="incurrent_length" select="0"/> 
-<xsl:param name="nosibling" select="0"/>
-    <xsl:choose>
-    <xsl:when test="$framewidth > ($incurrent_length + string-length()) and ($nosibling = 0)">
-     <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>
-     <xsl:choose>
-     <xsl:when test="string($siblength) = &quot;&quot;">
-      <xsl:value-of select="$incurrent_length + string-length()"/>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:value-of select="number($siblength)"/>
-     </xsl:otherwise>
-     </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:value-of select="$incurrent_length + string-length()"/>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template> 
-
-<xsl:template match="*" mode="charcount">
-<xsl:param name="incurrent_length" select="0"/>
-<xsl:param name="nosibling" select="0"/>
-    <xsl:variable name="childlength"><xsl:apply-templates select="*[position()=1]" mode="charcount"><xsl:with-param name="incurrent_length" select="$incurrent_length"/><xsl:with-param name="nosibling" select="0"/></xsl:apply-templates></xsl:variable>
-    <xsl:choose>
-    <xsl:when test="$framewidth > number($childlength) and ($nosibling = 0)">
-     <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>
-     <xsl:choose>
-     <xsl:when test="string($siblength) = &quot;&quot;">
-      <xsl:value-of select="number($childlength)"/>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:value-of select="number($siblength)"/>
-     </xsl:otherwise>
-     </xsl:choose>>
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:value-of select="number($childlength)"/>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet> 
diff --git a/helm/style/style_prima_del_linguaggio_naturale/mmlextension_irene.xsl b/helm/style/style_prima_del_linguaggio_naturale/mmlextension_irene.xsl
deleted file mode 100644 (file)
index dfe2e6a..0000000
+++ /dev/null
@@ -1,868 +0,0 @@
-<?xml version="1.0"?>
-
-<!--***********************************************************************--> 
-<!-- Extension to the XSLT version 0.07 of MathML content to presentation: -->
-<!-- First draft: February 19 2000, Andrea Asperti, Irene Schena           -->
-<!-- Revised: March 3 2000, Irene Schena                                   -->
-<!-- Revised: March 15 2000, Claudio Sacerdoti Coen, Irene Schena          -->
-<!-- Revised: March 21 2000, Irene Schena                                  -->
-<!--***********************************************************************--> 
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                              xmlns:m="http://www.w3.org/1998/Math/MathML"
-                              xmlns:helm="http://www.cs.unibo.it/helm">
-
-<xsl:import href="mml2mmlv1_0.xsl"/>
-
-<!--***********************************************************************-->
-<!-- Parameter affecting line-breaking                                     -->
-<!--***********************************************************************-->
-
-<xsl:variable name="framewidth" select="30"/>
-
-<!--***********************************************************************-->
-<!-- Gli oggetti sono stampati come mtext all'interno di una marca toplevel-->
-<!-- math ma al di fuori di semantics. Ora vi sono tanti semantics quanti  -->
-<!-- sono i termini: la presentation per un termine e' generata come primo -->
-<!-- figlio di un semantics e l'originario content viene inserito nel      -->
-<!-- nel secondo figlio di semantics, annotation-xml                       -->
-<!--***********************************************************************-->
-
-<!--**********************-->
-<!--        OBJECTS       -->
-<!--**********************-->
-
-<!-- DEFINITION -->
-
-<xsl:template match="Definition">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>DEFINITION <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != &quot;&quot;"><xsl:value-of select="Params"/></xsl:if>) OF TYPE</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="type/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>AS</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="body/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!-- AXIOM -->
-
-<xsl:template match="Axiom">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>AXIOM <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != &quot;&quot;"><xsl:value-of select="Params"/></xsl:if>) OF TYPE</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="type/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!-- UNFINISHED PROOF -->
-
-<xsl:template match="CurrentProof">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>UNFINISHED PROOF <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != &quot;&quot;"><xsl:value-of select="Params"/></xsl:if>)</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>THESIS:</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="type/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>CONJECTURES:</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <xsl:for-each select="Conjecture">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <m:mtext><xsl:value-of select="./@no"/>:</m:mtext>
-         <xsl:apply-templates select="./*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      </xsl:for-each>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>CORRESPONDING PROOF:</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="body/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!-- MUTUAL INDUCTIVE DEFINITION -->
-
-<xsl:template match="InductiveDefinition">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-     <xsl:for-each select="InductiveType">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <xsl:choose>
-         <xsl:when test="position() = 1">
-          <xsl:choose>
-          <xsl:when test="string(./@inductive) = &quot;true&quot;">
-           <m:mtext>INDUCTIVE DEFINITION</m:mtext>
-          </xsl:when>
-          <xsl:otherwise>
-           <m:mtext>COINDUCTIVE DEFINITION</m:mtext>
-          </xsl:otherwise>
-          </xsl:choose>  
-         </xsl:when>
-         <xsl:otherwise>
-          <m:mtext>AND</m:mtext>
-         </xsl:otherwise>
-         </xsl:choose>
-         <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         <m:mtext><xsl:value-of select="./@name"/>(<xsl:if test="string(../Params) != &quot;&quot;"><xsl:value-of select="../Params"/></xsl:if>)</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow> 
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <m:mtext>[</m:mtext>
-         <xsl:choose>
-         <xsl:when test="string(../Param) != &quot;&quot;">         
-          <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-           <xsl:for-each select="../Param">
-            <m:mtr>
-             <m:mtd>
-              <m:mrow>   
-               <m:mi><xsl:value-of select="./@name"/></m:mi>
-               <m:mo>:</m:mo>
-               <xsl:apply-templates select="*"/>
-              </m:mrow>
-             </m:mtd>
-            </m:mtr>
-           </xsl:for-each>
-            <m:mtr>
-             <m:mtd>
-              <m:mrow>
-               <m:mtext>]</m:mtext>
-              </m:mrow>
-             </m:mtd>
-            </m:mtr>
-          </m:mtable>
-         </xsl:when>
-         <xsl:otherwise>
-          <m:mtext>]</m:mtext>
-         </xsl:otherwise>
-         </xsl:choose>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>OF ARITY</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="./arity/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>BUILT FROM</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <xsl:for-each select="./Constructor">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <xsl:choose>
-         <xsl:when test="position() = 1">
-          <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         </xsl:when>
-         <xsl:otherwise>
-          <m:mtext>|</m:mtext>
-          <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         </xsl:otherwise>
-         </xsl:choose>
-         <m:mtext><xsl:value-of select="./@name"/> OF</m:mtext>
-         <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         <xsl:apply-templates select="./*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      </xsl:for-each>
-     </xsl:for-each>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!-- VARIABLE -->
-
-<xsl:template match="Variable">
-    <m:math>
-     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mtext>VARIABLE <xsl:value-of select="@name"/> OF TYPE</m:mtext>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-      <m:mtr>
-       <m:mtd>
-        <m:mrow>
-         <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <xsl:apply-templates select="type/*[1]"/>
-        </m:mrow>
-       </m:mtd>
-      </m:mtr>
-     </m:mtable>
-    </m:math>
-</xsl:template>
-
-<!--**********************-->
-<!--        TERMS         -->
-<!--**********************-->
-
-<!-- CSYMBOL -->
-
-<xsl:template match="m:apply[m:csymbol]">
-    <xsl:variable name="name"><xsl:value-of select="m:csymbol"/></xsl:variable>
-    <xsl:variable name="charlength"><xsl:apply-templates select="m:csymbol" mode="charcount"/></xsl:variable>
-    <m:mrow helm:xref="{@helm:xref}">
-     <xsl:choose>
-      <xsl:when test="$name='prod'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <xsl:variable name="charlength"><xsl:apply-templates select="m:bvar/m:type" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo color="Blue">&#x03a0;</m:mo>
-            <xsl:apply-templates select="m:bvar/m:ci"/>
-            <m:mo>:</m:mo>
-            <xsl:if test="$framewidth > $charlength">
-             <xsl:apply-templates select="m:bvar/m:type"/>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:if test="$charlength >= $framewidth">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>.</m:mtext></m:mphantom>
-            <xsl:apply-templates select="m:bvar/m:type"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:if>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>.</m:mo>
-            <xsl:apply-templates select="*[position()=3]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo color="Blue">&#x03a0;</m:mo>
-        <xsl:apply-templates select="m:bvar/m:ci"/>
-        <m:mo>:</m:mo>
-        <xsl:apply-templates select="m:bvar/m:type"/>
-        <m:mo>.</m:mo>
-        <xsl:apply-templates select="*[position()=3]"/>
-       </xsl:otherwise>
-       </xsl:choose> 
-      </xsl:when>
-      <xsl:when test="$name='arrow'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">(</m:mo>
-            <xsl:apply-templates select="*[position()=2]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo color="Blue">&#x2192;</m:mo>
-            <xsl:apply-templates select="*[position()=3]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">)</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo stretchy="false">(</m:mo>
-        <xsl:apply-templates select="*[position()=2]"/>
-        <m:mo color="Blue">&#x2192;</m:mo>
-        <xsl:apply-templates select="*[position()=3]"/>
-        <m:mo stretchy="false">)</m:mo>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='app'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">(</m:mo>
-            <xsl:apply-templates select="*[position()=2]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:for-each select="*[position()>2]">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>(</m:mtext></m:mphantom>
-            <xsl:apply-templates select="."/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:for-each>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">)</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo stretchy="false">(</m:mo>
-        <xsl:apply-templates select="*[position()=2]"/>
-        <xsl:for-each select="*[position()>2]">
-         <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-         <xsl:apply-templates select="."/>
-        </xsl:for-each>
-        <m:mo stretchy="false">)</m:mo>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='cast'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">(</m:mo>
-            <xsl:apply-templates select="*[position()=2]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo color="Yellow">:></m:mo>
-            <xsl:apply-templates select="*[position()=3]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">)</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo stretchy="false">(</m:mo>
-        <xsl:apply-templates select="*[position()=2]"/>
-        <m:mo color="Yellow">:></m:mo>
-        <xsl:apply-templates select="*[position()=3]"/>
-        <m:mo stretchy="false">)</m:mo>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='Prop'">
-       <m:mo>Prop</m:mo>
-      </xsl:when>
-      <xsl:when test="$name='Set'">
-       <m:mo>Set</m:mo>
-      </xsl:when>
-      <xsl:when test="$name='Type'">
-       <m:mo>Type</m:mo>
-      </xsl:when>
-      <xsl:when test="$name='mutcase'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <xsl:variable name="charlength"><xsl:apply-templates select="*[position()=2]" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>&lt;</m:mo>
-            <xsl:apply-templates select="*[position()=2]"/>
-            <xsl:if test="$framewidth > $charlength">
-             <m:mo>&gt;</m:mo>
-             <m:mo>CASES</m:mo>
-             <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-             <xsl:apply-templates select="*[position()=3]"/>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:if test="$charlength >= $framewidth">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>&gt;</m:mo>
-            <m:mo>CASES</m:mo>
-            <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-            <xsl:apply-templates select="*[position()=3]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:if>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>OF</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
-         <xsl:variable name="charlength"><xsl:apply-templates select="." mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <xsl:choose>
-            <xsl:when test="position() = 1">
-              <m:mphantom><m:mtext>|</m:mtext></m:mphantom>
-            </xsl:when>
-            <xsl:otherwise>
-             <m:mo stretchy="false">|</m:mo>
-            </xsl:otherwise>
-            </xsl:choose>
-            <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-            <xsl:apply-templates select="."/>
-            <xsl:if test="$framewidth > $charlength">
-             <m:mo color="Green">&#x21d2;</m:mo>
-             <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <xsl:if test="$charlength >= $framewidth">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>|_</m:mtext></m:mphantom>  
-            <m:mo color="Green">&#x21d2;</m:mo>
-            <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:if>
-        </xsl:for-each>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>END</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo>&lt;</m:mo><xsl:apply-templates select="*[position()=2]"/><m:mo>&gt;</m:mo>
-        <m:mo>CASES</m:mo>
-        <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-        <xsl:apply-templates select="*[position()=3]"/>
-        <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-        <m:mo>OF</m:mo>
-        <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
-         <xsl:choose>
-         <xsl:when test="position() != 1">
-          <m:mo stretchy="false">|</m:mo>
-         </xsl:when> 
-         </xsl:choose>
-         <xsl:apply-templates select="."/>
-         <m:mo color="Green">&#x21d2;</m:mo>
-         <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
-        </xsl:for-each>
-        <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-        <m:mo>END</m:mo>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='fix'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>FIX</m:mo>
-            <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-            <m:mi><xsl:value-of select="m:ci"/></m:mi>
-            <m:mo stretchy="false">{</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-            <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-            <xsl:for-each select="m:bvar"> 
-             <xsl:variable name="charlength"><xsl:apply-templates select="m:type" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mi><xsl:value-of select="m:ci"/></m:mi>
-                <m:mo>:</m:mo>
-                <xsl:if test="$framewidth > $charlength">
-                 <xsl:apply-templates select="m:type"/>
-                </xsl:if>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr> 
-             <xsl:if test="$charlength >= $framewidth">
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mphantom><m:mtext>:=</m:mtext></m:mphantom>
-                <xsl:apply-templates select="m:type"/>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr>
-             </xsl:if>
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mo>:=</m:mo>
-                <xsl:apply-templates select="following-sibling::*[position()=1]"/>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr> 
-            </xsl:for-each>
-            </m:mtable>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">}</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo>FIX</m:mo>
-        <m:mi><xsl:value-of select="m:ci"/></m:mi>
-        <m:mo stretchy="false">{</m:mo>
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-        <xsl:for-each select="m:bvar"> 
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mi><xsl:value-of select="m:ci"/></m:mi>
-            <m:mo>:</m:mo>
-            <xsl:apply-templates select="m:type"/>
-            <m:mo>:=</m:mo>
-            <xsl:apply-templates select="following-sibling::*[position() = 1]"/>
-            <xsl:if test="position()=last()">
-             <m:mo stretchy="false">}</m:mo>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:for-each>
-        </m:mtable>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:when test="$name='cofix'">
-       <xsl:choose>
-       <xsl:when test="$charlength >= $framewidth">
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo>COFIX</m:mo>
-            <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
-            <m:mi><xsl:value-of select="m:ci"/></m:mi>
-            <m:mo stretchy="false">{</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-            <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-            <xsl:for-each select="m:bvar">
-             <xsl:variable name="charlength"><xsl:apply-templates select="m:type" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable> 
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mi><xsl:value-of select="m:ci"/></m:mi>
-                <m:mo>:</m:mo>
-                <xsl:if test="$framewidth > $charlength">
-                 <xsl:apply-templates select="m:type"/>
-                </xsl:if>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr> 
-             <xsl:if test="$charlength >= $framewidth">
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mphantom><m:mtext>:=</m:mtext></m:mphantom>
-                <xsl:apply-templates select="m:type"/>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr>
-             </xsl:if>
-             <m:mtr>
-              <m:mtd>
-               <m:mrow>
-                <m:mo>:=</m:mo>
-                <xsl:apply-templates select="following-sibling::*[position() = 1]"/>
-               </m:mrow>
-              </m:mtd>
-             </m:mtr>
-            </xsl:for-each>
-            </m:mtable>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mo stretchy="false">}</m:mo>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-        </m:mtable>
-       </xsl:when>
-       <xsl:otherwise>
-        <m:mo>COFIX</m:mo>
-        <m:mi><xsl:value-of select="m:ci"/></m:mi>
-        <m:mo stretchy="false">{</m:mo>
-        <m:mtable align="baseline 1" equalrows="false" columnalign="left">  
-        <xsl:for-each select="m:bvar"> 
-         <m:mtr>
-          <m:mtd>
-           <m:mrow>
-            <m:mi><xsl:value-of select="m:ci"/></m:mi>
-            <m:mo>:</m:mo>
-            <xsl:apply-templates select="m:type"/>
-            <m:mo>:=</m:mo>
-            <xsl:apply-templates select="following-sibling::*[position() = 1]"/>
-            <xsl:if test="position()=last()">
-             <m:mo stretchy="false">}</m:mo>
-            </xsl:if>
-           </m:mrow>
-          </m:mtd>
-         </m:mtr>
-         </xsl:for-each>
-        </m:mtable>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      </xsl:choose>
-     </m:mrow>
-</xsl:template>
-
-<!-- LAMBDA -->
-
-<xsl:template match="m:lambda">
-    <xsl:variable name="charlength"><xsl:apply-templates select="*[position()=1]" mode="charcount"/></xsl:variable>
-    <m:mrow helm:xref="{@helm:xref}">
-     <xsl:choose>
-     <xsl:when test="$charlength >= $framewidth">
-      <xsl:variable name="charlength"><xsl:apply-templates select="m:bvar/m:type" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
-      <m:mtable align="baseline 1" equalrows="false" columnalign="left">
-       <m:mtr>
-        <m:mtd>
-         <m:mrow>
-          <m:mo color="Red">&#x03bb;</m:mo>
-<!--<xsl:text disable-output-escaping="yes">&amp;lambda;</xsl:text>-->
-          <xsl:apply-templates select="m:bvar/m:ci"/>
-          <m:mo>:</m:mo>
-          <xsl:if test="$framewidth > $charlength">
-           <xsl:apply-templates select="m:bvar/m:type"/>
-          </xsl:if>
-         </m:mrow>
-        </m:mtd>
-       </m:mtr>
-       <xsl:if test="$charlength >= $framewidth">
-       <m:mtr>
-        <m:mtd>
-         <m:mrow>
-          <m:mphantom><m:mtext>.</m:mtext></m:mphantom>
-          <xsl:apply-templates select="m:bvar/m:type"/>
-         </m:mrow>
-        </m:mtd>
-       </m:mtr>
-       </xsl:if>
-       <m:mtr>
-        <m:mtd>
-         <m:mrow>
-          <m:mo>.</m:mo>
-          <xsl:apply-templates select="*[position()=2]"/>
-         </m:mrow>
-        </m:mtd>
-       </m:mtr>
-      </m:mtable>
-     </xsl:when>
-     <xsl:otherwise>
-      <m:mo color="Red">&#x03bb;</m:mo>
-      <xsl:apply-templates select="m:bvar/m:ci"/>
-      <m:mo>:</m:mo>
-      <xsl:apply-templates select="m:bvar/m:type"/>
-      <m:mo>.</m:mo>
-      <xsl:apply-templates select="*[position()=2]"/>
-     </xsl:otherwise>
-     </xsl:choose>
-    </m:mrow>
-</xsl:template>
-
-<!--**********************-->
-<!--       COUNTING       -->
-<!--**********************-->
-
-<xsl:template match="m:ci|m:csymbol" mode="charcount">
-<xsl:param name="incurrent_length" select="0"/> 
-<xsl:param name="nosibling" select="0"/>
-    <xsl:choose>
-    <xsl:when test="$framewidth > ($incurrent_length + string-length()) and ($nosibling = 0)">
-     <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>
-     <xsl:choose>
-     <xsl:when test="string($siblength) = &quot;&quot;">
-      <xsl:value-of select="$incurrent_length + string-length()"/>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:value-of select="number($siblength)"/>
-     </xsl:otherwise>
-     </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:value-of select="$incurrent_length + string-length()"/>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template> 
-
-<xsl:template match="*" mode="charcount">
-<xsl:param name="incurrent_length" select="0"/>
-<xsl:param name="nosibling" select="0"/>
-    <xsl:variable name="childlength"><xsl:apply-templates select="*[position()=1]" mode="charcount"><xsl:with-param name="incurrent_length" select="$incurrent_length"/><xsl:with-param name="nosibling" select="0"/></xsl:apply-templates></xsl:variable>
-    <xsl:choose>
-    <xsl:when test="$framewidth > number($childlength) and ($nosibling = 0)">
-     <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>
-     <xsl:choose>
-     <xsl:when test="string($siblength) = &quot;&quot;">
-      <xsl:value-of select="number($childlength)"/>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:value-of select="number($siblength)"/>
-     </xsl:otherwise>
-     </xsl:choose>>
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:value-of select="number($childlength)"/>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet> 
diff --git a/helm/style/style_prima_del_linguaggio_naturale/objcontent.xsl.csc b/helm/style/style_prima_del_linguaggio_naturale/objcontent.xsl.csc
deleted file mode 100644 (file)
index d2a846c..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-<?xml version="1.0"?>
-
-<!--******************************************************************--> 
-<!-- XSLT version 0.1 of CIC objects to objects and MathML content:   -->
-<!-- First draft: March 21 2000, Irene Schena                         -->
-<!--******************************************************************-->
-
-<!--******************************************************************-->
-<!-- MANCA: gestione annotation e linking                             -->
-<!--******************************************************************-->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                              xmlns:m="http://www.w3.org/1998/Math/MathML">
-
-<xsl:import href="content.xsl"/>
-
-<!-- ROOT -->
-
-<xsl:template match="cicxml">
-    <xsl:variable name="url"><xsl:value-of select="@baseurl"/></xsl:variable>
-    <xsl:variable name="stylesheet"><xsl:value-of select="@stylesheet"/></xsl:variable>
-    <xsl:processing-instruction name="cocoon-format">type="text/xml"</xsl:processing-instruction>
-    <xsl:processing-instruction name="xml-stylesheet">href="<xsl:value-of select='concat($url,$stylesheet)'/>" type="text/xsl"</xsl:processing-instruction>
-    <xsl:processing-instruction name="cocoon-process">type="xslt"</xsl:processing-instruction>
-    <xsl:apply-templates/>
-</xsl:template>
-
-<!-- CIC OBJECTS -->
-
-<xsl:template match="Definition" mode="noannot">
-    <Definition name="{@name}">  
-     <xsl:if test="string(@params) != &quot;&quot;">
-      <Params>
-       <xsl:value-of select="@params"/>
-      </Params>
-     </xsl:if>
-     <body>
-       <xsl:apply-templates select="body/*[1]">
-        <xsl:with-param name="backpointer" select="&quot;*[1]&quot;"/>
-       </xsl:apply-templates>
-     </body>
-     <type>
-       <xsl:apply-templates select="type/*[1]">
-        <xsl:with-param name="backpointer" select="&quot;*[2]&quot;"/>
-       </xsl:apply-templates>
-     </type>
-    </Definition> 
-</xsl:template>
-
-<xsl:template match="Axiom" mode="noannot"> 
-    <Axiom name="{@name}">
-     <xsl:if test="string(@params) != &quot;&quot;">
-      <Params>
-       <xsl:value-of select="@params"/>
-      </Params>
-     </xsl:if>
-     <type>
-       <xsl:apply-templates select="type"/>
-     </type>
-    </Axiom> 
-</xsl:template>
-
-<xsl:template match="CurrentProof" mode="noannot">
-    <CurrentProof name="{@name}">
-     <xsl:for-each select="Conjecture">
-      <Conjecture no="./{@no}">
-        <xsl:apply-templates select="."/>
-      </Conjecture>
-     </xsl:for-each>
-     <body>
-       <xsl:apply-templates select="body"/>
-     </body>
-     <type>
-       <xsl:apply-templates select="type"/>
-     </type>
-    </CurrentProof> 
-</xsl:template>
-
-<xsl:template match="InductiveDefinition" mode="noannot">
-    <InductiveDefinition>
-     <xsl:if test="string(@params) != &quot;&quot;">
-      <Params>
-       <xsl:value-of select="@params"/>
-      </Params>
-     </xsl:if> 
-     <xsl:if test="string(@noParams) != 0"> 
-      <xsl:apply-templates select="InductiveType/arity/*[1]" mode="abstparams">
-       <xsl:with-param name="noparams" select="@noParams"/>
-      </xsl:apply-templates>
-     </xsl:if>
-     <xsl:for-each select="InductiveType">
-      <InductiveType name="{./@name}" inductive="{./@inductive}">
-       <arity>
-         <xsl:apply-templates select="./arity/*[1]" mode="abstparams">
-          <xsl:with-param name="noparams" select="../@noParams"/>
-          <xsl:with-param name="target" select="1"/>
-         </xsl:apply-templates>
-       </arity>
-       <xsl:for-each select="./Constructor">
-        <Constructor name="{./@name}">
-          <xsl:apply-templates select="./*[1]" mode="abstparams">
-           <xsl:with-param name="noparams" select="../../@noParams"/>
-           <xsl:with-param name="target" select="1"/>
-          </xsl:apply-templates>
-        </Constructor>
-       </xsl:for-each>
-      </InductiveType>
-     </xsl:for-each> 
-    </InductiveDefinition>       
-</xsl:template>
-
-<xsl:template match="Variable" mode="noannot"> 
-    <Variable name="{@name}">
-     <type>
-       <xsl:apply-templates select="type"/>
-     </type>
-    </Variable> 
-</xsl:template>
-
-<!--*******************************************-->
-<!--    ABSTRACTING PARAMETERS AND COUNTING    -->
-<!--*******************************************-->
-<!-- Si dimentica i CAST dei termini che astrae. Nel caso dell'astrazione -->
-<!-- dei lambda dei pattern del CASE, qualora i lambda non si trovino     -->
-<!-- nella forma weak-head, astrae solo i lambda che trova e restituisce  -->
-<!-- un corpo depurato da tutti i primi cast che precedono il termine     -->
-<!-- restituito.                                                          -->
-
-<xsl:template match="*" mode="abstparams">
-<xsl:param name="noparams" select="0"/>
-<xsl:param name="target" select="0"/>
-<xsl:param name="binder">PROD</xsl:param>
-    <xsl:choose>
-    <xsl:when test="($noparams != 0) and ((name(.)=string($binder)) or (name(.)=&quot;CAST&quot;))">
-     <xsl:choose>
-     <xsl:when test="name(.) = string($binder)">
-      <xsl:if test="$target = 0">
-       <xsl:choose>
-       <xsl:when test="string($binder) = &quot;LAMBDA&quot;">
-        <m:ci>
-         <xsl:value-of select="target/@binder"/>
-        </m:ci>
-       </xsl:when>
-       <xsl:otherwise> 
-        <Param name="{target/@binder}">
-         <xsl:apply-templates select="source" mode="noannot"/>
-        </Param>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:if>
-      <xsl:apply-templates select="target/*[1]" mode="abstparams">
-       <xsl:with-param name="noparams" select="$noparams - 1"/>
-       <xsl:with-param name="target" select="$target"/>
-       <xsl:with-param name="binder" select="$binder"/>
-      </xsl:apply-templates>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:apply-templates select="term/*[1]" mode="abstparams">
-       <xsl:with-param name="noparams" select="$noparams"/>
-       <xsl:with-param name="target" select="$target"/>
-       <xsl:with-param name="binder" select="$binder"/>
-      </xsl:apply-templates>
-     </xsl:otherwise>
-     </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise> 
-     <xsl:choose>
-     <xsl:when test="($target = 1) and ($noparams != 0)">
-      <m:apply>
-      <m:csymbol>app</m:csymbol>
-      <xsl:apply-templates select="." mode="noannot"/>
-      <xsl:call-template name="printparam"><xsl:with-param name="noleft" select="$noparams"/></xsl:call-template>
-      </m:apply>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:choose>
-      <xsl:when test="$noparams != 0">
-      <xsl:call-template name="printparam"><xsl:with-param name="noleft" select="$noparams"/></xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-       <xsl:if test="$target = 1">
-        <xsl:apply-templates select="." mode="noannot"/>
-       </xsl:if>
-      </xsl:otherwise>
-      </xsl:choose>
-     </xsl:otherwise>
-     </xsl:choose>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<xsl:template name="printparam">
-<xsl:param name="noleft" select="0"/>
-<xsl:param name="number" select="1"/>
-    <xsl:if test="$noleft != 0">
-     <m:ci>$<xsl:value-of select="$number"/></m:ci>
-     <xsl:call-template name="printparam"><xsl:with-param name="noleft" select="$noleft - 1"/><xsl:with-param name="number" select="$number + 1"/></xsl:call-template>  
-    </xsl:if>
-</xsl:template>
-
-<xsl:template match="*" mode="counting">
-<xsl:param name="noparams" select="0"/>
-<xsl:param name="count" select="0"/>
- <xsl:choose>
- <xsl:when test="name(.) = &quot;PROD&quot;">
-  <xsl:apply-templates select="target/*[1]" mode="counting">
-   <xsl:with-param name="noparams" select="$noparams"/>
-   <xsl:with-param name="count" select="$count + 1"/>
-  </xsl:apply-templates>
- </xsl:when>
- <xsl:when test="name(.) = &quot;CAST&quot;">
-  <xsl:apply-templates select="term/*[1]" mode="counting">
-   <xsl:with-param name="noparams" select="$noparams"/>
-   <xsl:with-param name="count" select="$count"/> 
-  </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
-  <xsl:value-of select="$count - $noparams"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/helm/style/style_prima_del_linguaggio_naturale/objcontent_old.xsl b/helm/style/style_prima_del_linguaggio_naturale/objcontent_old.xsl
deleted file mode 100644 (file)
index d3514b4..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-<?xml version="1.0"?>
-
-<!--******************************************************************--> 
-<!-- XSLT version 0.1 of CIC objects to objects and MathML content:   -->
-<!-- First draft: March 21 2000, Irene Schena                         -->
-<!--******************************************************************-->
-
-<!--******************************************************************-->
-<!-- MANCA: gestione annotation e linking                             -->
-<!--******************************************************************-->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                              xmlns:m="http://www.w3.org/1998/Math/MathML"
-                              xmlns:helm="http://www.cs.unibo.it/helm">
-
-<xsl:import href="content.xsl"/>
-
-<!-- ROOT -->
-
-<xsl:template match="cicxml">
-    <xsl:variable name="url"><xsl:value-of select="@baseurl"/></xsl:variable>
-    <xsl:variable name="stylesheet"><xsl:value-of select="@stylesheet"/></xsl:variable>
-    <xsl:processing-instruction name="cocoon-format">type="text/xml"</xsl:processing-instruction>
-    <xsl:processing-instruction name="xml-stylesheet">href="<xsl:value-of select='concat($url,$stylesheet)'/>" type="text/xsl"</xsl:processing-instruction>
-    <xsl:processing-instruction name="cocoon-process">type="xslt"</xsl:processing-instruction>
-    <xsl:apply-templates select="*[1]"/>
-</xsl:template>
-
-<!-- CIC OBJECTS -->
-
-<xsl:template match="Definition" mode="noannot">
-    <Definition name="{@name}" helm:xref="{@id}">  
-     <xsl:if test="string(@params) != &quot;&quot;">
-      <Params>
-       <xsl:value-of select="@params"/>
-      </Params>
-     </xsl:if>
-     <body>
-      <xsl:apply-templates select="body"/>
-     </body>
-     <type>
-       <xsl:apply-templates select="type"/>
-     </type>
-    </Definition> 
-</xsl:template>
-
-<xsl:template match="Axiom" mode="noannot"> 
-    <Axiom name="{@name}" helm:xref="{@id}">
-     <xsl:if test="string(@params) != &quot;&quot;">
-      <Params>
-       <xsl:value-of select="@params"/>
-      </Params>
-     </xsl:if>
-     <type>
-       <xsl:apply-templates select="type"/>
-     </type>
-    </Axiom> 
-</xsl:template>
-
-<xsl:template match="CurrentProof" mode="noannot">
-    <CurrentProof name="{@name}" helm:xref="{@id}">
-     <xsl:for-each select="Conjecture">
-      <Conjecture no="./{@no}">
-        <xsl:apply-templates select="."/>
-      </Conjecture>
-     </xsl:for-each>
-     <body>
-       <xsl:apply-templates select="body"/>
-     </body>
-     <type>
-       <xsl:apply-templates select="type"/>
-     </type>
-    </CurrentProof> 
-</xsl:template>
-
-<xsl:template match="InductiveDefinition" mode="noannot">
-    <InductiveDefinition helm:xref="{@id}">
-     <xsl:if test="string(@params) != &quot;&quot;">
-      <Params>
-       <xsl:value-of select="@params"/>
-      </Params>
-     </xsl:if> 
-     <xsl:if test="string(@noParams) != 0"> 
-      <xsl:apply-templates select="InductiveType/arity/*[1]" mode="abstparams">
-       <xsl:with-param name="noparams" select="@noParams"/>
-      </xsl:apply-templates>
-     </xsl:if>
-     <xsl:for-each select="InductiveType">
-      <InductiveType name="{./@name}" inductive="{./@inductive}">
-       <arity>
-         <xsl:apply-templates select="./arity/*[1]" mode="abstparams">
-          <xsl:with-param name="noparams" select="../@noParams"/>
-          <xsl:with-param name="target" select="1"/>
-         </xsl:apply-templates>
-       </arity>
-       <xsl:for-each select="./Constructor">
-        <Constructor name="{./@name}">
-          <xsl:apply-templates select="./*[1]" mode="abstparams">
-           <xsl:with-param name="noparams" select="../../@noParams"/>
-           <xsl:with-param name="target" select="1"/>
-          </xsl:apply-templates>
-        </Constructor>
-       </xsl:for-each>
-      </InductiveType>
-     </xsl:for-each> 
-    </InductiveDefinition>       
-</xsl:template>
-
-<xsl:template match="Variable" mode="noannot"> 
-    <Variable name="{@name}" helm:xref="{@id}">
-     <type>
-       <xsl:apply-templates select="type"/>
-     </type>
-    </Variable> 
-</xsl:template>
-
-<!--*******************************************-->
-<!--    ABSTRACTING PARAMETERS AND COUNTING    -->
-<!--*******************************************-->
-<!-- Si dimentica i CAST dei termini che astrae. Nel caso dell'astrazione -->
-<!-- dei lambda dei pattern del CASE, qualora i lambda non si trovino     -->
-<!-- nella forma weak-head, astrae solo i lambda che trova e restituisce  -->
-<!-- un corpo depurato da tutti i primi cast che precedono il termine     -->
-<!-- restituito.                                                          -->
-
-<xsl:template match="*" mode="abstparams">
-<xsl:param name="noparams" select="0"/>
-<xsl:param name="target" select="0"/>
-<xsl:param name="binder">PROD</xsl:param>
-    <xsl:choose>
-    <xsl:when test="($noparams != 0) and ((name(.)=string($binder)) or (name(.)=&quot;CAST&quot;))">
-     <xsl:choose>
-     <xsl:when test="name(.) = string($binder)">
-      <xsl:if test="$target = 0">
-       <xsl:choose>
-       <xsl:when test="string($binder) = &quot;LAMBDA&quot;">
-        <m:ci>
-         <xsl:value-of select="target/@binder"/>
-        </m:ci>
-       </xsl:when>
-       <xsl:otherwise> 
-        <Param name="{target/@binder}">
-         <xsl:apply-templates select="source" mode="noannot"/>
-        </Param>
-       </xsl:otherwise>
-       </xsl:choose>
-      </xsl:if>
-      <xsl:apply-templates select="target/*[1]" mode="abstparams">
-       <xsl:with-param name="noparams" select="$noparams - 1"/>
-       <xsl:with-param name="target" select="$target"/>
-       <xsl:with-param name="binder" select="$binder"/>
-      </xsl:apply-templates>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:apply-templates select="term/*[1]" mode="abstparams">
-       <xsl:with-param name="noparams" select="$noparams"/>
-       <xsl:with-param name="target" select="$target"/>
-       <xsl:with-param name="binder" select="$binder"/>
-      </xsl:apply-templates>
-     </xsl:otherwise>
-     </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise> 
-     <xsl:choose>
-     <xsl:when test="($target = 1) and ($noparams != 0)">
-      <m:apply>
-      <m:csymbol>app</m:csymbol>
-      <xsl:apply-templates select="." mode="noannot"/>
-      <xsl:call-template name="printparam"><xsl:with-param name="noleft" select="$noparams"/></xsl:call-template>
-      </m:apply>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:choose>
-      <xsl:when test="$noparams != 0">
-      <xsl:call-template name="printparam"><xsl:with-param name="noleft" select="$noparams"/></xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-       <xsl:if test="$target = 1">
-        <xsl:apply-templates select="." mode="noannot"/>
-       </xsl:if>
-      </xsl:otherwise>
-      </xsl:choose>
-     </xsl:otherwise>
-     </xsl:choose>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<xsl:template name="printparam">
-<xsl:param name="noleft" select="0"/>
-<xsl:param name="number" select="1"/>
-    <xsl:if test="$noleft != 0">
-     <m:ci>$<xsl:value-of select="$number"/></m:ci>
-     <xsl:call-template name="printparam"><xsl:with-param name="noleft" select="$noleft - 1"/><xsl:with-param name="number" select="$number + 1"/></xsl:call-template>  
-    </xsl:if>
-</xsl:template>
-
-<xsl:template match="*" mode="counting">
-<xsl:param name="noparams" select="0"/>
-<xsl:param name="count" select="0"/>
- <xsl:choose>
- <xsl:when test="name(.) = &quot;PROD&quot;">
-  <xsl:apply-templates select="target/*[1]" mode="counting">
-   <xsl:with-param name="noparams" select="$noparams"/>
-   <xsl:with-param name="count" select="$count + 1"/>
-  </xsl:apply-templates>
- </xsl:when>
- <xsl:when test="name(.) = &quot;CAST&quot;">
-  <xsl:apply-templates select="term/*[1]" mode="counting">
-   <xsl:with-param name="noparams" select="$noparams"/>
-   <xsl:with-param name="count" select="$count"/> 
-  </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
-  <xsl:value-of select="$count - $noparams"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/helm/style/style_prima_del_linguaggio_naturale/rootcontent_withproofs.xsl b/helm/style/style_prima_del_linguaggio_naturale/rootcontent_withproofs.xsl
deleted file mode 100644 (file)
index 11d6684..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-
-<!--***********************************************************************--> 
-<!-- XSLT version 0.1 of the stylesheet to accomplish the right inclusion  -->
-<!-- of the content stylesheets:                                           -->
-<!-- First draft: May 26 2000, Claudio Sacerdoti Coen, Irene Schena        -->
-<!--***********************************************************************-->
-
-<!-- Schema of stylesheet precedences (from highest to lowest):          -->
-<!-- set -> basic -> annotatedcont                                       -->
-<!-- because theory_content is imported and has lower precendence than   -->
-<!-- the templates of rootcontent (i.e. the templates of set and basic). -->
-<!-- annotatedcont -> objcontent -> content                              -->
-<!-- because theory_content generates an import precedence tree.         --> 
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-
-<xsl:import href="annotatedcont.xsl"/>
-<xsl:key name="id" use="@id" match="LAMBDA|PROD|CAST|REL|SORT|APPLY|VAR|META|CONST|MUTIND|MUTCONSTRUCT|MUTCASE|FIX|COFIX|Definition|Axiom|CurrentProof|InductiveDefinition|Variable"/>
-<xsl:include href="basic.xsl"/>
-<xsl:include href="set.xsl"/>
-<xsl:include href="reals.xsl"/>
-
-<xsl:variable name="showproof" select="1"/>
-</xsl:stylesheet>
-
-
-
index 9a96cdc03cea183213b832bafe54da65d6e9d2ff..f8ade2a8222745dec2b1c099bc062b3ab9b905cb 100644 (file)
@@ -3,12 +3,13 @@
 <!--***********************************************************************--> 
 <!-- XSLT version 0.1 of theory sections to HTML:                          -->
 <!-- First draft: May 10 2000, Irene Schena                                -->
+<!--              November 15 2000, Irene Schena                           -->
 <!--***********************************************************************--> 
 
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                               xmlns:m="http://www.w3.org/1998/Math/MathML">
 
-<xsl:include href="annotatedpres.xsl"/>
+<xsl:import href="annotatedpres.xsl"/>
 
 <xsl:template match="SECTION">
 <xsl:param name="subsect" select="0"/>