Reputation: 4872
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.Xsl.XsltException: Cannot find the script or external object that implements prefix 'fn'
Can anybody tell me what is the issue.
Thanks in advance Pradeep
Upvotes: 1
Views: 1665
Reputation: 34868
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.
Upvotes: 2
Reputation: 8796
You can use this instead:
<xsl:value-of select="translate(string, ',', '.')" />
Upvotes: 4