Maybe you have seen the thread on fop-users:
http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200604.mbox/[EMAIL
 PROTECTED]

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:
                             charIter.remove();
+                            afterLinefeed = true; // for following whitespace
                             break;
                         case Constants.EN_TREAT_AS_ZERO_WIDTH_SPACE:
                             
charIter.replaceChar(CharUtilities.ZERO_WIDTH_SPACE);


Jeremias Maerki

Attachment: linefeed-treatment-ignore.fo
Description: Binary data

Reply via email to