Preserve text structure with XSL-FO

Aino Andriessen

XSL-FO is all about the formatting of a document. For the interpretation of spaces and other special characters many options are available. To preserve the whitespaces and new lines in a text at least the property white-space-collapse should be set to false (the default setting is true). In my opinion does the name of this property not completely cover its meaning, because it also involves special characters like linefeeds and tabs, but alas it’s close enough. Since the described setting was succesful I did not investigate other properties, like linefeed-treatment and white-space-treatment. Also, the property white-space should specify a set of properties, but this did not seem to work.

Remarks: Do not always trust the console and the logging messages, because the printed output may differ from the actual content. Our java printXML method converted the carriage return control character into the entity but retained and used the linefeed. This resulted in some major confusion :-(.

Next Post

Book Review: Oracle Database 10g A Beginner's Guide

Title: Oracle Database 10g A Beginner’s Guide Authors: Ian Abramson; Michael Abbey; Michael Corey Publisher: McGraw-Hill Osborne Media ISBN: 0072230789 Publication Date: March 31, 2004 Website: The setup of the book is nice, with progress checks to monitor how well you understand the chapter you just read and sample […]
%d bloggers like this: