xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Bug in whitespace handling with linefeed-treatment="ignore"?
Date Thu, 27 Apr 2006 07:58:38 GMT
Maybe you have seen the thread on fop-users:

The patch below fixes the attached example in the way I would expect
(but only for linefeed-treatment="ignore", the other values would have to
be checked, too). However, I'm not sure it this is right, but
white-space-treatment is handled "before any linefeed-treatment handling
is considered" (XSL-FO 1.0, 7.15.8). I think the afterLineFeed variable
is currently not properly set. It also looks like our testcases don't
cover this particular constellation. What adds to my uncertainty is that
XEP does not behave as I would expect in this case (it seems to remove
the tab but not the spaces).

Any insight, whitespace specialists?

Index: src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java
--- src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java (revision 397142)
+++ src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java (working copy)
@@ -226,6 +226,7 @@
                     switch (linefeedTreatment) {
                         case Constants.EN_IGNORE:
+                            afterLinefeed = true; // for following whitespace
                         case Constants.EN_TREAT_AS_ZERO_WIDTH_SPACE:

Jeremias Maerki

View raw message