]> matita.cs.unibo.it Git - helm.git/commitdiff
The .types files are now read directly by the stylesheets.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 6 Mar 2001 16:00:32 +0000 (16:00 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 6 Mar 2001 16:00:32 +0000 (16:00 +0000)
Two new params added: naturalLanguage and CICURI

helm/style/proofs.xsl
helm/style/rootcontent.xsl

index 99be5c79de41521c5a124a25c7b4438da247a574..96d1ee7de532142ee3ce9ac18f7e4c6644950351 100644 (file)
 <xsl:template match="LAMBDA" mode="noannot">
  <xsl:variable name="id" select="@id"/>
  <xsl:choose>
-  <xsl:when test="//InnerTypes and @sort='Prop' and name(../..) != 'LAMBDA'">
+  <xsl:when test="$naturalLanguage='yes' and @sort='Prop' and name(../..) != 'LAMBDA'">
    <m:apply helm:xref="{@id}">
     <m:csymbol>proof</m:csymbol>
     <xsl:apply-templates mode="proof_transform" select="."/>
-    <xsl:apply-templates mode="pure" select="//InnerTypes/TYPE[@of=$id]/*"/>
+    <xsl:apply-templates mode="pure" select="$InnerTypes/InnerTypes/TYPE[@of=$id]/*"/>
    </m:apply>
   </xsl:when>
   <xsl:otherwise>
 <xsl:template match="CAST|APPLY|MUTCASE|FIX|COFIX" mode="noannot">
  <xsl:variable name="id" select="@id"/>
  <xsl:choose>
-  <xsl:when test="//InnerTypes and @sort='Prop'">
+  <xsl:when test="$naturalLanguage='yes' and @sort='Prop'">
    <m:apply helm:xref="{@id}">
     <m:csymbol>proof</m:csymbol>
     <xsl:apply-templates mode="proof_transform" select="."/>
-    <xsl:apply-templates mode="pure" select="//InnerTypes/TYPE[@of=$id]/*"/>
+    <xsl:apply-templates mode="pure" select="$InnerTypes/InnerTypes/TYPE[@of=$id]/*"/>
    </m:apply>
   </xsl:when>
   <xsl:otherwise>
      <m:apply helm:xref="{@id}">
       <m:csymbol>or_ind</m:csymbol>
       <xsl:apply-templates mode="noannot" select="*[7]"/>
-      <xsl:apply-templates mode="pure" select="//InnerTypes/TYPE[@of=$id]/*"/>
+      <xsl:apply-templates mode="pure" select="$InnerTypes/InnerTypes/TYPE[@of=$id]/*"/>
       <xsl:apply-templates mode="pure" select="*[5]"/>
       <xsl:apply-templates mode="pure" select="*[6]"/>
      </m:apply>
    <xsl:variable name="no_subproofs" select="count(*[@sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')])"/>
    <!-- <m:cn><xsl:value-of select="$no_subproofs"/></m:cn> -->
    <xsl:choose>
-    <xsl:when test="//InnerTypes and ($no_subproofs = 1)">
+    <xsl:when test="$naturalLanguage='yes' and ($no_subproofs = 1)">
      <m:apply helm:xref="{@id}">
       <m:csymbol>letin1</m:csymbol>
       <xsl:apply-templates mode="noannot" select="*[@sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')]"/>
       </m:apply>
      </m:apply>
     </xsl:when>
-    <xsl:when test="//InnerTypes and ($no_subproofs > 1)">
+    <xsl:when test="$naturalLanguage='yes' and ($no_subproofs > 1)">
      <m:apply helm:xref="{@id}">
       <m:csymbol>letin</m:csymbol>
       <!-- first process all subproofs (let-in) -->
 
 <xsl:template match="*" mode="previous">
  <xsl:choose>
-  <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'))">
+  <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>
  <xsl:variable name="id" select="@id"/>
  <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')">
+  <!-- <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>
    </m:ci>
index 4f8a4f4b7072f700939703c1eadca20b3bef6826..e4bccecea65b0ee6b31b92c1f1ca1055dbef765a 100644 (file)
 <!--******************************************************************-->
 
 <xsl:param name="getterURL" select="'http://localhost:8081/'"/>
+<xsl:param name="naturalLanguage" select="'yes'"/>
+<xsl:param name="CICURI" select="''"/>
 
 <xsl:variable name="absPath"><xsl:value-of select="$getterURL"/>getciconly?uri=</xsl:variable>
 
+<!-- WARNING: Using lazy evaluation: $CICURI.types may not exist, but -->
+<!-- document() is called only by need!!!                             -->
+<xsl:variable name="InnerTypes" select="document(concat($absPath,$CICURI,'.types'))"/>
+
 <xsl:import href="annotatedcont.xsl"/>
 <xsl:key name="id" use="@id" match="LAMBDA|LETIN|PROD|CAST|REL|SORT|APPLY|VAR|META|CONST|MUTIND|MUTCONSTRUCT|MUTCASE|FIX|COFIX|Definition|Axiom|CurrentProof|InductiveDefinition|Variable"/>
 <xsl:include href="basic.xsl"/>