[XSL-LIST Mailing List Archive Home]
[Reply To This Message]
Re: Replacing the space character with another charact
Subject: Re: Replacing the space character with another character|
From: mozer <xmlizer@xxxxxxxxx>
Date: Sun, 13 May 2007 22:40:56 +0200
& --> &
* --> *
On 5/13/07, Mark Peters <flickrmeister@xxxxxxxxx> wrote:
I'm trying to replace the space character with another character (I've
chosen the asterisk, but it could be anything) in a specific element's text
contents. I've read the Replace and String Replace pages on Dave Pawson's
site, and have read about the translate XPath function, but am still coming
up empty (literally!).
In my input XML, I have a number of <indexterm> elements such as the
I'd like to replace the space character as follows:
My stylesheet contains the following template:
<xsl:value-of select="translate(.,' ','&')"/>
For some reason, the stylesheet removes the spaces, rather than replacing
them with the asterisk:
What am I doing wrong?
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format