Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Newline character from XML

From: Sean@-----------.---------.---
To: NULL
Date: 6/5/2005 10:30:00 PM
thanks for helping...

I had already tried various ways to use the <br> as well as <br/> with it 
displaying as text. Maybe I need to look more into the perserve whitespace as 
you suggest. Never the less I will try to post later with more detailed 
information if whitespace approach doesnt work.

"Joe Fawcett" wrote:

> "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
> 
> 
> 
> 


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent