]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/style_prima_del_linguaggio_naturale/content.xsl.csc
Modified Files:
[helm.git] / helm / style / style_prima_del_linguaggio_naturale / content.xsl.csc
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>