]> matita.cs.unibo.it Git - helm.git/commitdiff
Explicit substitutions for metavariables introduced and DTD changed.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 20 May 2002 09:18:52 +0000 (09:18 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 20 May 2002 09:18:52 +0000 (09:18 +0000)
helm/style/content.xsl
helm/style/content_to_html.xsl
helm/style/mmlextension.xsl
helm/style/objcontent.xsl
helm/style/rootcontent.xsl

index ef9c297a66366db83f93bb14957f0e266b39bed7..af5e185af89edcc815f2cc2fb7f9427b74512010 100644 (file)
@@ -168,9 +168,27 @@ Amaya o da chi di dovere in /really_very_local/helm/PARSER/example/.../]
 </xsl:template>
 
 <xsl:template match="META" mode="pure">
-    <m:ci helm:xref="{@id}">
-     <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value">?<xsl:value-of select="@no"/></xsl:with-param></xsl:call-template>
+   <m:apply helm:xref="{@id}">
+    <m:csymbol>meta</m:csymbol>
+    <m:ci>
+     <xsl:call-template name="insert_subscript">
+      <xsl:with-param name="node_value">
+       <xsl:text>?</xsl:text>
+       <xsl:value-of select="@no"/>
+      </xsl:with-param>
+     </xsl:call-template>
     </m:ci>
+    <xsl:for-each select="substitution">
+     <xsl:choose>
+      <xsl:when test="*[1]">
+       <xsl:apply-templates select="*[1]" mode="noannot"/>
+      </xsl:when>
+      <xsl:otherwise>
+       <m:ci>_</m:ci>
+      </xsl:otherwise>
+     </xsl:choose>
+    </xsl:for-each>
+   </m:apply>
 </xsl:template>
 
 <xsl:template match="CONST" mode="pure">
index 5ffa0742ab22e605089eb9ccddfc98b84e10c463..2570adc7381dca131c45e76f09f70fcfe2ed808c 100644 (file)
@@ -2120,8 +2120,45 @@ CONJECTURES:
       <xsl:call-template name="make_indent">
        <xsl:with-param name="current_indent" select="$current_indent + 8"/> 
       </xsl:call-template>
-      <xsl:value-of select="./@no"/> : 
-      <xsl:apply-templates select="./*[1]">
+      <xsl:for-each select="Decl|Def|Hidden">
+       <xsl:choose>
+        <xsl:when test="name(.)='Decl'">
+         <xsl:choose>
+          <xsl:when test="@name">
+           <xsl:value-of select="@name"/>
+          </xsl:when>
+          <xsl:otherwise>
+           <xsl:text>_</xsl:text>
+          </xsl:otherwise>
+         </xsl:choose>
+         <xsl:text> : </xsl:text>
+         <xsl:apply-templates select="./*[1]">
+          <xsl:with-param name="current_indent" select="$current_indent"/>
+         </xsl:apply-templates>
+        </xsl:when>
+       </xsl:choose>
+       <xsl:choose>
+        <xsl:when test="name(.)='Def'">
+         <xsl:choose>
+          <xsl:when test="@name">
+           <xsl:value-of select="@name"/>
+          </xsl:when>
+          <xsl:otherwise>
+           <xsl:text>_</xsl:text>
+          </xsl:otherwise>
+         </xsl:choose>
+         <xsl:text> := </xsl:text>
+         <xsl:apply-templates select="./*[1]">
+          <xsl:with-param name="current_indent" select="$current_indent"/>
+         </xsl:apply-templates>
+        </xsl:when>
+       </xsl:choose>
+       <xsl:otherwise>
+        <xsl:text> _ :? _ </xsl:text>
+       </xsl:otherwise>
+      </xsl:for-each>
+      |- <xsl:value-of select="./@no"/> : 
+      <xsl:apply-templates select="./Goal/*[1]">
        <xsl:with-param name="current_indent" select="$current_indent + 11"/>
       </xsl:apply-templates>
       </xsl:for-each> 
index 6e766e3528c6ecf705b849896e854901a839d1c4..7aeec143f15f8a2cf3b11cbb934ae7aa900fee91 100644 (file)
@@ -183,9 +183,52 @@ which generates the toplevel element (see for instance xlink) -->
        <m:mtd>
         <m:mrow>
          <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
+         <xsl:for-each select="Decl|Def|Hidden">
+          <xsl:choose>
+           <xsl:when test="name(.)='Decl'">
+            <m:mrow>
+             <xsl:choose>
+              <xsl:when test="@name">
+               <m:mi><xsl:value-of select="@name"/></m:mi>
+              </xsl:when>
+              <xsl:otherwise>
+               <m:mi>_</m:mi>
+              </xsl:otherwise>
+             </xsl:choose>
+             <m:mo>:</m:mo>
+             <xsl:apply-templates select="./*[1]"/>
+            </m:mrow>
+           </xsl:when>
+           <xsl:when test="name(.)='Def'">
+            <m:mrow>
+             <xsl:choose>
+              <xsl:when test="@name">
+               <m:mi><xsl:value-of select="@name"/></m:mi>
+              </xsl:when>
+              <xsl:otherwise>
+               <m:mi>_</m:mi>
+              </xsl:otherwise>
+             </xsl:choose>
+             <m:mo>:=</m:mo>
+             <xsl:apply-templates select="./*[1]"/>
+            </m:mrow>
+           </xsl:when>
+           <xsl:otherwise>
+            <m:mrow>
+             <m:mi>_</m:mi>
+             <m:mo>:?</m:mo>
+             <m:mi>_</m:mi>
+            </m:mrow>
+           </xsl:otherwise>
+          </xsl:choose>
+          <xsl:if test="not (position() = last())">
+           <m:mo>;</m:mo>
+          </xsl:if>
+         </xsl:for-each>
+         <m:mo>|-</m:mo>
          <m:msub><m:mi>?</m:mi><m:mn><xsl:value-of select="@no"/></m:mn></m:msub>
-         <m:mtext>:</m:mtext>
-         <xsl:apply-templates select="./*[1]"/>
+         <m:mo>:</m:mo>
+         <xsl:apply-templates select="./Goal/*[1]"/>
         </m:mrow>
        </m:mtd>
       </m:mtr>
@@ -372,7 +415,11 @@ which generates the toplevel element (see for instance xlink) -->
   </xsl:for-each>
   <xsl:text>solid</xsl:text>
  </xsl:variable>
+ <xsl:variable name="no" select="@no"/>
     <m:math>
+     <m:mi><xsl:text>?</xsl:text><xsl:value-of select="$no"/></m:mi>
+     <m:mo>:</m:mo>
+     <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
      <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}" rowlines="{$rowlines}">
       <xsl:for-each select="Decl|Def">
        <m:mtr>
@@ -470,6 +517,15 @@ which generates the toplevel element (see for instance xlink) -->
      </xsl:if>
      <xsl:variable name="id" select="m:csymbol/@id"/>
      <xsl:choose>
+      <!-- META -->
+      <xsl:when test="$name='meta'">
+       <m:mrow>
+        <xsl:apply-templates select="*[position()=2]"/>
+        <m:mfenced open="[" close="]" separators=";">
+         <xsl:apply-templates select="*[position()>2]"/>
+        </m:mfenced>
+       </m:mrow>
+      </xsl:when>
       <!-- FORALL -->
       <xsl:when test="$name='forall'">
        <xsl:choose>
index 898e41a985e448066d0c053df8656068ac47799f..5b375084b970625caa0438663a7dc1040d1982ba 100644 (file)
@@ -55,8 +55,8 @@
 <!-- CIC OBJECTS -->
 
 <xsl:template match="Sequent">  <!-- For Sequents there are no annotations --> 
-    <Sequent helm:xref="{@id}">
-     <xsl:for-each select="Decl|Def">
+    <Sequent helm:xref="{@id}" no="{@no}">
+     <xsl:for-each select="Decl|Def|Hidden">
       <xsl:copy>
        <xsl:attribute name="name">
         <xsl:value-of select="@name"/>
     <CurrentProof name="{@name}" helm:xref="{@id}">
      <xsl:for-each select="Conjecture">
       <Conjecture no="{@no}">
-        <xsl:apply-templates select="."/>
+        <xsl:for-each select="*">
+         <xsl:copy>
+          <xsl:copy-of select="@*"/>
+          <xsl:apply-templates select="*"/>
+         </xsl:copy>
+        </xsl:for-each>
       </Conjecture>
      </xsl:for-each>
      <body>
index 64acead3600beb66bb1bebb8432deeafc28d96bd..a2f82f59bcc5175a538bd2812a156507f2900194 100644 (file)
 <xsl:variable name="InnerTypesUri"><xsl:value-of select="concat($CICURI,'.types')"/></xsl:variable>
 <xsl:variable name="AnnotationsUri"><xsl:value-of select="concat($CICURI,'.ann')"/></xsl:variable>
 
+<!--CSC: Questa e' la versione originale che applica dc a quello che il getter
+ restituisce.
 <xsl:variable name="InnerTypesUrl"><xsl:call-template name="makeURL4InnerTypes"><xsl:with-param name="uri" select="$InnerTypesUri"/></xsl:call-template></xsl:variable>
+-->
+<!--CSC: Qui, invece, accediamo direttamente al disco e non applichiamo dc -->
+<xsl:variable name="InnerTypesUrl" select="'file:///public/sacerdot/innertypes'"/>
 <xsl:variable name="AnnotationsUrl"><xsl:call-template name="URLofURI4getter"><xsl:with-param name="uri" select="$AnnotationsUri"/></xsl:call-template></xsl:variable>
 
 <!-- WARNING: Using lazy evaluation: $CICURI.* may not exist, but -->