[jira] [Commented] (FOP-2520) Empty elements consume space
[ https://issues.apache.org/jira/browse/FOP-2520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14716732#comment-14716732 ] Pascal Sancho commented on FOP-2520: All text nodes are processed by FOP, this is the correct behaviour. If you want to discard spaces, you have to 1st do it at XSLT stage: - avoid indentation - do not add unwanted extra white spaces (including linefeed) - etc. At FOP stage, you may interact on white spaces using following FO properties: - linefeed-treatment (http://www.w3.org/TR/xsl/#linefeed-treatment) - white-space-treatment (http://www.w3.org/TR/xsl/#white-space-treatment) - white-space-collapse (http://www.w3.org/TR/xsl/#white-space-treatment) That said, Jira is not the right place to discuss about this. either fop-users mailing list, or better XSLT/XSL-FO mailing lists, are more appropriate. Audience on such lists is larger. Empty elements consume space Key: FOP-2520 URL: https://issues.apache.org/jira/browse/FOP-2520 Project: FOP Issue Type: Bug Affects Versions: 2.0 Reporter: Björn Kautler Attachments: empty space that should not be there.png If you use {{indexterm}} tags in DocBook, the DocBook XSL stylesheets generate empty {{fo:wrapper}} or {{fo:block}} elements with an {{id}} attribute. These elements take up visible space if processed with FOP. Using XEP, those empty tags do not consume any space. Here an example excerpt from a FO file in question and [attached|^empty space that should not be there.png] the result. {code:xml} fo:block space-before.optimum=0.6em space-before.minimum=0.4em space-before.maximum=0.8em fo:wrapper id=N1004F!--table, customize columns--/fo:wrapper fo:wrapper id=N10056!--customize, table--/fo:wrapper fo:wrapper id=N1005D!--filter, table--/fo:wrapper fo:wrapper id=N10064!--table, filter--/fo:wrapperYou can customize most tables in the product. The configured table view is saved in your user profile and will be restored when you start the prouct the next time. /fo:block {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FOP-2520) Empty elements consume space
[ https://issues.apache.org/jira/browse/FOP-2520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14714197#comment-14714197 ] Björn Kautler commented on FOP-2520: Ah, the profiling xsl had {{indent=yes}} for {{xsl:output}} and thus formatted the output. But I'm still unsure whether this is correct behaviour of FOP. Shouldn't the space be insignificant in XML except within a text node? I guess the problem is, that in this case there is mixed content, but afair the parsed XML should have {noformat} fo:block-node text-node without anything but whitespaces, or maybe even with empty text fo:wrapper-node text-node without anything but whitespaces, or maybe even with empty text fo:wrapper-node text-node without anything but whitespaces, or maybe even with empty text fo:wrapper-node text-node without anything but whitespaces, or maybe even with empty text fo:wrapper-node text-node with You can customize most tables in the product... {noformat} So shouldn't the empty text nodes be ignored instead of producing a slight offset (without any characters like space character added) in the produced PDF each? Empty elements consume space Key: FOP-2520 URL: https://issues.apache.org/jira/browse/FOP-2520 Project: FOP Issue Type: Bug Affects Versions: 2.0 Reporter: Björn Kautler Attachments: empty space that should not be there.png If you use {{indexterm}} tags in DocBook, the DocBook XSL stylesheets generate empty {{fo:wrapper}} or {{fo:block}} elements with an {{id}} attribute. These elements take up visible space if processed with FOP. Using XEP, those empty tags do not consume any space. Here an example excerpt from a FO file in question and [attached|^empty space that should not be there.png] the result. {code:xml} fo:block space-before.optimum=0.6em space-before.minimum=0.4em space-before.maximum=0.8em fo:wrapper id=N1004F!--table, customize columns--/fo:wrapper fo:wrapper id=N10056!--customize, table--/fo:wrapper fo:wrapper id=N1005D!--filter, table--/fo:wrapper fo:wrapper id=N10064!--table, filter--/fo:wrapperYou can customize most tables in the product. The configured table view is saved in your user profile and will be restored when you start the prouct the next time. /fo:block {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FOP-2520) Empty elements consume space
[ https://issues.apache.org/jira/browse/FOP-2520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14713551#comment-14713551 ] Björn Kautler commented on FOP-2520: Ah, thanks for your help guys. Actually it is the preprocessing of the file. The profiling step we do before the DocBook-FOP for making the Doku customer- and build-specific actually inserts newlines between the indexterms, so the input DocBook for the DocBook XSL is {noformat} para indexterm significance=normal primarytable/primary secondarycustomize columns/secondary /indexterm indexterm significance=normal primarycustomize/primary secondarytable/secondary /indexterm indexterm significance=normal primaryfilter/primary secondarytable/secondary /indexterm indexterm significance=normal primarytable/primary secondaryfilter/secondary /indextermYou can customize most tables in the product. The configured table view is saved in your user profile and will be restored when you start the prouct the next time./para {noformat} I'll try to find out whether I can prevent this. But still I wonder why it does not work even with that input and why it works fine with XEP. Empty elements consume space Key: FOP-2520 URL: https://issues.apache.org/jira/browse/FOP-2520 Project: FOP Issue Type: Bug Affects Versions: 2.0 Reporter: Björn Kautler Attachments: empty space that should not be there.png If you use {{indexterm}} tags in DocBook, the DocBook XSL stylesheets generate empty {{fo:wrapper}} or {{fo:block}} elements with an {{id}} attribute. These elements take up visible space if processed with FOP. Using XEP, those empty tags do not consume any space. Here an example excerpt from a FO file in question and [attached|^empty space that should not be there.png] the result. {code:xml} fo:block space-before.optimum=0.6em space-before.minimum=0.4em space-before.maximum=0.8em fo:wrapper id=N1004F!--table, customize columns--/fo:wrapper fo:wrapper id=N10056!--customize, table--/fo:wrapper fo:wrapper id=N1005D!--filter, table--/fo:wrapper fo:wrapper id=N10064!--table, filter--/fo:wrapperYou can customize most tables in the product. The configured table view is saved in your user profile and will be restored when you start the prouct the next time. /fo:block {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FOP-2520) Empty elements consume space
[ https://issues.apache.org/jira/browse/FOP-2520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14713410#comment-14713410 ] Björn Kautler commented on FOP-2520: Actually I formatted the code a bit, yes. Here the original code that is given to FOP: {noformat} fo:block space-before.optimum=0.6em space-before.minimum=0.4em space-before.maximum=0.8em fo:wrapper id=N10119!--table, customize columns--/fo:wrapper fo:wrapper id=N10120!--customize, table--/fo:wrapper fo:wrapper id=N10127!--filter, table--/fo:wrapper fo:wrapper id=N1012E!--table, filter--/fo:wrapperYou can customize most tables in the product. The configured table view is saved in your user profile and will be restored when you start the prouct the next time./fo:block {noformat} And here the oritinal code that is given to XEP: {noformat} fo:block space-before.optimum=0.6em space-before.minimum=0.4em space-before.maximum=0.8em fo:wrapper id=N10120 xmlns:rx=http://www.renderx.com/XSL/Extensions; rx:key=table, customize columns/ fo:wrapper id=N10127 xmlns:rx=http://www.renderx.com/XSL/Extensions; rx:key=customize, table/ fo:wrapper id=N1012E xmlns:rx=http://www.renderx.com/XSL/Extensions; rx:key=filter, table/ fo:wrapper id=N10135 xmlns:rx=http://www.renderx.com/XSL/Extensions; rx:key=table, filter/You can customize most tables in the product. The configured table view is saved in your user profile and will be restored when you start the prouct the next time./fo:block {noformat} Both are produced like that by DocBook XSL stylesheets. If I manually change the code given to FOP to this: {noformat} fo:block space-before.optimum=0.6em space-before.minimum=0.4em space-before.maximum=0.8emfo:wrapper id=N10119!--table, customize columns--/fo:wrapperfo:wrapper id=N10120!--customize, table--/fo:wrapperfo:wrapper id=N10127!--filter, table--/fo:wrapperfo:wrapper id=N1012E!--table, filter--/fo:wrapperYou can customize most tables in the product. The configured table view is saved in your user profile and will be restored when you start the prouct the next time./fo:block {noformat} Then there is no space produced. Also there are no actual space characters in the produced PDF, as you can see in the screenshot. Text selection shows that there are no space characters, just blank space that is present. Empty elements consume space Key: FOP-2520 URL: https://issues.apache.org/jira/browse/FOP-2520 Project: FOP Issue Type: Bug Affects Versions: 2.0 Reporter: Björn Kautler Attachments: empty space that should not be there.png If you use {{indexterm}} tags in DocBook, the DocBook XSL stylesheets generate empty {{fo:wrapper}} or {{fo:block}} elements with an {{id}} attribute. These elements take up visible space if processed with FOP. Using XEP, those empty tags do not consume any space. Here an example excerpt from a FO file in question and [attached|^empty space that should not be there.png] the result. {code:xml} fo:block space-before.optimum=0.6em space-before.minimum=0.4em space-before.maximum=0.8em fo:wrapper id=N1004F!--table, customize columns--/fo:wrapper fo:wrapper id=N10056!--customize, table--/fo:wrapper fo:wrapper id=N1005D!--filter, table--/fo:wrapper fo:wrapper id=N10064!--table, filter--/fo:wrapperYou can customize most tables in the product. The configured table view is saved in your user profile and will be restored when you start the prouct the next time. /fo:block {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FOP-2520) Empty elements consume space
[ https://issues.apache.org/jira/browse/FOP-2520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14713413#comment-14713413 ] Björn Kautler commented on FOP-2520: And there is no space between the indexterms in the source DocBook File. Here the corresponding part: {noformat} paraindexterm primarytable/primary secondarycustomize columns/secondary /indextermindexterm primarycustomize/primary secondarytable/secondary /indextermindexterm primaryfilter/primary secondarytable/secondary /indextermindexterm primarytable/primary secondaryfilter/secondary /indextermYou can customize most tables in the product. The configured table view is saved in your user profile and will be restored when you start the prouct the next time./para {noformat} Empty elements consume space Key: FOP-2520 URL: https://issues.apache.org/jira/browse/FOP-2520 Project: FOP Issue Type: Bug Affects Versions: 2.0 Reporter: Björn Kautler Attachments: empty space that should not be there.png If you use {{indexterm}} tags in DocBook, the DocBook XSL stylesheets generate empty {{fo:wrapper}} or {{fo:block}} elements with an {{id}} attribute. These elements take up visible space if processed with FOP. Using XEP, those empty tags do not consume any space. Here an example excerpt from a FO file in question and [attached|^empty space that should not be there.png] the result. {code:xml} fo:block space-before.optimum=0.6em space-before.minimum=0.4em space-before.maximum=0.8em fo:wrapper id=N1004F!--table, customize columns--/fo:wrapper fo:wrapper id=N10056!--customize, table--/fo:wrapper fo:wrapper id=N1005D!--filter, table--/fo:wrapper fo:wrapper id=N10064!--table, filter--/fo:wrapperYou can customize most tables in the product. The configured table view is saved in your user profile and will be restored when you start the prouct the next time. /fo:block {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FOP-2520) Empty elements consume space
[ https://issues.apache.org/jira/browse/FOP-2520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14711161#comment-14711161 ] Jan Tosovsky commented on FOP-2520: --- Have you formatted the code above? There is white space between multiple fo:wrapper elements which seems to be preserved which is IMO correct. Multliple indexterms in Docbook source shouldn't be delimited with anything (but some editors like XMetal do this, so extra post processing - space removal, is required). For XEP the generated XSL-FO source differs as there are custom XEP tags instead. Empty elements consume space Key: FOP-2520 URL: https://issues.apache.org/jira/browse/FOP-2520 Project: FOP Issue Type: Bug Affects Versions: 2.0 Reporter: Björn Kautler Attachments: empty space that should not be there.png If you use {{indexterm}} tags in DocBook, the DocBook XSL stylesheets generate empty {{fo:wrapper}} or {{fo:block}} elements with an {{id}} attribute. These elements take up visible space if processed with FOP. Using XEP, those empty tags do not consume any space. Here an example excerpt from a FO file in question and [attached|^empty space that should not be there.png] the result. {code:xml} fo:block space-before.optimum=0.6em space-before.minimum=0.4em space-before.maximum=0.8em fo:wrapper id=N1004F!--table, customize columns--/fo:wrapper fo:wrapper id=N10056!--customize, table--/fo:wrapper fo:wrapper id=N1005D!--filter, table--/fo:wrapper fo:wrapper id=N10064!--table, filter--/fo:wrapperYou can customize most tables in the product. The configured table view is saved in your user profile and will be restored when you start the prouct the next time. /fo:block {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)