Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: How to replace chars in a string How to replace chars in a stringTo: NULL Date: 8/31/2005 1:42:00 PM I'm a complete newbie to this "X" stuff so please bare with me.
I'm trying to replace all occurances of whitespaces in a string. I thought
I could use the fn:replace function but I'm having no luck. When I try
this:
<xsl:template match="processedIoPoint">
<xsl:variable name="bar" select="fn:replace(@name,' ', '_')"/>
<channel type="{@type}" value="{scaledValue}" nameAlias="{$bar}"
uom="{@units}" qualData="{status}" nameChannel="{@channelName}"/>
</xsl:template>"
I get some error about there being no "replace" method that takes
([ExpressionContext,] #STRING, #STRING) as arguments.
I have two question: Firt off, am I using the fn:replace function
incorrectly
and why is the argument "@name" being taken as an expression context and
not a string?
In any case, can someone tell me how I might solve the problem of replacing
the white spaces in my strings?
Thanks
Dave.
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
