]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/content.xsl
Performance improvements and bug fixed
[helm.git] / helm / style / content.xsl
index 948cbbaecc1989cdadcdf89c915160c72063d84c..d36e0152aef666a62880876ec6f8b02d043dbaa1 100644 (file)
@@ -63,7 +63,14 @@ Amaya o da chi di dovere in /really_very_local/helm/PARSER/example/.../]
       <xsl:apply-templates select="source/*[1]" mode="noannot"/>
      </xsl:when>
      <xsl:otherwise>
-      <m:csymbol>prod</m:csymbol>
+      <xsl:choose>
+       <xsl:when test="@type = 'Prop'">
+        <m:csymbol>forall</m:csymbol>
+       </xsl:when>
+       <xsl:otherwise>
+        <m:csymbol>prod</m:csymbol>
+       </xsl:otherwise>
+      </xsl:choose>
        <m:bvar>
         <m:ci>
          <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="target/@binder"/></xsl:with-param></xsl:call-template>
@@ -103,7 +110,8 @@ Amaya o da chi di dovere in /really_very_local/helm/PARSER/example/.../]
    <xsl:choose>
     <!-- <xsl:when test="//InnerTypes and boolean(key('typeid',*/@id))"> -->
     <!-- start looking for subproofs -->
-    <xsl:when test="((*/@id) = (//InnerTypes/TYPE/@of))"> 
+    <!-- <xsl:when test="((*/@id) = (//InnerTypes/TYPE/@of))"> -->
+    <xsl:when test="//InnerTypes and count(*[@sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')]) > 0">
      <m:apply helm:xref="{@id}">
       <m:csymbol>letin</m:csymbol>
       <!-- <xsl:for-each select="*[boolean(key('typeid',@id))]"> -->
@@ -135,26 +143,17 @@ Amaya o da chi di dovere in /really_very_local/helm/PARSER/example/.../]
 
 <xsl:template match="*" mode="flat">
  <xsl:param name="n" select="1"/>
+ <xsl:variable name="id" select="@id"/>
  <xsl:choose>
-  <xsl:when test="@id">
-   <xsl:variable name="id" select="@id"/>
-   <xsl:choose>
-    <!-- <xsl:when test="key('typeid',@id)"> -->
-    <xsl:when test="//InnerTypes/TYPE[@of=$id]">
-     <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>
-     </m:ci>
-     <xsl:apply-templates mode="flat" select="following-sibling::*[1]">
-      <xsl:with-param name="n" select="$n+1"/>
-     </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:apply-templates mode="pure" select="."/>
-     <xsl:apply-templates mode="flat" select="following-sibling::*[1]">
-      <xsl:with-param name="n" select="$n"/>
-     </xsl:apply-templates>
-    </xsl:otherwise>
-   </xsl:choose>
+  <!-- <xsl:when test="key('typeid',@id)"> -->
+  <!-- <xsl:when test="//InnerTypes/TYPE[@of=$id]"> -->
+  <xsl:when test="//InnerTypes 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>
+   </m:ci>
+   <xsl:apply-templates mode="flat" select="following-sibling::*[1]">
+    <xsl:with-param name="n" select="$n+1"/>
+   </xsl:apply-templates>
   </xsl:when>
   <xsl:otherwise>
    <xsl:apply-templates mode="pure" select="."/>