[xsl] Preserving Spaces and Tabs

Subject: [xsl] Preserving Spaces and Tabs
From: Andy Carr1 <CARRA@xxxxxxxxxx>
Date: Thu, 5 Jul 2007 11:44:09 +0100
Hi

I am using XSL-FO along with RenderX XEP v4.9  to produce PDF output.. 

In my source XML have text that incorporates spaces, tabs and line-feeds 
and need to preserve this formatting in the output PDF.

Using

<fo:block white-space="pre" >
   <xsl:value-of select="." />
</fo:block>

handles the spaces and line-feeds but each tab appears to be treated as a 
single space, so instead of,say, 8 spaces being rendered for 2 tabs (of 4 
spaces each) I am only getting 2 spaces rendered.

I have tried all the values available in the "white-space", 
"white-space-collapse" and "white-space-treatment" attributes of 
<fo:block> and nothing seems to deal with the tabs.

Can anyone shed some light on the problem.

Regards
Andy

Andy Carr
Senior IT Specialist
Tel: Internal - 298037 External - 01252 558037
Mail Point  M1C IBM Application Services
Meudon House, Meudon Avenue, Farnborough, GU14 7NB
(Notes) Andy Carr1/UK/IBM@IBMGB 
(Internet)CARRA@xxxxxxxxxx






Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Current Thread