]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/basic.xsl
This commit was manufactured by cvs2svn to create branch
[helm.git] / helm / style / basic.xsl
diff --git a/helm/style/basic.xsl b/helm/style/basic.xsl
deleted file mode 100644 (file)
index a9d82dd..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- Copyright (C) 2000, HELM Team                                     -->
-<!--                                                                   -->
-<!-- This file is part of HELM, an Hypertextual, Electronic            -->
-<!-- Library of Mathematics, developed at the Computer Science         -->
-<!-- Department, University of Bologna, Italy.                         -->
-<!--                                                                   -->
-<!-- HELM is free software; you can redistribute it and/or             -->
-<!-- modify it under the terms of the GNU General Public License       -->
-<!-- as published by the Free Software Foundation; either version 2    -->
-<!-- of the License, or (at your option) any later version.            -->
-<!--                                                                   -->
-<!-- HELM is distributed in the hope that it will be useful,           -->
-<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of    -->
-<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     -->
-<!-- GNU General Public License for more details.                      -->
-<!--                                                                   -->
-<!-- You should have received a copy of the GNU General Public License -->
-<!-- along with HELM; if not, write to the Free Software               -->
-<!-- Foundation, Inc., 59 Temple Place - Suite 330, Boston,            -->
-<!-- MA  02111-1307, USA.                                              -->
-<!--                                                                   -->
-<!-- For details, see the HELM World-Wide-Web page,                    -->
-<!-- http://cs.unibo.it/helm/.                                         -->
-
-<!--******************************************************************--> 
-<!-- Basic Logic                                                      -->
-<!-- First draft: April 3 2000                                        -->
-<!-- HELM Group: Asperti, Padovani, Sacerdoti, Schena, Guidi          -->
-<!--******************************************************************-->
-
-<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">
-
-
-<!-- ************************* LOGIC *********************************-->
-
-<!-- AND -->
-
-<xsl:template match="APPLY[MUTIND[attribute::uri='cic:/Coq/Init/Logic/Conjunction/and.ind'] and (count(child::*) = 3)]" mode="pure">
-    <m:apply helm:xref="{@id}">
-    <m:and definitionURL="{MUTIND/@uri}" helm:xref="{MUTIND/@id}"/>
-     <xsl:apply-templates select="*[2]" mode="noannot"/>
-     <xsl:apply-templates select="*[3]" mode="noannot"/>
-    </m:apply>
-</xsl:template>
-
-<!-- OR -->
-
-<xsl:template match="APPLY[MUTIND[attribute::uri='cic:/Coq/Init/Logic/Disjunction/or.ind'] and (count(child::*) = 3)]" mode="pure">
-    <m:apply helm:xref="{@id}">
-    <m:or definitionURL="{MUTIND/@uri}" helm:xref="{MUTIND/@id}"/>
-     <xsl:apply-templates select="*[2]" mode="noannot"/>
-     <xsl:apply-templates select="*[3]" mode="noannot"/>
-    </m:apply>
-</xsl:template>
-
-<!-- NOT -->
-
-<xsl:template match="APPLY[CONST[attribute::uri='cic:/Coq/Init/Logic/not.con'] and (count(child::*) = 2)]" mode="pure">
-    <m:apply helm:xref="{@id}">
-    <m:not definitionURL="{CONST/@uri}" helm:xref="{MUTIND/@id}"/>
-     <xsl:apply-templates select="*[2]" mode="noannot"/>
-    </m:apply>
-</xsl:template>
-
-<!-- IFF -->
-<!-- 
-<xsl:template match="APPLY[CONST[attribute::uri='cic:/Coq/Init/Logic/Equivalence/iff.ind'] and (count(child::*) = 3)]" mode="pure">
-    <m:apply helm:xref="{@id}">
-    <m:iff definitionURL="{CONST/@uri}" helm:xref="{CONST/@id}"/>
-     <xsl:apply-templates select="*[2]" mode="noannot"/>
-     <xsl:apply-templates select="*[3]" mode="noannot"/>
-    </m:apply>
-</xsl:template>
--->
-
-<!-- EXISTS -->
-
-<xsl:template match="APPLY[MUTIND[attribute::uri='cic:/Coq/Init/Logic/First_order_quantifiers/ex.ind' or attribute::uri='cic:/Coq/Init/Logic_Type/exT.ind'] and (count(child::*) = 3)]" mode="pure">
-    <m:apply helm:xref="{@id}">
-     <m:exists definitionURL="{MUTIND/@uri}" helm:xref="{MUTIND/@id}"/>
-     <xsl:choose>
-      <xsl:when test="name(*[3]) = 'LAMBDA'">
-       <m:bvar>
-        <m:ci><xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="*[3]/target/@binder"/></xsl:with-param></xsl:call-template></m:ci>
-       </m:bvar>
-       <m:condition>
-        <xsl:apply-templates select="*[2]" mode="pure"/>
-       </m:condition>
-       <xsl:apply-templates select="LAMBDA/target" mode="noannot"/>
-      </xsl:when>
-      <xsl:otherwise>
-       <m:bvar>
-        <m:ci>$x</m:ci>
-       </m:bvar>
-       <m:condition>
-        <xsl:apply-templates select="*[2]" mode="pure"/>
-       </m:condition>
-       <m:apply>
-        <m:csymbol>app</m:csymbol>
-        <xsl:apply-templates select="*[3]" mode="noannot"/>
-        <m:ci>$x</m:ci>
-       </m:apply>
-      </xsl:otherwise>
-     </xsl:choose>
-    </m:apply>
-</xsl:template>
-
-<xsl:template match="APPLY[MUTIND[attribute::uri='cic:/Coq/Init/Logic/First_order_quantifiers/ex2.ind' or attribute::uri='cic:/Coq/Init/Logic_Type/exT2.ind'] and (count(child::*) = 4)]" mode="pure">
-    <m:apply helm:xref="{@id}">
-    <m:exists definitionURL="{MUTIND/@uri}" helm:xref="{MUTIND/@id}"/>
-     <xsl:choose>
-      <xsl:when test="name(*[3]) = 'LAMBDA'">
-       <xsl:variable name="bvarname" select="*[3]/target/@binder"/>
-       <m:bvar>
-        <m:ci><xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="$bvarname"/></xsl:with-param></xsl:call-template></m:ci>
-       </m:bvar>
-       <m:condition>
-        <xsl:apply-templates select="LAMBDA[1]/target" mode="noannot"/>
-       </m:condition>
-       <xsl:choose>
-        <xsl:when test="(name(*[4]) = 'LAMBDA') and 
-           ($bvarname = *[4]/target/@binder)">
-         <xsl:apply-templates select="LAMBDA[2]/target" mode="noannot"/>
-        </xsl:when>
-        <xsl:otherwise>
-         <m:apply>
-          <m:csymbol>app</m:csymbol>
-          <xsl:apply-templates select="*[4]" mode="noannot"/>
-          <m:ci><xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="$bvarname"/></xsl:with-param></xsl:call-template></m:ci>
-         </m:apply>
-        </xsl:otherwise>
-       </xsl:choose>
-      </xsl:when>
-      <xsl:otherwise>
-       <xsl:choose>
-        <xsl:when test="name(*[4]) = 'LAMBDA'">
-         <xsl:variable name="bvarname" select="*[4]/target/@binder"/>
-         <m:bvar>
-          <m:ci><xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="$bvarname"/></xsl:with-param></xsl:call-template></m:ci>
-         </m:bvar>
-         <m:condition>
-          <m:apply>
-           <m:csymbol>app</m:csymbol>
-           <xsl:apply-templates select="*[3]" mode="noannot"/>
-           <m:ci><xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="$bvarname"/></xsl:with-param></xsl:call-template></m:ci>
-          </m:apply>
-         </m:condition>
-         <xsl:apply-templates select="*[4]/target" mode="noannot"/>
-        </xsl:when>
-        <xsl:otherwise>
-         <m:bvar>
-          <m:ci>x</m:ci>
-         </m:bvar>
-         <m:condition>
-          <m:apply>
-           <m:csymbol>app</m:csymbol>
-           <xsl:apply-templates select="*[3]" mode="noannot"/>
-           <m:ci>x</m:ci>
-          </m:apply>
-         </m:condition>
-         <m:apply>
-          <m:csymbol>app</m:csymbol>
-          <xsl:apply-templates select="*[4]" mode="noannot"/>
-          <m:ci>x</m:ci>
-         </m:apply>
-        </xsl:otherwise>
-       </xsl:choose>
-      </xsl:otherwise>
-     </xsl:choose>
-    </m:apply>
-</xsl:template>
-
-<!-- EQUALITY and TYPE EQUALITY -->
-
-<xsl:template match="APPLY[MUTIND/@uri='cic:/Coq/Init/Logic/Equality/eq.ind']" mode="pure">
-   <xsl:call-template name="mk-mml-op-noannot">
-      <xsl:with-param name="hide" select="1"/>
-      <xsl:with-param name="c-tag" select="MUTIND"/>
-      <xsl:with-param name="m-tag" select="'eq'"/>
-   </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="APPLY[MUTIND/@uri='cic:/Coq/Init/Logic_Type/eqT.ind']" mode="pure">
-   <xsl:call-template name="mk-mml-op-noannot">
-      <xsl:with-param name="hide" select="1"/>
-      <xsl:with-param name="c-tag" select="MUTIND"/>
-      <xsl:with-param name="m-tag" select="'eq'"/>
-   </xsl:call-template>
-</xsl:template>
-
-<!-- NOT-EQ -->
-<!-- NOT and EQ have no parameters -->
-<xsl:template match="APPLY[CONST[attribute::uri='cic:/Coq/Init/Logic/not.con']
-and (count(child::*) = 2) and APPLY[MUTIND[attribute::uri='cic:/Coq/Init/Logic/Equality/eq.ind']]]" mode="pure">
-    <xsl:choose>
-     <xsl:when test="count(APPLY/child::*) = 4">
-      <m:apply helm:xref="{@id}">
-       <m:neq/>
-       <xsl:apply-templates select="*[2]/*[3]" mode="noannot"/>
-       <xsl:apply-templates select="*[2]/*[4]" mode="set"/>  
-      </m:apply>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:apply-imports/>
-     </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<!-- NOT-EQT -->
-<xsl:template match="APPLY[CONST[attribute::uri='cic:/Coq/Init/Logic/not.con']
-and (count(child::*) = 2) and APPLY[MUTIND[attribute::uri='cic:/Coq/Init/Logic_Type/eqT.ind']]]" mode="pure">
-    <xsl:choose>
-     <xsl:when test="count(APPLY/child::*) = 4">
-      <m:apply helm:xref="{@id}">
-       <m:neq/>
-       <xsl:apply-templates select="*[2]/*[3]" mode="noannot"/>
-       <xsl:apply-templates select="*[2]/*[4]" mode="set"/>  
-      </m:apply>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:apply-imports/>
-     </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<!-- ************************ DATATYPES ******************************* -->
-
-<!-- no datatypes in MathML content -->
-
-<!-- ************************** PEANO ********************************* -->
-
-<!-- see arith.xsl --> <!-- FG -->
-
-</xsl:stylesheet>