Account for the possibility of a trailing slash in an url in pacakges.xsl
This commit is contained in:
parent
c4ad7bfd4e
commit
ff9938fe50
1 changed files with 6 additions and 1 deletions
|
@ -40,7 +40,8 @@
|
||||||
<xsl:param name="url" select="foo"/>
|
<xsl:param name="url" select="foo"/>
|
||||||
<xsl:variable name="sub-url" select="substring-after($url,'/')"/>
|
<xsl:variable name="sub-url" select="substring-after($url,'/')"/>
|
||||||
<xsl:choose>
|
<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:call-template name="package_name">
|
||||||
<xsl:with-param name="url" select="$sub-url"/>
|
<xsl:with-param name="url" select="$sub-url"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
|
@ -52,6 +53,10 @@
|
||||||
<xsl:value-of select="substring-before($sub-url,'?')"/>
|
<xsl:value-of select="substring-before($sub-url,'?')"/>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
<xsl:when test="contains($sub-url,'/')">
|
||||||
|
<xsl:value-of select="substring-before($sub-url,'/')"/>
|
||||||
|
<xsl:text>
</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="$sub-url"/>
|
<xsl:value-of select="$sub-url"/>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
|
|
Reference in a new issue