AH Formatter / XSL Formatter
Q&A



XSLT/XSL-FO/MathML Technics

Block

Top
Basic, General
About AH Formatter
About XSL Formatter
Operation
Programming
XSLT/XSL-FO/SVG/MathML Conformance
XSLT/XSL-FO/MathML Technics
Index
Q.  In order to preserve the linebreaks, we add a <xsl:attribute name="white-space"> pre </xsl:attribute>statement, which does preserve the linebreaks, but now overruns the right margin and does not word wrap. Why? [No.2002052402]
A. 

the W3C Recommendation for XSL-FO says

7.29.23 "white-space"

CSS2 Definition:

...

The CSS property shall be treated as a shorthand by XSL and maps as follows: pre
linefeed-treatment="preserve"
white-space-collapse="false"
white-space-treatment="preserve"
wrap-option="no-wrap"

The following property doesn't break line.

white-space="pre"

white-space="pre" is the same as specifying the above 4 properties. The reason why the word does not wrap is "pre" includes the instruction of "no-wrap". Please specify as follows:

linefeed-treatment="preserve"
wrap-option="wrap"

Copyright © 1999-2011 Antenna House, Inc. All rights reserved.
Antenna House is a trademark of Antenna House, Inc.