[gimp-help-2/roman_links_to_translations_168256: 2/4] More meaningful variable name



commit 08fdfbcd20442a3ddf0734400496b01f60a1013c
Author: Roman Joost <roman bromeco de>
Date:   Thu Sep 20 15:13:19 2012 +1000

    More meaningful variable name

 stylesheets/plainhtml.xsl.in |    4 ++--
 stylesheets/tokenize.xsl     |   10 +++++++---
 2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/stylesheets/plainhtml.xsl.in b/stylesheets/plainhtml.xsl.in
index 246b437..de77e9d 100644
--- a/stylesheets/plainhtml.xsl.in
+++ b/stylesheets/plainhtml.xsl.in
@@ -177,12 +177,12 @@
           <hr/>
         </xsl:if>
         <div id="show_other_language">
-            <xsl:variable name="uri">
+            <xsl:variable name="filename">
                 <xsl:call-template name="href.target" />
             </xsl:variable>
             <xsl:call-template name="tokenize">
                 <xsl:with-param name="linguas" select="$all_linguas" />
-                <xsl:with-param name="uri" select="$uri" />
+                <xsl:with-param name="filename" select="$filename" />
             </xsl:call-template>
         </div>
       </div>
diff --git a/stylesheets/tokenize.xsl b/stylesheets/tokenize.xsl
index f84c5f6..4f243f4 100644
--- a/stylesheets/tokenize.xsl
+++ b/stylesheets/tokenize.xsl
@@ -9,28 +9,32 @@
 
   <xsl:template name="tokenize">
     <xsl:param name="linguas" />
-    <xsl:param name="uri" />
+    <xsl:param name="filename" />
     <xsl:param name="tail">
       <xsl:value-of select="substring-after($linguas, $splitstr)" />
     </xsl:param>
     <xsl:param name="lang">
       <xsl:value-of select="substring-before($linguas, $splitstr)" />
     </xsl:param>
+    <xsl:param name="uri">
+      <xsl:value-of select="concat('../', $lang, '/', $filename)" />
+    </xsl:param>
 
     <xsl:choose>
       <xsl:when test="contains($tail, $splitstr)">
         <xsl:call-template name="create_link">
-            <xsl:with-param name="href" select="concat('..', $lang, '/', $uri)" />
+          <xsl:with-param name="href" select="$uri" />
           <xsl:with-param name="title" select="$vocab/vocab/item[ value=$lang]" />
         </xsl:call-template>
 
         <xsl:call-template name="tokenize">
           <xsl:with-param name="linguas" select="$tail" />
+          <xsl:with-param name="filename" select="$filename" />
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="create_link">
-          <xsl:with-param name="href" select="$tail" />
+          <xsl:with-param name="href" select="$uri" />
           <xsl:with-param name="title" select="$vocab/vocab/item[ value=$tail]" />
         </xsl:call-template>
       </xsl:otherwise>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]