]> matita.cs.unibo.it Git - helm.git/commitdiff
Now value returned by get_no_params function is a number (not a string)
authorPietro Di Lena <pietro.dilena@unibo.it>
Mon, 25 Nov 2002 17:54:20 +0000 (17:54 +0000)
committerPietro Di Lena <pietro.dilena@unibo.it>
Mon, 25 Nov 2002 17:54:20 +0000 (17:54 +0000)
helm/style/params.xsl

index b5b7f9b88ee7357497be3ec9d189cc76bf11245e..d703bfe069c13a396e093acbbb106247a3179348 100644 (file)
       </xsl:call-template>
      </xsl:variable>
      <xsl:choose>
-      <xsl:when test="$offset > 0">
-       <xsl:variable name="params"> 
-        <xsl:variable name="second_url"><xsl:call-template name="URLofURI4getter"><xsl:with-param name="uri" select="$second_uri"/></xsl:call-template></xsl:variable>
-        <xsl:value-of 
-            select="document($second_url)/*/@params"/>
+         <xsl:when test="$offset > 0">
+          <xsl:variable name="params"> 
+        <xsl:variable name="second_url">
+                       <xsl:call-template name="URLofURI4getter">
+                               <xsl:with-param name="uri" select="$second_uri"/>
+                       </xsl:call-template>
+               </xsl:variable>
+        <xsl:value-of select="document($second_url)/*/@params"/>
        </xsl:variable>
        <xsl:variable name="minimum">
         <xsl:call-template name="min">
         </xsl:call-template>
        </xsl:variable>
        <xsl:choose>
-        <xsl:when test="0 > $minimum">
-         0
-        </xsl:when>
+        <xsl:when test="0 > $minimum">0</xsl:when>
         <xsl:otherwise>
          <xsl:variable name="relevant_params">
           <!-- the blank after : in the next line is essential -->
            <xsl:with-param name="counter" select="0"/>
           </xsl:call-template>
          </xsl:variable>
-         <xsl:value-of select="$tokens - $separators"/>
+         <xsl:value-of select="number($tokens - $separators)"/>
         </xsl:otherwise>
        </xsl:choose>
       </xsl:when>
-      <xsl:otherwise>
-      0
-      </xsl:otherwise>
+      <xsl:otherwise>0</xsl:otherwise>
      </xsl:choose>
 </xsl:template>