]> matita.cs.unibo.it Git - helm.git/commitdiff
Several bug-fixes to the abstparam hell.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 4 Dec 2002 12:39:45 +0000 (12:39 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 4 Dec 2002 12:39:45 +0000 (12:39 +0000)
helm/style/params.xsl

index 355baef56191355c755db2e628dd4b24122e371c..1b5f4167064ad29292eba15569bda9ebbbfdd021 100644 (file)
          </xsl:if> 
        </xsl:for-each>
         <xsl:apply-templates select="target/*[1]" mode="abstparams">
-       <xsl:with-param name="noparams" select="$noparams - count(decl)"/>
-       <xsl:with-param name="target" select="$target"/>
-       <xsl:with-param name="binder" select="$binder"/>
+         <xsl:with-param name="noparams" select="$noparams - count(decl)"/>
+         <xsl:with-param name="target" select="$target"/>
+         <xsl:with-param name="binder" select="$binder"/>
         </xsl:apply-templates>
        </xsl:when>
        <xsl:otherwise>
-        <xsl:for-each select="decl[$noparams > position()]">
+        <xsl:for-each select="decl[$noparams >= position()]">
          <xsl:if test="$target = 0">
           <xsl:choose>
           <xsl:when test="string($binder) = &quot;LAMBDA&quot;">
           </xsl:choose>
          </xsl:if> 
        </xsl:for-each>
-        <xsl:choose>
-        <xsl:when test="name(.)=&quot;PROD&quot;">
-         <xsl:apply-templates select="decl[position()=$noparams]" mode="prod"/>
-        </xsl:when>
-        <xsl:otherwise>
-         <xsl:apply-templates select="decl[position()=$noparams]" mode="lambda"/>
-        </xsl:otherwise>
-       </xsl:choose>
+        <xsl:if test="$target = 1">
+         <xsl:choose>
+         <xsl:when test="name(.)=&quot;PROD&quot;">
+          <xsl:apply-templates select="decl[position()=$noparams+1]" mode="prod"/>
+         </xsl:when>
+         <xsl:otherwise>
+          <xsl:apply-templates select="decl[position()=$noparams+1]" mode="lambda_prop"/>
+         </xsl:otherwise>
+        </xsl:choose>
+        </xsl:if>
        </xsl:otherwise>
       </xsl:choose>
      </xsl:when>
 <xsl:param name="count" select="0"/>
  <xsl:choose>
  <xsl:when test="name(.) = &quot;PROD&quot;">
-  <xsl:value-of select="count(decl)- $noparams"/>
+  <xsl:apply-templates select="target/*[1]" mode="counting">
+   <xsl:with-param name="noparams" select="$noparams"/>
+   <xsl:with-param name="count" select="$count + count(decl)"/> 
+  </xsl:apply-templates>
  </xsl:when>
  <xsl:when test="name(.) = &quot;CAST&quot;">
   <xsl:apply-templates select="term/*[1]" mode="counting">