Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Removing white space and ctrl chars from an element with XSLT

Posted on 2010-09-16
3
Medium Priority
?
388 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
  • 2
3 Comments
 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

971 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