]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Activated refinement white-space-handling for fo:title and fo:bookmark-title
authorAndreas L. Delmelle <adelmelle@apache.org>
Mon, 27 Feb 2006 19:02:39 +0000 (19:02 +0000)
committerAndreas L. Delmelle <adelmelle@apache.org>
Mon, 27 Feb 2006 19:02:39 +0000 (19:02 +0000)
(treating fo:title the same as fo:bookmark-title
  -- see XSL-FO 1.1 6.11.3 -> Trait derivation)

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@381409 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java
test/layoutengine/disabled-testcases.xml

index 53e701110a50a4078ff3ec02975121b55bcc3e61..bef6659aacdf4ff9da0dcfbd61e9e86e9deb5a52 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005 The Apache Software Foundation.
+ * Copyright 2005-2006 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -76,6 +76,14 @@ public class XMLWhiteSpaceHandler {
             this.linefeedTreatment = currentBlock.getLinefeedTreatment();
             this.whiteSpaceCollapse = currentBlock.getWhitespaceCollapse();
             this.whiteSpaceTreatment = currentBlock.getWhitespaceTreatment();
+        } else if (fo.getNameId() == Constants.FO_TITLE
+                || fo.getNameId() == Constants.FO_BOOKMARK_TITLE) {
+            /* Two special types of FO that can contain #PCDATA
+             * set properties to their initial values
+             */
+            this.linefeedTreatment = Constants.EN_TREAT_AS_SPACE;
+            this.whiteSpaceCollapse = Constants.EN_TRUE;
+            this.whiteSpaceTreatment = Constants.EN_IGNORE_IF_SURROUNDING_LINEFEED;
         }
         currentFO = fo;
         if (firstTextNode == null) {
index 9862d57b793805c26fbb62f801421eed000d77ea..1bd206174bde60897a3534326b78c97cdbb408ec 100644 (file)
     line.</description>
     <reference>http://www.nabble.com/leaders-with-leader-pattern%3D%22use-content%22-t546244.html</reference>
   </testcase>
-  <testcase>
-    <name>linefeed-treatment in title</name>
-    <file>title_linefeed-treatment.xml</file>
-    <description>linefeed treatment and white space
-collapse are not performed on a fo:title</description>
-  </testcase>
   <testcase>
     <name>keep-with-previous doesn't work in lists</name>
     <file>list-block_keep-with-previous.xml</file>