Solved

XSL Replace string

Posted on 2013-01-10
2
280 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
2 Comments
 
LVL 18

Accepted Solution

by:
nap0leon earned 500 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
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 code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
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 …

813 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now