需要使用XSLT将4 xml文件合并到单个xhtml中

时间:2017-02-06 07:01:44

标签: xml xslt dita oxygenxml dita-ot

我有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>

我的第三个文件:

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

我的第四个文件:

<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文件。

请帮助我,谢谢你提前

1 个答案:

答案 0 :(得分:4)

您可以设置属性

  

块=&#34;对内容&#34;

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