Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace in XSL 1

Status
Not open for further replies.

woohahee

MIS
Mar 2, 2001
16
GB
Ok I have this small problem which is really doing my head in - I have an address which is set up basically like:

<ADDRESS>TEST,TEST,TEST</ADDRESS>

Now all I want to do is replace the comma with <BR/>

My code so far is:

<xsl:for-each select=&quot;ADDRESS/ADDRESSLINE[. != '']&quot;>
<xsl:value-of select=&quot;.&quot;/><BR/>
</xsl:for-each>

Is there any expression I can use?

<xsl:value-of select=&quot;expression(.,',','<BR/>')&quot;/>
<BR/>

Please help,

Richard
 
no. at first I thought translate(exp1, delim1, replacementstr) might have helped, but not this time. it seems to only replace however many characters you specify in delim1, and ignores the rest of replacementstr. ho hum.

you are either going to have to follow this persons advice:


or extend the functionality of xpath with a scripting language (msxml only so far i think):


hope that helps.

mattc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top