VirtualBox

source: vbox/trunk/src/libs/dita-ot-1.8.5/docsrc/dev_ref/topicmerge.dita@ 99507

最後變更 在這個檔案從99507是 98584,由 vboxsync 提交於 2 年 前

Docs: bugref:10302. Setting svn properties of DITA-OT library.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 2.8 KB
 
1<?xml version="1.0" encoding="utf-8"?>
2<!-- This file is part of the DITA Open Toolkit project hosted on
3 Sourceforge.net. See the accompanying license.txt file for
4 applicable licenses.-->
5 <!--
6 | (C) Copyright IBM Corporation 2005 - 2006. All Rights Reserved.
7 *-->
8<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
9 "concept.dtd">
10<concept id="topicmerge" xml:lang="en-us">
11<title>Topic merge</title>
12<conbody>
13<p>The topic merge feature improves the build speed of DITA files and reduces
14the possibility of meeting the out of memory exception in the build process.
15As illustrated in the following figure, when you run the build in previous
16releases of DITA Open Toolkit, the build speed is slow and you are likely
17to get out of memory exception.</p>
18 <fig>
19<image href="images/outofmemory.jpg" placement="break"><alt>Out of memory exception</alt>
20</image>
21</fig>
22<p>With this enhanced topic merge feature, you will be less likely to meet
23the out of memory exception error when you build output through DITA files.
24The intermediate merged file will keep the structure information in the DITA
25map, and the structured toc will be reflected in the output.</p>
26<p>To know more about this topic feature, you can write a script
27file first. DITA OT 1.3 offers a module, <codeph>TopicMerge</codeph>, that
28helps you implement this feature. You can use this module to generate the
29merged files. A sample usage of this module is as follows.</p>
30<p><lines>sample.xml:</lines><codeblock>&lt;project name="sample"&gt;
31 &lt;property name="dita.dir" value="${basedir}"/&gt;
32 &lt;import file="${dita.dir}${file.separator}build.xml"/&gt;
33
34 &lt;target name="premerge"&gt;
35 &lt;antcall target="preprocess"&gt;
36 &lt;param name="args.input" value="${input}"/&gt;
37 &lt;param name="output.dir" value="${dita.dir}${file.separator}output"/&gt;
38 &lt;/antcall&gt;
39 &lt;/target&gt;
40 &lt;target name="merge" description="Merge topics" depends="premerge"&gt;
41 &lt;basename property="temp.base" file="${input}" suffix=".ditamap"/&gt;
42 &lt;property name="temp.input" value="${basedir}${file.separator}${dita.temp.dir}${file.separator}${temp.base}"/&gt;
43 &lt;dirname property="temp.dir" file="${temp.input}"/&gt;
44 &lt;pipeline message="topicmerge" module="TopicMerge"
45 inputmap="${temp.dir}${file.separator}${temp.base}.ditamap"
46 extparam="output=${dita.dir}${file.separator}output${file.separator}${temp.base}_merged.xml;
47 style=${dita.dir}${file.separator}xsl${file.separator}pretty.xsl" /&gt;
48 &lt;/target&gt;
49&lt;/project&gt;</codeblock></p>
50 <p>Then, you need to type <codeph>ant -f sample.xml merge -Dinput="C:\DITA-OT<keyword keyref="release.version"/>\test.ditamap</codeph>"
51in the command window.<note>The path for -Dinput must be an absolute path</note></p>
52</conbody>
53</concept>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette