Bernardo Herrera
unread,Nov 26, 2009, 11:53:31 AM11/26/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Search Appliance/Google Mini - Google Search Appliance/Google Mini
just do this
<xsl:template name="substring-after-last">
<xsl:param name="url" />
<xsl:param name="substr" />
<!-- Extract the string which comes after the first occurence -->
<xsl:variable name="temp" select="substring-after($url,$substr)"/>
<xsl:choose>
<!-- If it still contains the search string then recursively
process -->
<xsl:when test="$substr and contains($temp,$substr)">
<xsl:call-template name="substring-after-last">
<xsl:with-param name="url" select="$temp" />
<xsl:with-param name="substr" select="$substr" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="replace_string">
<xsl:with-param name="find" select="'%20'"/>
<xsl:with-param name="replace" select="' '"/>
<xsl:with-param name="string" select="$temp"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>