xslt-2.0 - XSL :FO avoid Space between Table Cells

你好,我有两个表格单元格和一个 <fo:leader/>在两个单元格中。我怎样才能避免在两个单元格之间留出空间。不可能跨越两个单元格。

我使用 Antennahouse 和 XSLT 2.0。

这是我的表格代码

 <fo:table width="100%"  >
           <fo:table-column column-width="50%"/>
           <fo:table-column column-width="50%"/>
            <fo:table-body  >
              <fo:table-row>
                 <fo:table-cell  >
                   <fo:block border-right-width="0.0mm" >
                      <xsl:if test="page">
                        <xsl:attribute name="text-align-last">justify</xsl:attribute>
                      </xsl:if>
                     <xsl:value-of select="concat(@ref1,' ')"/>  
                      <xsl:if test="page">                       
                          <fo:leader leader-pattern="dots"/>
                      </xsl:if>          
                   </fo:block>
                 </fo:table-cell>
                 <fo:table-cell >
                   <fo:block  text-align="justify" text-align-last="right" axf:text-align-first="justify">  
                     <xsl:if test="page">
                        <fo:leader leader-pattern="dots"  />
                     </xsl:if>   
                     <fo:inline><xsl:apply-templates select="page" mode="normal"><xsl:with-param name="chapter" select="@chapterNumber"></xsl:with-param></xsl:apply-templates></fo:inline></fo:block>
                 </fo:table-cell>
               </fo:table-row>

最佳答案

没有你拥有的所有其他东西,使用纯 XSL FO 并且没有扩展这对我有用:

                <fo:table width="100%"  >
                    <fo:table-column column-width="50%"/>
                    <fo:table-column column-width="50%"/>
                    <fo:table-body  >
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block text-align-last="justify">     
                                    <fo:inline>Stuff</fo:inline>
                                        <fo:leader leader-pattern="dots"/>         
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block text-align-last="justify"> 
                                        <fo:leader leader-pattern="dots"  />
                                    <fo:inline>1</fo:inline></fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                    </fo:table-body>
                </fo:table>

没有空格。

针对这个问题,我有没有可能走运?再次测试,各种内容和表格列宽。我显示的内容可能是紧缩的并且有不同的长度,并且我改变了表格单元格的大小。在所有情况下都没有间隙。

我测试了其他一些东西并意识到不同之处在于格式化程序。 Apache FOP 和 Antennahouse 产生了你所展示的问题,我使用的是 RenderX XEP(我为之工作)。它不会表现出这种行为。恕我直言,如果您的格式化程序具有允许字符间和单词空间压缩以适应允许的公差的算法,则正确答案是没有空格。 Justified就是“有理有据”。

https://stackoverflow.com/questions/38503384/

相关文章:

shortcode - 如何获取联系表 7 的列表

angularjs - 如何一起使用 select2 v4.03 和 AngularJS

zend-framework - 使用 OAuth2 和 ZF3-MVC 保护 REST API

solr - Sitecore 和 SolrCloud 开启重建

amazon-web-services - 如何重启 AWS Data Pipeline

dart - Dart 中的 for-in 循环顺序

angularjs - 工厂方法总是在 AngularJs 中返回 undefined

c - 解释为什么 j 得出 150?

javascript - 如何将 "this"传递给 setTimeout 回调?

grails - 如何在grails中自定义spring security插件登录页面