Replace function is not working in xslt 2.0
xslt looks like this:
<xsl:stylesheet version='2.0'
xmlns:xsl='http://ift.tt/tCZ8VR'>
<xsl:output
method="xml"
encoding="utf-8"
media-type="application/xml"
/>
<xsl:template match='/'>
<items>
<xsl:apply-templates select="response/result/doc"/>
</items>
</xsl:template>
<!-- search results xslt -->
<xsl:template match="doc">
<xsl:variable name="ShortDescription" select="str[@name = 'ShortDescription']"/>
<shortdescription><xsl:value-of select="replace($ShortDescription, '&amp;', '&')" disable-output-escaping="yes"/></shortdescription>
</xsl:template>
</xsl:stylesheet>
When we use replace function we get this error:
Please give me an idea of how to handle this replace function in xslt 2.0
Thanks in advance
No comments:
Post a Comment