使用简单的水平线拆分特定列

Splitting a particular column with a simple horizontal line

我正在尝试用一条简单的水平线拆分特定的列。

<fo:table>
<fo:table-body>
<fo:table-row>
    <fo:table-cell border-color="white" padding-top="5px" padding-bottom="5px"> 
    <fo:block>
    <xsl:choose>
    <xsl:when test=>
    <fo:block border-bottom-width="0.1mm" border-bottom-style="solid" border-bottom-color="black" font-weight="bold">

首先,我尝试在一个列中创建另一个 table 用于拆分数据,但它不起作用。 border-bottom inside <fo:block > 也无济于事。

该行似乎没有正确拆分列。我该怎么做。

根据我上面的评论,最好的解决方案是更改您的逻辑以应用适当的跨度。这里有一些 FO 让你思考:

        <fo:table font-size="18pt">
            <fo:table-body>
                <fo:table-row>
                    <fo:table-cell number-rows-spanned="2" border="1pt solid black" padding="3pt">
                        <fo:block>I am all in one spanned cell</fo:block>
                    </fo:table-cell>
                    <fo:table-cell  border="1pt solid black"  padding="3pt">
                        <fo:block>I am in top half of the cell</fo:block>
                    </fo:table-cell>
                    <fo:table-cell number-rows-spanned="2"  border="1pt solid black"  padding="3pt">
                        <fo:block>I am all in one spanned cell</fo:block>
                    </fo:table-cell>
                </fo:table-row>
                <fo:table-row>
                    <fo:table-cell border="1pt solid black"  padding="3pt">
                        <fo:block>I am in bottom half of the cell</fo:block>
                    </fo:table-cell>
                </fo:table-row>
            </fo:table-body>
        </fo:table>

结果是: