Solved

Removing white space and ctrl chars from an element with XSLT

Posted on 2010-09-16
3
385 Views
Last Modified: 2012-05-10
I have xml elements that look like

<name>Mr Jones  </name>

<name>Mr       Jones  </name>

<name>Mr  
  Jones  </name>

Is there a way in XSLT to remove the white spaces and ctrl chars so that the result always looks like
<name>Mr Jones</name>

I only wish to have 1 space between 'Mr' and 'Jones'

Thanks
0
Comment
Question by:Molko
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 92

Expert Comment

by:objects
ID: 33697220
0
 

Accepted Solution

by:
Molko earned 0 total points
ID: 33708099
I ended up using the normalize-space function.

Seems to work ok
0
 

Author Comment

by:Molko
ID: 33818225
normalize-space function.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question