Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

XSL Replace string

Posted on 2013-01-10
2
Medium Priority
?
288 Views
Last Modified: 2013-01-10
I'm getting data from a client
where they have three x'x in a row, they want a line break in the xslt

So
If my xml has
<SchoolCity>School NamexxxCIty Name</SchoolCity>

I need to output
School Name
City Name

This is my current xslt
<xsl:value-of select="SchoolCity" />
0
Comment
Question by:lrbrister
[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 Comments
 
LVL 18

Accepted Solution

by:
nap0leon earned 2000 total points
ID: 38763438
Depending on which level of XSLT you are using...

XSLT 1- Create a template that runs the replace function for you:
http://geekswithblogs.net/Erik/archive/2008/04/01/120915.aspx

XSLT 2- Use the replace() function:
http://p2p.wrox.com/xslt/45627-how-use-replace-function-xslt-2-0-a.html
0
 

Author Closing Comment

by:lrbrister
ID: 38763601
Perfect thanks
0

Featured Post

Implementing Azure Infrastructure Exam 70-533

This course is designed to familiarize and instruct students in the content that is covered by Microsoft Exam 70-533, Implementing Microsoft Azure Solutions. It focuses on all the November 2016 objective domain topics.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

715 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