1

是否可以使用 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>

概述.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>

原始.xml

<task>
<title>intro5</title>
<tbody>
<p>intro5</p>
</tbody>
</task>

开始.xml

<task>
<title>intro6</title>
<tbody>
<p>intro6</p>
</tbody>
</task>

指南.xml

<concept>
<title>intro7</title>
<conbody>
<p>intro7</p>
</conbody>
</concept>

通知.xml

<concept>
<title>intro8</title>
<conbody>
<p>intro8</p>
</conbody>
</concept>

工作流.xml

<concept>
<title>intro9</title>
<conbody>
<p>intro9</p>
</conbody>
</concept>

插件.xml

<concept>
<title>intro10</title>
<conbody>
<p>intro10</p>
</conbody>
</concept>

概述.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>

请就此向我提出建议

4

2 回答 2

1

请注意,D4P 转换仍然停留在 1.8.5 上,因为依赖于不适用于 2.x 的预处理扩展,还因为我还没有完全更新处理。

但请注意,HTML2 转换已过时,可能无法正确处理地图级分块的情况。

D4P HTML5 转换应该能正确处理它,但 HTML5 转换并不能完全替代 HTML2 转换。

于 2017-03-10T19:50:46.757 回答
0

您可以将元素的chunk属性设置为值或使用参数调用 DITA-OT 转换。<bookmap>to-content-Droot-chunk-override=to-content

于 2017-03-10T11:12:17.550 回答