表中的文本总是用XSLT加粗

时间:2014-07-10 10:55:42

标签: html xml xslt html-table

我有一个XML和一个XSLT文件。 这是我的XML结构:

<bibliography>
    <element>
        <anotherelement>
            Some text and <italic>italic Text</italic> and <bold>bold text</bold>
        </anotherelement>
    </element>
    ...
</bibliography>

XML的输出结构是正确的,但不知何故,表格中的所有内容都是粗体。我该如何解决这个问题,只有<bold>标签的元素是粗体,其余部分是否正常?

这是没有表格时文本的样子: enter image description here 桌子突然看起来像这样: enter image description here

1 个答案:

答案 0 :(得分:2)

不要将所有内容都放在th元素中,使用td表示数据。当然,使用适当的HTML表格嵌套<table><tbody><tr><td>...</td></tr><!-- more tr rows here --></tbody></table>

相关问题