]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/proofs.xsl
* Title added
[helm.git] / helm / style / proofs.xsl
index 05cf06dd1f51d08d2d0747599be61968c1c4d3d8..9fd99d5d1f428bae49b03611cab694aee57154b9 100644 (file)
   <xsl:when test="name()='APPLY'">
    <xsl:variable name="id" select="@id"/>
    <xsl:choose>
-    <!-- NATIND 3 parametri -->
-    <xsl:when test="CONST[attribute::uri='cic:/Coq/Init/Datatypes/nat_ind.con']              and count(child::*) = 4">
-     <m:apply>
-      <m:csymbol>nat_ind</m:csymbol>
-      <xsl:apply-templates mode="noannot" select="*[3]"/>
-      <xsl:apply-templates mode="noannot" select="*[4]"/>
-     </m:apply>
-    </xsl:when>
-    <!-- NATIND 4 parametri (nuova versione) -->
-    <!-- 
-    <xsl:when test="CONST[
- attribute::uri='cic:/Coq/Init/Datatypes/nat_ind.con'] 
- and count(child::*) = 5
- and name(*[4])='LAMBDA' 
- and name(*[4]/target/*[1])='LAMBDA'"> 
-     <m:apply>
-      <m:csymbol>nat_ind_complete</m:csymbol>
-      <xsl:apply-templates mode="noannot" select="*[5]"/>
-      <xsl:apply-templates mode="noannot" select="*[3]"/>
-      <m:ci><xsl:value-of select="*[4]/target/@binder"/></m:ci>
-      <m:ci><xsl:value-of select="*[4]/target/*[1]/target/@binder"/></m:ci>
-      <xsl:apply-templates mode="noannot" select="*[4]/target/*[1]/source/*"/>
-      <xsl:apply-templates mode="noannot" select="*[4]/target/*[1]/target/*"/>
-     </m:apply>
-    </xsl:when> 
-    -->
     <!-- EQUALITY -->
     <xsl:when test="CONST[
  attribute::uri='cic:/Coq/Init/Logic/Equality/eq_ind.con' or
     <m:ci>.</m:ci>
    </xsl:otherwise>
    </xsl:choose>
- <xsl:apply-templates mode="previous" select="following-sibling::*[1]"/>
+ <xsl:apply-templates mode="erase" select="following-sibling::*[1]"/>
 </xsl:template>
 
 <xsl:template match="*" mode="previous">
  <xsl:choose>
-  <xsl:when test="$naturalLanguage='yes' and(@sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX'))">
+  <xsl:when test="$naturalLanguage='yes' and @sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')">
    <m:ci>previous</m:ci>
   </xsl:when>
   <xsl:otherwise>
+   <!-- forse bisognerebbe trattare solo l'elemento di testa -->
    <xsl:choose>
-   <xsl:when test="@sort='Prop' or $naturalLanguage='no' ">
+   <xsl:when test="@sort='Prop' or $naturalLanguage='no'">
     <xsl:apply-templates mode="pure" select="."/>
    </xsl:when>
    <xsl:otherwise>
  <xsl:param name="n" select="1"/>
  <xsl:variable name="id" select="@id"/>
  <xsl:choose>
-  <!-- <xsl:when test="key('typeid',@id)"> -->
-  <!-- <xsl:when test="$InnerTypes/InnerTypes/TYPE[@of=$id]"> -->
   <xsl:when test="$naturalLanguage='yes' and @sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')">
    <m:ci>
     <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="concat('h',$n)"/></xsl:with-param></xsl:call-template>
   </xsl:when>
   <xsl:otherwise>
    <xsl:choose>
-   <xsl:when test="@sort='Prop' or $naturalLanguage='no'">
-    <xsl:apply-templates mode="pure" select="."/>
-   </xsl:when>
-   <xsl:otherwise>
-    <m:ci>.</m:ci>
-   </xsl:otherwise>
+    <xsl:when test="name()='REL' or @sort='Prop' or $naturalLanguage='no'">
+     <xsl:apply-templates mode="pure" select="."/>
+    </xsl:when>
+    <xsl:otherwise>
+     <m:ci>.</m:ci>
+    </xsl:otherwise>
    </xsl:choose>
    <!-- <xsl:apply-templates mode="pure" select="."/> -->
    <xsl:apply-templates mode="flat" select="following-sibling::*[1]">
 </xsl:template>
 
 <!-- Auxiliary functions -->
+<!-- OMDOC: now we have name_of_uri generalized on the extension that -->
+<!-- can replace the next template                                    -->
 <xsl:template name="get_name">
  <xsl:param name="uri" select="''"/>
  <xsl:variable name="sub_after" select="substring-after($uri,'/')"/>
 
 
 </xsl:stylesheet>
-
-
-
-
-
-