Answer the question
In order to leave comments, you need to log in
How to replace ampersand in template?
The replace-string function is taken
from here
,
I call
<xsl:call-template name="replace-string">
<xsl:with-param name="text" select="@custom:src"/>
<xsl:with-param name="replace" select="'&'" />
<xsl:with-param name="with" select="' '"/>
</xsl:call-template>
Answer the question
In order to leave comments, you need to log in
what am I doing wrong?
<root>
<foo>123&456</foo>
</root>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/root/foo">
<xsl:value-of select="translate(., '&', ' ')"/>
</xsl:template>
</xsl:stylesheet>
123 456
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question