diff options
author | Andreas L. Delmelle <adelmelle@apache.org> | 2006-02-27 19:02:39 +0000 |
---|---|---|
committer | Andreas L. Delmelle <adelmelle@apache.org> | 2006-02-27 19:02:39 +0000 |
commit | 74a05bc3c15ef277d1096294eb6af7cbb5318664 (patch) | |
tree | f0c5e446a8f03c2bc7c952daf48947d7cb4528af /src | |
parent | 3d819ae9d9601336504d6b2bf6018dfe62bb4080 (diff) | |
download | xmlgraphics-fop-74a05bc3c15ef277d1096294eb6af7cbb5318664.tar.gz xmlgraphics-fop-74a05bc3c15ef277d1096294eb6af7cbb5318664.zip |
Activated refinement white-space-handling for fo:title and fo:bookmark-title
(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
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java b/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java index 53e701110..bef6659aa 100644 --- a/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java +++ b/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java @@ -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) { |