Subject: Re: AW: [xsl] character transformation, possible? From: Tony Graham <Tony.Graham@xxxxxxxxxxxxxxx> Date: Wed, 16 May 2001 17:41:28 +0100 (BST) |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
AW: [xsl] character transformation,, Marcus Klinge | Thread | Re: [xsl] character transformation,, David Carlisle |
Re: [xsl] Root node vs element root, David Carlisle | Date | RE: [xsl] nested templates?, Wendell Piez |
Month |