If you want to use replace() function similar to XPath 2.0[1] and you want to avoid a long XSLT function similar to this one[2], you can use PHP's str_replace() instead:
<xsl:value-of select="php:functionString('str_replace','pattern', 'replacement' , . )">
Links:
[1] http://www.w3.org/TR/2004/WD-xpath-functions-20041029/#func-replace
[2] http://aspn.activestate.com/ASPN/Cookbook/XSLT/Recipe/65426
_