замена xslt1.0 не работает
У меня есть URL с некоторыми специальными символами, и я хотел бы заменить их, и я использую xslt 1.0, поэтому я пишу код, как показано ниже.
<xsl:template name="string-replace-all">
<xsl:param name="text"/>
<xsl:param name="replace"/>
<xsl:param name="by"/>
<xsl:choose>
<xsl:when test="contains($text,$replace)">
<xsl:value-of select="substring-before($text,$replace)"/>
<xsl:value-of select="$by"/>
<xsl:call-template name="string-replace-all">
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
<xsl:with-param name="replace" select="$replace"/>
<xsl:with-param name="by" select="$by"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
и звонит так:
<td class="ms-vb">
<xsl:variable name="link">
<xsl:call-template name="string-replace-all">
<xsl:with-param name="text" select="@FileRef"/>
<xsl:with-param name="replace" select="'''"/>
<xsl:with-param name="by" select="'%27'"/>
</xsl:call-template>
</xsl:variable>-->
<a target="_blank" href="@link" ><xsl:value-of select="@New_x0020_Doc_x0020_Title" disable-output-escaping="yes" /></a>
</td>
Я получаю сообщение об ошибке "Веб-часть не может быть отображена". Кто-нибудь может подсказать, пожалуйста, что я здесь делаю не так?