[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: AW: character transformation, possible?

Subject: Re: AW: character transformation, possible?
From: Tony Graham <Tony.Graham@xxxxxxxxxxxxxxx>
Date: Wed, 16 May 2001 17:41:28 +0100 (BST)
Re: AW:  character transformation
Marcus Klinge wrote at 16 May 2001 17:39:57 +0200:
 > You might want to try the string-function translate.
 > 
 > For example:
 > 
 > <xsl:value-of select="translate(EXAMPLE,'"\','&\\')"/>

That's wrong on several levels.  For starters, you can't have a bare
'&' in an attribute value.  Secondly, translate() only works character 
by character, so '"' will be translated to '&' and '\' will be
translated to '\'.

It's a good rule of thumb to check Dave Pawson's XSL FAQ before
posting any question.  (It even says so on the XSL-List's web page.)

See http://www.dpawson.co.uk/xsl/stringreplace.html.

Regards,


Tony Graham
------------------------------------------------------------------------
Tony Graham                           mailto:tony.graham@xxxxxxxxxxxxxxx
Sun Microsystems Ireland Ltd                       Phone: +353 1 8199708
Hamilton House, East Point Business Park, Dublin 3            x(70)19708

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.