Solved

XSL Replace string

Posted on 2013-01-10
2
278 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
HTML button disabled 11 36
Menu Inconsistent 3 19
Windows Service to Receive TCP Packets 4 33
Set form below another form 3 25
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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 embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

708 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

13 Experts available now in Live!

Get 1:1 Help Now