]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/params.xsl
Initial revision
[helm.git] / helm / style / params.xsl
index 6e7f98545509620df3e99d1b9a4dfc7f9ceb5fca..d703bfe069c13a396e093acbbb106247a3179348 100644 (file)
       </xsl:call-template>
      </xsl:variable>
      <xsl:choose>
-      <xsl:when test="$offset > 0">
-       <xsl:variable name="params"> 
-        <xsl:value-of 
-            select="document(concat(string($absPath),$second_uri))/*/@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>