【问题标题】:Need to combine 4 xml file into a single xhtml using XSLT需要使用 XSLT 将 4 个 xml 文件组合成一个 xhtml
【发布时间】:2017-06-23 01:18:30
【问题描述】:

我有 4 个 xml 文件,我需要使用 Oxygen 中的 XSLT 转换将其组合为单个 XHTML 文件格式。

我的 first.xml 文件:

<task>
<title>intro1</title>
<tbody>
<p>intro1</p>
</tbody>
</task>

我的 Second.xml 文件:

<task>
<title>intro2</title>
<tbody>
<p>intro2</p>
</tbody>
</task>

我的第三个.xml 文件:

<task>
<title>intro3</title>
<tbody>
<p>intro3</p>
</tbody>
</task>

我的第四个.xml 文件:

<task>
<title>intro4</title>
<tbody>
<p>intro4</p>
</tbody>
</task>

我使用了ditamap:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "com.rsicms.rsuite_te:doctypes:dita:map" "map.dtd">
<map>
 <title>This is a test DITA Map</title>
 <topicref href="first.xml"/>
 <topicref href="second.xml"/>
 <topicref href="third.xml"/>
 <topicref href="fourth.xml"/>
</map>

XSL 用作:

我在 Dita OT 1.8.5 中使用插件“org.dita.xhtml”。使用此插件进行转换时,我将输出作为四个不同的 html 文件,但我需要作为单个 html 文件。

请帮助我,在此先感谢

【问题讨论】:

    标签: xml xslt dita oxygenxml dita-ot


    【解决方案1】:

    可以设置属性

    chunk="to-content"

    在 DITA Map 根元素上。它应该创建一个包含所有合并主题的 HTML 文档。

    【讨论】:

    • 感谢您的宝贵时间,我们得到了所需的输出
    • 有没有其他方法可以合并文件,请给我建议
    • 因为 html2 插件没有生成合并的主题文件
    • 这取决于你在哪个元素中插入了块属性。如果您将 topicrefs 放在 topicgroup 元素中并将 chunk 属性添加到 topicgroup 元素,那么它应该可以工作。
    • @Ben 我已经添加到我在上面使用 org.dita.xhtml 插件创建合并主题文件但使用 org.dita4publishers.html2 的问题中添加的dita映射文件中的映射标记插件没有生成,请给我建议
    猜你喜欢
    • 2012-04-21
    • 1970-01-01
    • 2019-04-11
    • 1970-01-01
    • 2023-01-27
    • 2013-10-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多