【问题标题】:add new attribute on html through xslt通过 xslt 在 html 上添加新属性
【发布时间】:2020-09-11 06:28:12
【问题描述】:

假设我有一个 ditamap 文件。我已发布到 html5。发布后假设我的 html 文件看起来像

<body id="SampleTopic">
    <h1 class="title topictitle1" id="ariaid-title1">Sample topic</h1>
    <div class="body">
        <p class="p">some<strong class="ph b">bold</strong><span class="ph special">text</span></p>
        <div class="p">
            <dl class="dl">

                    <dt class="dt dlterm">Term</dt>
                    <dd class="dd">Defination</dd>

            </dl>
        </div>
    </div>
</article>

</body>

在 Html 文件中,我想在 body 元素上添加一些新属性,例如 &lt;body id="SampleTopic" class="test"&gt;

那么任何人都可以帮助我解决这个问题吗???? 我可以添加一些插件,如果可以的话如何编写代码???

【问题讨论】:

    标签: dita-ot


    【解决方案1】:

    如果您只需要 HTML @class 属性,则无需开发自定义插件。

    您只需为 DITA 源文件中的元素指定 @outputclass attribute 的值,该值将传递到输出中的 HTML @class 属性。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-03-30
      • 1970-01-01
      • 2015-12-26
      • 2015-08-15
      • 1970-01-01
      • 2022-08-18
      • 1970-01-01
      相关资源
      最近更新 更多