W3C home > Mailing lists > Public > www-xsl-fo@w3.org > July 2002

Preserving Linefeed character

From: Al-Dhahir, Haitham <Haitham.Al-Dhahir@gs.com>
Date: Tue, 23 Jul 2002 19:18:26 +0100
Message-Id: <F17B2FF57CF8D41196CC0008C786CEAA0B572067@gsln14e.ln.fw.gs.com>
To: "'www-xsl-fo@w3.org'" <www-xsl-fo@w3.org>

Hi,

I have an XML document which contains a linefeed character in one of the
lines. However, when I process this into PDF using FOP, the outputted line
has a space where the linefeed should be.

My XML:
<Data val="Line1&#x0A;Line2"/>

My XSL:
<fo:block text-align="left" font-weight="normal"
linefeed-treatment="preserve"><xsl:value-of select="Data/@val"/></fo:block>

What I want to appear in the PDF:
Line1
Line2

What is actually appearing:
Line1Line2

The FO documentation indicates that linefeed-treatment="preserve" should
keep the linefeed, but it is not. What am I doing wrong here? Have I got the
right linefeed character (0A)?

Thanks,

Haitham.
Received on Tuesday, 23 July 2002 14:18:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:09 GMT