Re: string replace probleme

maalej <[email protected]>
Newsgroups gmane.text.xml.xslt.extensions
Message-ID <[email protected]>
thanks

but i have a new problem:

<xsl:variable name="test">wa</xsl:variable>
            <xsl:value-of 
select="str:replace(string($test),string('a'),string('yy'))"/>

output :
wy

and not 'wyy' ??

any idea ??

maalej


Oleg Tkachenko schrieb:

> maalej mustapha wrote:
>
>> this is my xsl :
>> ....
>> <xsl:variable name="test">aaaaa</xsl:variable>
>> <xsl:value-of select="str:replace($test,'a','b')"/>
>> ....
>> I become always a error message.
>> why take the function not a  variable($test).
>
>
> That depends on the EXSLT implementation you are using, but chances 
> are it's expecting first argument to be a string (as per 
> http://www.exslt.org/str/functions/replace/index.html). So try to 
> convert it to string explicitly:
>
> <xsl:value-of select="str:replace(string($test),'a','b')"/>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.