This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes whitespace problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "whitespace problem" Watch "whitespace problem" New topic
Author

whitespace problem

varnika Raman
Greenhorn

Joined: Jun 10, 2003
Posts: 13
Hi guys,
<A>This is a test</A>
I need to convert this into
<A>Thisisatest</A>
no space in the value. How to do it using XSLT.
Thanks in advance.
Varnika
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
You can use the translate function. The first parameter is your string, the second which symbols to change, the last -- new symbols. Use empty string ('') as the third parameter, and no more whitespaces!
<xsl:value-of select="translate (A, ' ', '')" />


Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
varnika Raman
Greenhorn

Joined: Jun 10, 2003
Posts: 13
Thanks, It works
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: whitespace problem
 
Similar Threads
Question on Palindromes
25% off on Certification exams
SCBCD Voucher for Sale
SCEA Part 1 Voucher for Sale
Stereotype Vs constraint