| Subject: RE: [xsl] replacing , with a . From: Mohd Shadab <mshadab@xxxxxxxxxxxxxx> Date: Fri, 18 Jul 2003 16:54:36 +0100 | 
This should be of some help if not translate(string,",",".")
<xsl:param name="replace" select=","/>
<xsl:param name="with" select="."/>
<xsl:template name="do-replace">
 <xsl:param name="text"/>
 <xsl:choose>
  <xsl:when test="contains($text, $replace)">
   <xsl:value-of select="substring-before($text, $replace)"/>
   <xsl:value-of select="$with"/>
   <xsl:call-template name="do-replace">
    <xsl:with-param name="text" select="substring-after($text, $replace)"/>
   </xsl:call-template>
  </xsl:when>
  <xsl:otherwise>
   <xsl:value-of select="$text"/>
  </xsl:otherwise>
 </xsl:choose>
</xsl:template>
Regards,
Shadab
Developer
Address: 4 Buckingham Gate, London SW1E 6JP 
Tel: +44 (0)20 7802 4643 fax: +44 (0)20 7802 
email: mshadab@xxxxxxxxxxxxxx
do something lastminute.com
-----Original Message-----
From: Challa, Harsha [mailto:hchalla@xxxxxxxxxxxx]
Sent: 18 July 2003 16:36
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] replacing , with a .
XML Gurus,
I have a street field with comma's  in the field. I would like to replace
the 
commas with a . when i am extracting the data using XSL and writing the flat
file.
I am doing 
 <xsl:value-of
select="ShippingPointAddress/@ShippingPointStreet"></xsl:value-of> 
to write to the flat file.
Could some one let me know if there is a function to do this? 
To replace all the commas with . in the field  and how to use it.
thanks in advance 
Harsha 
 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| RE: [xsl] replacing , with a ., Jim Fuller | Thread | [xsl] sort and order xml data accor, Sergey Demidenko | 
| Re: [xsl] replacing , with a ., David Carlisle | Date | RE: [xsl] Sorting and re-ordering d, Cole, Chris | 
| Month |