Author: pierre
Date: Thu May  8 13:58:12 2014
New Revision: 3795

Log:
Account for the possibility of a trailing slash in an url in pacakges.xsl

Modified:
   jhalfs/trunk/common/packages.xsl

Modified: jhalfs/trunk/common/packages.xsl
==============================================================================
--- jhalfs/trunk/common/packages.xsl    Thu May  8 09:05:31 2014        (r3794)
+++ jhalfs/trunk/common/packages.xsl    Thu May  8 13:58:12 2014        (r3795)
@@ -40,7 +40,8 @@
     <xsl:param name="url" select="foo"/>
     <xsl:variable name="sub-url" select="substring-after($url,'/')"/>
     <xsl:choose>
-      <xsl:when test="contains($sub-url,'/')">
+      <xsl:when test="contains($sub-url,'/') and
+                      not(substring-after($sub-url,'/')='')">
         <xsl:call-template name="package_name">
           <xsl:with-param name="url" select="$sub-url"/>
         </xsl:call-template>
@@ -52,6 +53,10 @@
             <xsl:value-of select="substring-before($sub-url,'?')"/>
             <xsl:text>&#xA;</xsl:text>
           </xsl:when>
+          <xsl:when test="contains($sub-url,'/')">
+            <xsl:value-of select="substring-before($sub-url,'/')"/>
+            <xsl:text>&#xA;</xsl:text>
+          </xsl:when>
           <xsl:otherwise>
             <xsl:value-of select="$sub-url"/>
             <xsl:text>&#xA;</xsl:text>
-- 
http://lists.linuxfromscratch.org/listinfo/alfs-log
Unsubscribe: See the above information page

Reply via email to