Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Newline character from XML >Thread Next - Re: Newline character from XML Re: Newline character from XMLTo: NULL Date: 6/5/2005 8:36:00 AM "Sean" <Sean@d...> wrote in message news:EA6D9395-B95A-43F9-91B9-25487D729E0F@m...... > this..<xsl:value-of select="ex:NarComment"/>...in a <td> element to grab my > XML data works fine. Only trouble is, I want to add a Newline to this XML > data so the template will print out the data with new lines where I need it. > I got everything (loops, concatation etc) all ready to go. I just cant > figure out the newline problem Well there are two problems. One is that HTML doesn't recognise a newline character such as the one represented by x0d, it needs <br>. The second is that XML processors often remove white space is it is "insignificant". Their idea of this and yours may not coincide :) If you just want to modify the XSLT than add br elements where applicable. If you want to modify the XML then either add br elements or add xml:space="preserve" to the document element. In your XSLT replace newlines with br. Alternatively if you are loading with msxml then set the preserveWhiteSpace to true before loading. -- Joe (MVP - XML) https://mvp.support.microsoft.com/profile=8AA9D5F5-E1C2-44C7-BCE8-8741D22D17A5 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
