xslt replace function
I am using fn:replace(string,pattern,replace)
function to replace ','
to '.'
. URI i used for the function is http://www.w3.org/2005/xpath-functions. But i m getting an exception saying
System.Xml.X开发者_如何学Csl.XsltException: Cannot find the script or external object that implements prefix 'fn'
Can anybody tell me what is the issue.
Thanks in advance Pradeep
You can use this instead:
<xsl:value-of select="translate(string, ',', '.')" />
The .net framework implements XSLT 1.0 only, and the new functions such as replace are in the XPath 2.0 and XQuery 1.0 Functions and Operators spec which is not supported.
You will have to make do with translate or a hack such as described here.
精彩评论