使用 org.dita4publishers.html2 插件将所有概念、章节和 tpoicref 合并为一个 html
Merging all concepts , chapters and tpoicref's in to single into a single html using org.dita4publishers.html2 plugin
是否可以使用 org.dita4publishers.html2 插件
将所有 topicref 的概念、章节放入单个 html 文件中
我的 ditamap 或 xml 文件是这样的
<?xml version="1.0" encoding="UTF-8"?>
<bookmap>
<title class="- topic/title ">Workflow</title>
<frontmatter class="- map/topicref bookmap/frontmatter ">
<preface class="- map/topicref bookmap/preface " href="concept/guide.xml"/>
<preface class="- map/topicref bookmap/preface " href="concept/notices.xml"/>
<booklists class="- map/topicref bookmap/booklists ">
<toc class="- map/topicref bookmap/toc "/>
<tablelist class="- map/topicref bookmap/tablelist "/>
</booklists>
</frontmatter>
<chapter class="- map/topicref bookmap/chapter " href="concept/workflow.xml"/>
<chapter class="- map/topicref bookmap/chapter " href="concept/plug.xml"/>
<chapter class="- map/topicref bookmap/chapter " href="task/deve.xml"/>
<chapter class="- map/topicref bookmap/chapter " href="concept/overview.xml">
<topicref class="- map/topicref " href="task/existing.xml"/>
<topicref class="- map/topicref " href="task/Edit.xml"/>
<topicref class="- map/topicref " href="task/original.xml"/>
</chapter>
<chapter class="- map/topicref bookmap/chapter " href="task/Start.xml"/>
</bookmap>
ditamap 引用文件
Start.xml
<task>
<title>intro1</title>
<tbody>
<p>intro1</p>
</tbody>
</task>
overview.xml
<task>
<title>intro2</title>
<tbody>
<p>intro2</p>
</tbody>
</task>
existing.xml
<task>
<title>intro3</title>
<tbody>
<p>intro3</p>
</tbody>
</task>
Edit.xml
<task>
<title>intro4</title>
<tbody>
<p>intro4</p>
</tbody>
</task>
original.xml
<task>
<title>intro5</title>
<tbody>
<p>intro5</p>
</tbody>
</task>
Start.xml
<task>
<title>intro6</title>
<tbody>
<p>intro6</p>
</tbody>
</task>
guide.xml
<concept>
<title>intro7</title>
<conbody>
<p>intro7</p>
</conbody>
</concept>
notices.xml
<concept>
<title>intro8</title>
<conbody>
<p>intro8</p>
</conbody>
</concept>
workflow.xml
<concept>
<title>intro9</title>
<conbody>
<p>intro9</p>
</conbody>
</concept>
plug.xml
<concept>
<title>intro10</title>
<conbody>
<p>intro10</p>
</conbody>
</concept>
overview.xml
<concept>
<title>intro11</title>
<conbody>
<p>intro11</p>
</conbody>
</concept>
使用 org.dita4publishers.html2 插件
将这些所有文件合并为单个 html 文件,如下所示
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns:df="http://dita2indesign.org/dita/functions" xml:lang="en-us" lang="en-us">
<head>
<link rel="stylesheet" type="text/css" href="css/topic.css"></link>
</head>
<body id="topicid">
<div class="topic">
<h1>intro7</h1>
<p>intro7</p>
</div>
<div class="topic">
<h1>intro8</h1>
<p>intro8</p>
</div>
<div class="topic">
<h1>intro9</h1>
<p>intro9</p>
</div>
<div class="topic">
<h1>intro8</h1>
<p>intro8</p>
</div>
<div class="topic">
<h1>intro10</h1>
<p>intro10</p>
</div>
<div class="topic">
<h1>intro8</h1>
<p>intro8</p>
</div>
</body>
</html>
请就此提出建议
您可以将 <bookmap>
元素的 chunk
属性设置为值 to-content
或使用参数 -Droot-chunk-override=to-content
调用 DITA-OT 转换。
请注意,D4P 转换仍然卡在 1.8.5 上,因为依赖于不适用于 2.x 的预处理扩展,而且我还没有完全更新处理。
但请注意,HTML2 转换已过时,可能无法正确处理地图级分块的情况。
D4P HTML5 转换应该可以正确处理它,但是 HTML5 转换并不是 HTML2 转换的替代品。
是否可以使用 org.dita4publishers.html2 插件
将所有 topicref 的概念、章节放入单个 html 文件中我的 ditamap 或 xml 文件是这样的
<?xml version="1.0" encoding="UTF-8"?>
<bookmap>
<title class="- topic/title ">Workflow</title>
<frontmatter class="- map/topicref bookmap/frontmatter ">
<preface class="- map/topicref bookmap/preface " href="concept/guide.xml"/>
<preface class="- map/topicref bookmap/preface " href="concept/notices.xml"/>
<booklists class="- map/topicref bookmap/booklists ">
<toc class="- map/topicref bookmap/toc "/>
<tablelist class="- map/topicref bookmap/tablelist "/>
</booklists>
</frontmatter>
<chapter class="- map/topicref bookmap/chapter " href="concept/workflow.xml"/>
<chapter class="- map/topicref bookmap/chapter " href="concept/plug.xml"/>
<chapter class="- map/topicref bookmap/chapter " href="task/deve.xml"/>
<chapter class="- map/topicref bookmap/chapter " href="concept/overview.xml">
<topicref class="- map/topicref " href="task/existing.xml"/>
<topicref class="- map/topicref " href="task/Edit.xml"/>
<topicref class="- map/topicref " href="task/original.xml"/>
</chapter>
<chapter class="- map/topicref bookmap/chapter " href="task/Start.xml"/>
</bookmap>
ditamap 引用文件 Start.xml
<task>
<title>intro1</title>
<tbody>
<p>intro1</p>
</tbody>
</task>
overview.xml
<task>
<title>intro2</title>
<tbody>
<p>intro2</p>
</tbody>
</task>
existing.xml
<task>
<title>intro3</title>
<tbody>
<p>intro3</p>
</tbody>
</task>
Edit.xml
<task>
<title>intro4</title>
<tbody>
<p>intro4</p>
</tbody>
</task>
original.xml
<task>
<title>intro5</title>
<tbody>
<p>intro5</p>
</tbody>
</task>
Start.xml
<task>
<title>intro6</title>
<tbody>
<p>intro6</p>
</tbody>
</task>
guide.xml
<concept>
<title>intro7</title>
<conbody>
<p>intro7</p>
</conbody>
</concept>
notices.xml
<concept>
<title>intro8</title>
<conbody>
<p>intro8</p>
</conbody>
</concept>
workflow.xml
<concept>
<title>intro9</title>
<conbody>
<p>intro9</p>
</conbody>
</concept>
plug.xml
<concept>
<title>intro10</title>
<conbody>
<p>intro10</p>
</conbody>
</concept>
overview.xml
<concept>
<title>intro11</title>
<conbody>
<p>intro11</p>
</conbody>
</concept>
使用 org.dita4publishers.html2 插件
将这些所有文件合并为单个 html 文件,如下所示<?xml version="1.0" encoding="UTF-8"?>
<html xmlns:df="http://dita2indesign.org/dita/functions" xml:lang="en-us" lang="en-us">
<head>
<link rel="stylesheet" type="text/css" href="css/topic.css"></link>
</head>
<body id="topicid">
<div class="topic">
<h1>intro7</h1>
<p>intro7</p>
</div>
<div class="topic">
<h1>intro8</h1>
<p>intro8</p>
</div>
<div class="topic">
<h1>intro9</h1>
<p>intro9</p>
</div>
<div class="topic">
<h1>intro8</h1>
<p>intro8</p>
</div>
<div class="topic">
<h1>intro10</h1>
<p>intro10</p>
</div>
<div class="topic">
<h1>intro8</h1>
<p>intro8</p>
</div>
</body>
</html>
请就此提出建议
您可以将 <bookmap>
元素的 chunk
属性设置为值 to-content
或使用参数 -Droot-chunk-override=to-content
调用 DITA-OT 转换。
请注意,D4P 转换仍然卡在 1.8.5 上,因为依赖于不适用于 2.x 的预处理扩展,而且我还没有完全更新处理。
但请注意,HTML2 转换已过时,可能无法正确处理地图级分块的情况。
D4P HTML5 转换应该可以正确处理它,但是 HTML5 转换并不是 HTML2 转换的替代品。