【问题标题】:how to remove table border line in dita?如何删除dita中的表格边框线?
【发布时间】:2018-05-29 02:43:58
【问题描述】:

我有一个关于 dita 的问题。 这是我在网上搜索的下面的dita示例。

<body>
    <table frame="topbot">
        <tgroup cols="2">
            <colspec colname="COLSPEC0" colwidth="121*" />
            <colspec colname="COLSPEC1" colwidth="76*" />
            <thead>
                <row>
                    <entry colname="COLSPEC0" valign="top">Animal</entry>
                    <entry colname="COLSPEC1" valign="top">Gestation</entry>
                </row>
            </thead>
            <tbody>
                <row>
                    <entry>Elephant (African and Asian)</entry>
                    <entry>19-22 months</entry>
                </row>
                <row>
                    <entry>Giraffe</entry>
                    <entry>15 months</entry>
                </row>
                <row>
                    <entry>Rhinoceros</entry>
                    <entry>14-16 months</entry>
                </row>
                <row>
                    <entry>Hippopotamus</entry>
                    <entry>7 1/2 months</entry>
                </row>
            </tbody>
        </tgroup>
    </table>
</body>

我期待看到没有边框线的表格,因为有属性 frame="topbot"。据我所知,该属性删除了表格上的所有边框线,仅顶线和底线除外。但结果有所有边界线。

那么,哪一部分是错的?为什么 frame="topbot" 属性不起作用?

谢谢

【问题讨论】:

  • 据我所知,这个例子没有任何问题。对此进行了测试,“topbot”在 XML 编辑器中可以正常工作(仅顶线和底线可见)。如果示例是在网页上,也许网页上的级联样式表会形成这些边框?
  • 感谢您的意见。我解决了。

标签: dita


【解决方案1】:

我解决了这个问题。

它需要 colsep="0" rowsep="0" 属性如下。

<body>
    <table frame="topbot">
        <tgroup cols="2" colsep="0" rowsep="0">
            <colspec colnum="1" colname="1" colwidth="61*"/>
            <colspec colnum="2" colname="2" colwidth="39*"/>
            <thead>
                <row rowsep="0">
                    <entry colname="1">Animal</entry>
                    <entry colname="2">Gestation</entry>
                </row>
            </thead>
            <tbody>
                <row rowsep="0">
                    <entry colname="1">Elephant (African and Asian)</entry>
                    <entry colname="2">19-22 months</entry>
                </row>
                <row rowsep="0">
                    <entry colname="1">Giraffe</entry>
                    <entry colname="2">15 months</entry>
                </row>
                <row rowsep="0">
                    <entry colname="1">Rhinoceros</entry>
                    <entry colname="2">14-16 months</entry>
                </row>
                <row rowsep="0">
                    <entry colname="1">Hippopotamus</entry>
                    <entry colname="2">7 1/2 months</entry>
                </row>
            </tbody>
        </tgroup>
    </table>
</body>

【讨论】:

  • 你知道从表格属性 xslt 中移除边框吗?
  • @WhoAmI 在 table-attr.xsl 文件中找到此代码 table__tableframe__all。在这里添加 attr set border-before-width , border-after-width, border-end-width, border-start-widthmake 这些为0pt
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-04-14
  • 1970-01-01
  • 2013-01-05
  • 1970-01-01
  • 2015-04-12
  • 2014-12-09
  • 2019-03-14
相关资源
最近更新 更多