Sign In/My Account | View Cart  
advertisement

Article:
 Controlling Whitespace, Part 1
Subject: Need to keep my carriage returns
Date: 2005-05-19 05:38:39
From: bhben

I am trying to maintain my carriage returns but they are always getting lost, i've tried using xml:space="preserve" and xslpreserve-space... but neither work or i am using them wrong.


The data is inside a tag as follows:
<tag>
line1
line2
line3
</tag>


I want to keep the formatting of the data (the 3 lines) as it is but it goes like this:
line1 li
ne2 line3


I am using an xsl stylesheet but i beleive the carriage returns are removed by the time that becomes involved.


The information between the tags is written by a unix script and so i cannot simply add
tags or change anything between the tags.


Please help,


Ben.


Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • Need to keep my carriage returns
    2005-05-19 06:34:10 Bob DuCharme [Reply]

    I would have to see the whole stylesheet. That new line break in the middle of "line2" is particularly odd, so there could be some culprit outside of your XSLT processor responsible.


    I would post the smallest possible complete stylesheet that reproduces the problem, along with a sample source file and the details about what XSLT processor you're using (and for that matter, where the data comes from and where it goes to before you see it, in case there's a chance that some other program is causing the problem) to the XSL-List mentioned below.


    Bob


Sponsored By: