Replace function in XSLT

from xslt iam using
            <xsl:text disable-output-escaping="yes">R </xsl:text><xsl:value-of select="format-number(MarketValue,'#,##0.00')" />

This will give the result in the form of    R 67,373,229.85.

Now i need to replace the comma with space in the above string.
pls give me the code for the above requirement.

i have string like
Who is Participating?
Geert BormansConnect With a Mentor Information ArchitectCommented:
The proper way however would be to make the space an active character by means of a named xsl:decimal-format
if you make the space the grouping seperator, you can directly use that

<?xml version="1.0" encoding="UTF-8"?>
    <xsl:decimal-format name="my-format" grouping-separator=" "/>
    <xsl:template match="test">
            <xsl:text disable-output-escaping="yes">R </xsl:text><xsl:value-of select="format-number(MarketValue,'# ##0.00', 'my-format')" />

Open in new window

Geert BormansInformation ArchitectCommented:
<xsl:value-of select="format-number(MarketValue,'#,##0.00')" />
to become
<xsl:value-of select="translate(format-number(MarketValue,'#,##0.00'), ',' ' ')" />
mu_ravi1Author Commented:

it is giving errors.
iam sending my xslt file .
pls modify the xslt and send me.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet [
  <!ENTITY nbsp "&#160;">
<xsl:stylesheet version="1.0" xmlns:xsl="" xmlns:xasp="urn:myextension">
  <xsl:output method="xml"/>
  <xsl:template match="/Data/PortfolioCollection">
      <xsl:for-each select="UTPortfolio">
            <xsl:value-of select="xasp:GetFundMapping(FundName)" />
            <xsl:value-of select="FundClass" />
            <xsl:value-of select="xasp:ConvertDateFormat(PriceDate)" />
            R <xsl:value-of select="format-number(NAV,'# ##0.00')" />
            <xsl:text disable-output-escaping="yes">R </xsl:text><xsl:value-of select="format-number(MarketValue,'# ##0.00')" />
            <xsl:value-of select="NoOfInvestor" />
pls modify the above xslt and send me .
pls it is very urgent.
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Geert BormansInformation ArchitectCommented:
please look carefully at the xml I sent
there is decimal-format definition, you need to copy that
    <xsl:decimal-format name="my-format" grouping-separator=" "/>
and reference it as I showed in my XSLT

I have two comments with your reply
1. You did not do what I suggested, of course there are errors
2. It would help if you told at least what the error was you are experiencing.

Please do some small effort yourself of integrating my suggestion with your code
mu_ravi1Author Commented:
Hi Gertone

hates of to ur solution.
It works perfectly.
thank u very much
Geert BormansInformation ArchitectCommented:
mu_ravi1Author Commented:
Hi Gertone

may i know ur details.
U are technically very sound.
iam from india.
iam working as programmer in india.
With Regards
Geert BormansInformation ArchitectCommented:
you can find my contact details in my profile

my web reference is there,
my email as well, but you need to make
[at] an "@"
[dot] a "."
mu_ravi1Author Commented:
excellent and amazing
All Courses

From novice to tech pro — start learning today.