Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Translate Euro Sign(€) in 'EUR'

Thread Tools

Translate Euro Sign(€) in 'EUR'

Marco W
Posts: n/a

<xsl:value-of select="translate(current(),'€','EUR')" />

only replace the euro sign with 'E' and not 'EUR'. How can I replace
the euro sign in the string 'EUR'?

Reply With Quote
David Carlisle
Posts: n/a

translate only does single character translations.

xpath 2 has a replace() function, but for xslt2 you need to use
substring-before and substring-after to split up the string before and
after the euro sign and insert EUR.

Or there are several replace templates in faq and archive lists

xsl faq has

for example.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best wireless router < 300 EURO for EUROPE is...??? raylopez99 Wireless Networking 0 01-09-2006 05:09 AM
Web site switching to Euro Max ASP .Net 8 01-20-2005 06:55 PM
Displaying Euro Symbol =?Utf-8?B?U2FsYW1FbGlhcw==?= ASP .Net 5 12-20-2004 12:49 AM
currency formatting for Euro ashish ASP .Net 0 04-27-2004 08:36 PM
Re: Best place for exchanging $ to Euro? mrtravelkay Cisco 0 04-23-2004 11:50 PM