A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Arduino in Action
this week in the
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
XML and Related Technologies
Help replacing characters using XSL
Greg L Tonn
Joined: Nov 27, 2006
May 08, 2007 16:32:00
We have text data that has new line characters in it and when we transform it using our XSL the new lines preserved. So I was hoping to be able to replace the new line characters with the <br> tag.
has a function, replace(
,replace). However, I can't get it to work with the <br> tag.
Does anyone have a better solution or know how I can get this one to work?
<xsl:value-of select="replace($Value, ' ', <br>"/>
Joined: Oct 14, 2005
May 08, 2007 21:54:00
You don't want to replace the newline by the string "<br>". You want to replace it by a "br" element, and that isn't the same thing.
However this is an XSLT FAQ, let me just google it... yup, here you go:
I agree. Here's the link:
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Help replacing characters using XSL
Keep HTML tag in String
handling multiple languages using XSL
JSTL out with JSP expression
New line into HTML break using Xalan???
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013