Diff for DITA 1.2 Specification - Building Specification Subsets

Sat, 2010-11-27 22:38 by StanDohertySun, 2010-11-28 14:07 by StanDoherty
Changes to Body
Line 1Line 1
-
<p align="center">
  
-
<strong>WORK IN PROGRESS</strong>
  
-
</p>
  
 
<h2>Background</h2>
 
<h2>Background</h2>
  +
<p>
  +
&nbsp;
  +
</p>
 
<hr />
 
<hr />
-
OASIS (soon) has released Version 1.2 of the OASIS Darwin Information Typing Architecture (DITA) specification developed by the OASIS DITA Technical Committee. Complete, OASIS-branded versions of the spceification are available for you to download at the following site:
+
OASIS is releasing Version 1.2 of the OASIS Darwin Information Typing Architecture (DITA) specification developed by the OASIS DITA Technical Committee. Complete, OASIS-branded versions of the specification are available for you to download at the following site:
 
<p>
 
<p>
 
&nbsp;
 
&nbsp;
Line 22Line 22
 
</ul>
 
</ul>
 
<p>
 
<p>
-
To build these specification subsets, you must install a build environment that is compliant with DITA Version 1.2 DTDs or schema. These DITA-compliant build environments are available as separate, downloadable packages or as components integrated with your DITA-compliant editor or content management system. For purposes of illustration, the build environment documented here consists of the following freely available, and uncustomized packages:
+
To build these specification subsets, you must install a build environment that is compliant with DITA Version 1.2 DTDs or schema. These DITA-compliant build environments are available as separate, downloadable packages or as components integrated with your DITA-compliant editor or content management system. For purposes of illustration, the build environment documented here consists of the following freely available and unmodified packages:
 
</p>
 
</p>
 
<ul>
 
<ul>
-
<li>DITA Open Toolkit (DITA-OT1.5.2_m6 available at http://sourceforge.net/projects/dita-ot/)
+
<li>DITA Open Toolkit (DITA-OT1.5.2_m7)
 
<ul>
 
<ul>
  +
<li>EclipseHelp transformation</li>
 
<li>MS HTMLHelp (.chm) transformation</li>
 
<li>MS HTMLHelp (.chm) transformation</li>
 
<li>OpenOffice Document (.odt) transformation</li>
 
<li>OpenOffice Document (.odt) transformation</li>
 
<li>PDF (Idiom) transformation</li>
 
<li>PDF (Idiom) transformation</li>
  +
<li>TOCJS transformation</li>
 
<li>XHTML transformation</li>
 
<li>XHTML transformation</li>
 
</ul>
 
</ul>
Line 37Line 39
 
<hr />
 
<hr />
 
<p>
 
<p>
-
To set up a default build environment, do the following.
+
To set up a basic build environment and to build subsets of the DITA 1.2 specification, do the following.
 
</p>
 
</p>
 
<ol>
 
<ol>
-
<li>Download and install the most current version of the DITA Open Toolkit.
+
<li>Download and install the most current version of the DITA Open Toolkit.<br />
-
<p>
+
<br />
-
http://sourceforge.net/projects/dita-ot/
+
http://sourceforge.net/projects/dita-ot/<br />
-
</p>
+
</li>
  +
<li>
 
<p>
 
<p>
 
For purposes of illustration, let's assume that you have installed the toolkit with its default folder name DITA-OT1.5.2.
 
For purposes of illustration, let's assume that you have installed the toolkit with its default folder name DITA-OT1.5.2.
Line 51Line 54
 
</p>
 
</p>
 
</li>
 
</li>
-
<li>Download the DITA Version 1.2 specification source files from the following site.
+
<li>Download the DITA Version 1.2 specification source files from the following site.<br />
  +
<br />
 
<p>
 
<p>
 
http://docs.oasis-open.org/dita/v1.2/cs01/spec/DITA1.2-spec.zip
 
http://docs.oasis-open.org/dita/v1.2/cs01/spec/DITA1.2-spec.zip
Line 57Line 61
 
</li>
 
</li>
 
<li>Unarchive these source files to a new folder at the root of the DITA Open Toolkit that you just installed.
 
<li>Unarchive these source files to a new folder at the root of the DITA Open Toolkit that you just installed.
  +
<br />
  +
<br />
 
<p>
 
<p>
-
For purposes of illustration, let's assume that you unarchive the sources into a folder named DITA-OT1.5.2\dita1.2.
+
For purposes of illustration, let's assume that you unarchive the sources into a folder named DITA-OT1.5.2/dita1.2.
 
</p>
 
</p>
 
<p>
 
<p>
Line 89Line 95
 
learningTraining_elements.ditamap<br />
 
learningTraining_elements.ditamap<br />
 
non-normative-information.ditamap<br />
 
non-normative-information.ditamap<br />
-
r-acknowledgments.dita<br />
+
r-acknowledgments.dita<br />
-
technicalContent_elements.ditamap</li>
+
technicalContent_elements.ditamap<br />
-
<li>Copy one or more of the ant build scripts documented below into this same DITA-OT1.5.2/dita1.2 folder.</li>
+
</li>
-
<li>Edit (uncomment) these ant scripts to specify which DITA 1.2 Specification map you woudl like to build as a subset.
+
<li>Copy one or more of the ant build scripts documented below into this same DITA-OT1.5.2/dita1.2 folder.<br />
  +
</li>
  +
<li>Edit (uncomment) these ant scripts to specify which DITA 1.2 Specification map you would like to build as a subset.
  +
<br />
  +
<br />
 
<ul>
 
<ul>
 
<li>Introduction (introduction.ditamap)</li>
 
<li>Introduction (introduction.ditamap)</li>
Line 100Line 110
 
<li>Non-normative Information (non-normative-information.ditamap)</li>
 
<li>Non-normative Information (non-normative-information.ditamap)</li>
 
</ul>
 
</ul>
-
</li>
  
-
<li>
  
 
</li>
 
</li>
 
<li>Run the ant build script from the DITA-OT1.5.2/dita1.2 directory.
 
<li>Run the ant build script from the DITA-OT1.5.2/dita1.2 directory.
  +
<br />
  +
<br />
 
<p>
 
<p>
 
For example, 'ant -f ant_dita1.2_subset_pdf2.xml'.
 
For example, 'ant -f ant_dita1.2_subset_pdf2.xml'.
Line 113Line 123
 
<hr />
 
<hr />
 
<p>
 
<p>
-
The DITA Version 1.2 specification is a great resource for learning about new features such as , , and many others. That said, the specification is a complex and not all specification subsets build with a default DITA-OT configuration.
+
The DITA Version 1.2 specification is a great resource for learning about new features in DITA 1.2 such as keyrefs, coderefs, map enhancements and many others.Here are the results of using the build tools documented here to build subsets of the DITA 1.2 Specification in multiple output formats.
 
</p>
 
</p>
 
<table border="0">
 
<table border="0">
Line 148Line 158
 
<td>Successful</td>
 
<td>Successful</td>
 
<td>Successful</td>
 
<td>Successful</td>
-
<td>Successful</td>
+
<td>Not supported. [2]</td>
 
<td>Not supported. [1]</td>
 
<td>Not supported. [1]</td>
 
<td>Successful</td>
 
<td>Successful</td>
Line 173Line 183
 
</tbody>
 
</tbody>
 
</table>
 
</table>
-
<h3>Notes and limitations</h3>
+
<h3><br />
  +
Notes and limitations</h3>
 
<ul>
 
<ul>
 
<li>[1] The DITA 1.2 Specification Language Reference makes extensive use of keyrefs and conrefs. The default fo-to-PDF processor in the DITA Open Toolkit runs out of memory when attempting to build the Language Reference subset. If you have purchased a commercial processor such as XEP or Antenna House, you can build a PDF for Language Reference.
 
<li>[1] The DITA 1.2 Specification Language Reference makes extensive use of keyrefs and conrefs. The default fo-to-PDF processor in the DITA Open Toolkit runs out of memory when attempting to build the Language Reference subset. If you have purchased a commercial processor such as XEP or Antenna House, you can build a PDF for Language Reference.
Line 179Line 190
 
When Java runs out of memory while building this subset, you will see the following error message.
 
When Java runs out of memory while building this subset, you will see the following error message.
 
</p>
 
</p>
  +
BUILD FAILED<br />
  +
F:\DITA-OT1.5.2_m7\dita1.2\ant_dita1.2_subset_pdf2.xml:6: The following error oc<br />
  +
curred while executing this line:<br />
  +
F:\DITA-OT1.5.2_m6\build.xml:64: The following error occurred while executing th<br />
  +
is line:<br />
  +
F:\DITA-OT1.5.2_m6\build.xml:134: java.lang.OutOfMemoryError: Java heap space<br />
  +
</li>
  +
<li>[2] The DITA 1.2 Specification Language Reference makes extensive
  +
use of keyrefs and conrefs. The default ODT processor in the DITA
  +
Open Toolkit runs out of memory when attempting to build the Language
  +
Reference subset.<br />
  +
<br />
  +
When Java runs out of memory while building this subset, you will see the following error message.<br />
  +
<br />
 
BUILD FAILED<br />
 
BUILD FAILED<br />
 
F:\DITA-OT1.5.2_m7\dita1.2\ant_dita1.2_subset_pdf2.xml:6: The following error oc<br />
 
F:\DITA-OT1.5.2_m7\dita1.2\ant_dita1.2_subset_pdf2.xml:6: The following error oc<br />
Line 185Line 210
 
is line:<br />
 
is line:<br />
 
F:\DITA-OT1.5.2_m6\build.xml:134: java.lang.OutOfMemoryError: Java heap space</li>
 
F:\DITA-OT1.5.2_m6\build.xml:134: java.lang.OutOfMemoryError: Java heap space</li>
-
<li>Note-2: TBD</li>
  
-
<li>Note-3: TBD</li>
  
-
<li>Note-4: TBD</li>
  
 
</ul>
 
</ul>
 
<h2>DITA-OT Transformations and ANT Build Scripts</h2>
 
<h2>DITA-OT Transformations and ANT Build Scripts</h2>
 
<hr />
 
<hr />
 
<p>
 
<p>
-
This section documents provides ANT build scripts that you an copy/paste into your DITA-OT1.5.2/dita1.2 folder in order to build DITA 1.2 Specification subsets for the following standard DITA-OT transformations:
+
This section documents ANT build scripts that you an copy/paste into your DITA-OT1.5.2/dita1.2 folder in order to build DITA 1.2 Specification subsets for the following standard DITA-OT transformations:
 
</p>
 
</p>
 
<ul>
 
<ul>
-
<li>Specification Subet Map/Topic</li>
  
 
<li>EclipseHelp</li>
 
<li>EclipseHelp</li>
 
<li>MS HTMLHelp</li>
 
<li>MS HTMLHelp</li>
-
<li>Open Office</li>
+
<li>Open Office Document (ODT)</li>
 
<li>PDF</li>
 
<li>PDF</li>
 
<li>TOCJS</li>
 
<li>TOCJS</li>
 
<li>XHTML</li>
 
<li>XHTML</li>
 
</ul>
 
</ul>
-
<h3>Specifying DITA 1.2 Specification Map in ANT Scripts</h3>
+
<h3>Specifying a DITA 1.2 Specification Map in ANT Scripts</h3>
 
<p>
 
<p>
-
Each of the following ANT scripts contains the following lines (or minor variation of them):
+
Each of the following ANT scripts contains the following lines (or a minor variation of them):
 
</p>
 
</p>
 
&lt;!-- //////////////////////////////////////////////////// --&gt;<br />
 
&lt;!-- //////////////////////////////////////////////////// --&gt;<br />
Line 213Line 234
 
&lt;!-- TO BUILD IT AS A SUBSET OF THE DITA 1.2 SPECIFICATION. --&gt;<br />
 
&lt;!-- TO BUILD IT AS A SUBSET OF THE DITA 1.2 SPECIFICATION. --&gt;<br />
 
&lt;!-- &lt;property name=&quot;args.input&quot; value=&quot;introduction.ditamap&quot;/&gt; --&gt;<br />
 
&lt;!-- &lt;property name=&quot;args.input&quot; value=&quot;introduction.ditamap&quot;/&gt; --&gt;<br />
-
&lt;property name=&quot;args.input&quot; value=&quot;architectural-specification.ditamap&quot;/&gt;<br />
+
<strong>&lt;property name=&quot;args.input&quot; value=&quot;architectural-specification.ditamap&quot;/&gt;</strong><br />
 
&lt;!-- &lt;property name=&quot;args.input&quot; value=&quot;language-reference.ditamap&quot;/&gt; --&gt;<br />
 
&lt;!-- &lt;property name=&quot;args.input&quot; value=&quot;language-reference.ditamap&quot;/&gt; --&gt;<br />
 
&lt;!-- &lt;property name=&quot;args.input&quot; value=&quot;conformance.dita&quot;/&gt; --&gt;<br />
 
&lt;!-- &lt;property name=&quot;args.input&quot; value=&quot;conformance.dita&quot;/&gt; --&gt;<br />
Line 219Line 240
 
&lt;!-- &lt;property name=&quot;args.input&quot; value=&quot;non-normative-information.ditamap&quot;/&gt; --&gt;<br />
 
&lt;!-- &lt;property name=&quot;args.input&quot; value=&quot;non-normative-information.ditamap&quot;/&gt; --&gt;<br />
 
<p>
 
<p>
-
To build different subsets of the specification, uncomment or re-comment the lines that call specific DITA maps. For example, in the above sample, teh DITA map for the DITA Architectural Specification (architectural-specification.ditamap) is uncommented and will build when you run an ANT script with these lines.
+
To build different subsets of the specification, uncomment or re-comment the lines that call specific DITA maps. For example, in the above sample, the DITA map for the DITA Architectural Specification (architectural-specification.ditamap) is uncommented and will build when you run an ANT script with these lines.
 
</p>
 
</p>
 
<h3>Building EclipseHelp</h3>
 
<h3>Building EclipseHelp</h3>
Line 245Line 266
 
&lt;property name=&quot;output.dir&quot;
 
&lt;property name=&quot;output.dir&quot;
 
value=&quot;out${file.separator}eclipsehelp&quot;/&gt;<br />
 
value=&quot;out${file.separator}eclipsehelp&quot;/&gt;<br />
-
&lt;property name=&quot;transtype&quot; value=&quot;eclipsehelp&quot;/&gt;<br />
+
&lt;property name=&quot;transtype&quot; value=&quot;<strong>eclipsehelp</strong>&quot;/&gt;<br />
 
&lt;/ant&gt;<br />
 
&lt;/ant&gt;<br />
 
&lt;/target&gt;<br />
 
&lt;/target&gt;<br />
Line 254Line 275
 
</p>
 
</p>
 
$ ant -f ant_dita1.2_subset_eclipsehelp.xml
 
$ ant -f ant_dita1.2_subset_eclipsehelp.xml
  +
<br />
  +
<br />
 
<p>
 
<p>
 
Review build output in DITA-OT1.5.2/dita1.2/out/eclipsehelp.
 
Review build output in DITA-OT1.5.2/dita1.2/out/eclipsehelp.
Line 280Line 303
 
&lt;!-- &lt;property name=&quot;args.input&quot; value=&quot;non-normative-information.ditamap&quot;/&gt; --&gt;<br />
 
&lt;!-- &lt;property name=&quot;args.input&quot; value=&quot;non-normative-information.ditamap&quot;/&gt; --&gt;<br />
 
&lt;property name=&quot;output.dir&quot; value=&quot;out${file.separator}htmlhelp&quot;/&gt;<br />
 
&lt;property name=&quot;output.dir&quot; value=&quot;out${file.separator}htmlhelp&quot;/&gt;<br />
-
&lt;property name=&quot;transtype&quot; value=&quot;htmlhelp&quot;/&gt;<br />
+
&lt;property name=&quot;transtype&quot; value=&quot;<strong>htmlhelp</strong>&quot;/&gt;<br />
 
&lt;/ant&gt;<br />
 
&lt;/ant&gt;<br />
 
&lt;/target&gt;<br />
 
&lt;/target&gt;<br />
Line 290Line 313
 
$ ant -f ant_dita1.2_subset_htmlhelp.xml
 
$ ant -f ant_dita1.2_subset_htmlhelp.xml
 
<p>
 
<p>
  +
<br />
 
Review build output (*.chm) in DITA-OT1.5.2/dita1.2/out/htmlhelp.
 
Review build output (*.chm) in DITA-OT1.5.2/dita1.2/out/htmlhelp.
 
</p>
 
</p>
Line 315Line 339
 
&lt;!-- &lt;property name=&quot;args.input&quot; value=&quot;non-normative-information.ditamap&quot;/&gt; --&gt;<br />
 
&lt;!-- &lt;property name=&quot;args.input&quot; value=&quot;non-normative-information.ditamap&quot;/&gt; --&gt;<br />
 
&lt;property name=&quot;output.dir&quot; value=&quot;out${file.separator}odt&quot;/&gt;<br />
 
&lt;property name=&quot;output.dir&quot; value=&quot;out${file.separator}odt&quot;/&gt;<br />
-
&lt;property name=&quot;transtype&quot; value=&quot;odt&quot;/&gt;<br />
+
&lt;property name=&quot;transtype&quot; value=&quot;<strong>odt</strong>&quot;/&gt;<br />
 
&lt;property name=&quot;outer.control&quot; value=&quot;quiet&quot;/&gt;<br />
 
&lt;property name=&quot;outer.control&quot; value=&quot;quiet&quot;/&gt;<br />
 
&lt;/ant&gt;<br />
 
&lt;/ant&gt;<br />
Line 325Line 349
 
</p>
 
</p>
 
$ ant -f ant_dita1.2_subset_odt.xml
 
$ ant -f ant_dita1.2_subset_odt.xml
  +
<br />
  +
<br />
 
<p>
 
<p>
 
Review build output in DITA-OT1.5.2/dita1.2/out/odt.
 
Review build output in DITA-OT1.5.2/dita1.2/out/odt.
Line 351Line 377
 
&lt;!-- &lt;property name=&quot;args.input&quot; value=&quot;non-normative-information.ditamap&quot;/&gt; --&gt;<br />
 
&lt;!-- &lt;property name=&quot;args.input&quot; value=&quot;non-normative-information.ditamap&quot;/&gt; --&gt;<br />
 
&lt;property name=&quot;output.dir&quot; value=&quot;out${file.separator}pdf2&quot;/&gt;<br />
 
&lt;property name=&quot;output.dir&quot; value=&quot;out${file.separator}pdf2&quot;/&gt;<br />
-
&lt;property name=&quot;transtype&quot; value=&quot;pdf2&quot;/&gt;<br />
+
&lt;property name=&quot;transtype&quot; value=&quot;<strong>pdf2</strong>&quot;/&gt;<br />
 
&lt;property name=&quot;outer.control&quot; value=&quot;quiet&quot;/&gt;<br />
 
&lt;property name=&quot;outer.control&quot; value=&quot;quiet&quot;/&gt;<br />
 
&lt;/ant&gt;<br />
 
&lt;/ant&gt;<br />
Line 361Line 387
 
</p>
 
</p>
 
$ ant -f ant_dita1.2_subset_pdf2.xml
 
$ ant -f ant_dita1.2_subset_pdf2.xml
  +
<br />
  +
<br />
 
<p>
 
<p>
 
Review build output in DITA-OT1.5.2/dita1.2/out/pdf2.
 
Review build output in DITA-OT1.5.2/dita1.2/out/pdf2.
Line 396Line 424
 
&lt;target name=&quot;sample2tocjs&quot; description=&quot;Generate tocjs javascript file&quot; depends=&quot;sample2html&quot;&gt;<br />
 
&lt;target name=&quot;sample2tocjs&quot; description=&quot;Generate tocjs javascript file&quot; depends=&quot;sample2html&quot;&gt;<br />
 
&lt;antcall target=&quot;dita2tocjs&quot;&gt;<br />
 
&lt;antcall target=&quot;dita2tocjs&quot;&gt;<br />
-
&lt;param name=&quot;transtype&quot; value=&quot;tocjs&quot;/&gt;<br />
+
&lt;param name=&quot;transtype&quot; value=&quot;<strong>tocjs</strong>&quot;/&gt;<br />
 
&lt;!-- //////////////////////////////////////////////////// --&gt;<br />
 
&lt;!-- //////////////////////////////////////////////////// --&gt;<br />
 
&lt;!-- INSTALL THIS ANT FILE AT THE ROOT OF THE SAME FOLDER --&gt;<br />
 
&lt;!-- INSTALL THIS ANT FILE AT THE ROOT OF THE SAME FOLDER --&gt;<br />
Line 427Line 455
 
</p>
 
</p>
 
$ ant -f ant_dita1.2_subset_tocjs.xml
 
$ ant -f ant_dita1.2_subset_tocjs.xml
  +
<strong>sample2tocjs</strong><br />
  +
<br />
 
<p>
 
<p>
 
Review build output (frameset.html) in DITA-OT1.5.2/dita1.2/out/tocjs.
 
Review build output (frameset.html) in DITA-OT1.5.2/dita1.2/out/tocjs.
Line 453Line 483
 
&lt;!-- &lt;property name=&quot;args.input&quot; value=&quot;non-normative-information.ditamap&quot;/&gt; --&gt;<br />
 
&lt;!-- &lt;property name=&quot;args.input&quot; value=&quot;non-normative-information.ditamap&quot;/&gt; --&gt;<br />
 
&lt;property name=&quot;output.dir&quot; value=&quot;out${file.separator}xhtml&quot;/&gt;<br />
 
&lt;property name=&quot;output.dir&quot; value=&quot;out${file.separator}xhtml&quot;/&gt;<br />
-
&lt;property name=&quot;transtype&quot; value=&quot;xhtml&quot;/&gt;<br />
+
&lt;property name=&quot;transtype&quot; value=&quot;<strong>xhtml</strong>&quot;/&gt;<br />
 
&lt;property name=&quot;outer.control&quot; value=&quot;quiet&quot;/&gt;<br />
 
&lt;property name=&quot;outer.control&quot; value=&quot;quiet&quot;/&gt;<br />
 
&lt;/ant&gt;<br />
 
&lt;/ant&gt;<br />
Line 463Line 493
 
</p>
 
</p>
 
$ ant -f ant_dita1.2_subset_xhtml.xml
 
$ ant -f ant_dita1.2_subset_xhtml.xml
  +
<br />
  +
<br />
 
<p>
 
<p>
 
Review build output (index.html) in DITA-OT1.5.2/dita1.2/out/xhtml.
 
Review build output (index.html) in DITA-OT1.5.2/dita1.2/out/xhtml.
 
</p>
 
</p>
 
<p>
 
<p>
-
Stan Doherty (Stan@modularwriting.com)
+
&nbsp;
  +
</p>
  +
<p>
  +
If you encounter difficulty building DITA 1.2 subsets using these tools, please feel free to get in touch with me.
  +
</p>
  +
<p>
  +
Stan Doherty
 
</p>
 
</p>
 
<p>
 
<p>
Line 476Line 514
 
</p>
 
</p>
 
<p>
 
<p>
-
&nbsp;
+
SDoherty@Bentley.edu 
 
</p>
 
</p>
 
 
Revision of Sun, 2010-11-28 14:07:

DITA 1.2 Specification - Building Specification Subsets

Background

 

OASIS is releasing Version 1.2 of the OASIS Darwin Information Typing Architecture (DITA) specification developed by the OASIS DITA Technical Committee. Complete, OASIS-branded versions of the specification are available for you to download at the following site:

 

http://dita.xml.org/news/dita-12-submitted-for-oasis-ballot

In its complete form, this specification consists of the following separately buildable sections, each with its own DITA map:

  • Introduction (spec/introduction.ditamap)
  • Architectural Specification (architectural-specification.ditamap)
  • Language Reference Specification (language-reference.ditamap)
  • DITA Conformance Statement (conformance.dita)
  • Non-normative Information (non-normative-information.ditamap)

To build these specification subsets, you must install a build environment that is compliant with DITA Version 1.2 DTDs or schema. These DITA-compliant build environments are available as separate, downloadable packages or as components integrated with your DITA-compliant editor or content management system. For purposes of illustration, the build environment documented here consists of the following freely available and unmodified packages:

  • DITA Open Toolkit (DITA-OT1.5.2_m7)
    • EclipseHelp transformation
    • MS HTMLHelp (.chm) transformation
    • OpenOffice Document (.odt) transformation
    • PDF (Idiom) transformation
    • TOCJS transformation
    • XHTML transformation

Basic Build Procedure

To set up a basic build environment and to build subsets of the DITA 1.2 specification, do the following.

  1. Download and install the most current version of the DITA Open Toolkit.

    http://sourceforge.net/projects/dita-ot/
  2. For purposes of illustration, let's assume that you have installed the toolkit with its default folder name DITA-OT1.5.2.

    REMINDER: Execute the command 'ant -f integrator.xml' before attempting to build any DITA specification subsets.

  3. Download the DITA Version 1.2 specification source files from the following site.

    http://docs.oasis-open.org/dita/v1.2/cs01/spec/DITA1.2-spec.zip

  4. Unarchive these source files to a new folder at the root of the DITA Open Toolkit that you just installed.

    For purposes of illustration, let's assume that you unarchive the sources into a folder named DITA-OT1.5.2/dita1.2.

    Once unarchived, that folder would contain the following:

    /archSpec
    /common
    /introduction
    /langref
    /non-normative
    /resources
    architectural-specification.ditamap
    architectural_specification.dita
    archSpec-base.dita
    archSpec-learningTraining.dita
    archSpec-technicalContent.dita
    base_elements.ditamap
    conformance.dita
    dita-1.2-specification.ditamap
    DITA1.2-spec.zip
    ditaref-commonatts.ditamap
    ditaref-ditaval.ditamap
    element-quick-reference.dita
    introduction.ditamap
    langRef-base.dita
    langRef-learningTraining.dita
    langRef-technicalContent.dita
    language-reference.ditamap
    language_reference.dita
    learningTraining_elements.ditamap
    non-normative-information.ditamap
    r-acknowledgments.dita
    technicalContent_elements.ditamap
  5. Copy one or more of the ant build scripts documented below into this same DITA-OT1.5.2/dita1.2 folder.
  6. Edit (uncomment) these ant scripts to specify which DITA 1.2 Specification map you would like to build as a subset.

    • Introduction (introduction.ditamap)
    • Architectural Specification (architectural-specification.ditamap)
    • Language Reference Specification (language-reference.ditamap)
    • DITA Conformance Statement (conformance.dita)
    • Non-normative Information (non-normative-information.ditamap)
  7. Run the ant build script from the DITA-OT1.5.2/dita1.2 directory.

    For example, 'ant -f ant_dita1.2_subset_pdf2.xml'.

  8. Review build output in DITA-OT1.5.2/dita1.2/out/*.

Basic Build Results and Notes

The DITA Version 1.2 specification is a great resource for learning about new features in DITA 1.2 such as keyrefs, coderefs, map enhancements and many others.Here are the results of using the build tools documented here to build subsets of the DITA 1.2 Specification in multiple output formats.

Specification Subet Map/Topic EclipseHelp MS HTMLHelp Open Office PDF TOCJS XHTML
introduction.ditamap Successful Successful Successful Successful Successful Successful
architectural-specification.ditamap Successful Successful Successful Successful Successful Successful
language-reference.ditamap Successful Successful Not supported. [2] Not supported. [1] Successful Successful
conformance.dita Successful Successful Successful Successful Successful Successful
non-normative-information.ditamap Successful Successful Successful Successful Successful Successful


Notes and limitations

  • [1] The DITA 1.2 Specification Language Reference makes extensive use of keyrefs and conrefs. The default fo-to-PDF processor in the DITA Open Toolkit runs out of memory when attempting to build the Language Reference subset. If you have purchased a commercial processor such as XEP or Antenna House, you can build a PDF for Language Reference.

    When Java runs out of memory while building this subset, you will see the following error message.

    BUILD FAILED
    F:\DITA-OT1.5.2_m7\dita1.2\ant_dita1.2_subset_pdf2.xml:6: The following error oc
    curred while executing this line:
    F:\DITA-OT1.5.2_m6\build.xml:64: The following error occurred while executing th
    is line:
    F:\DITA-OT1.5.2_m6\build.xml:134: java.lang.OutOfMemoryError: Java heap space
  • [2] The DITA 1.2 Specification Language Reference makes extensive use of keyrefs and conrefs. The default ODT processor in the DITA Open Toolkit runs out of memory when attempting to build the Language Reference subset.

    When Java runs out of memory while building this subset, you will see the following error message.

    BUILD FAILED
    F:\DITA-OT1.5.2_m7\dita1.2\ant_dita1.2_subset_pdf2.xml:6: The following error oc
    curred while executing this line:
    F:\DITA-OT1.5.2_m6\build.xml:64: The following error occurred while executing th
    is line:
    F:\DITA-OT1.5.2_m6\build.xml:134: java.lang.OutOfMemoryError: Java heap space

DITA-OT Transformations and ANT Build Scripts

This section documents ANT build scripts that you an copy/paste into your DITA-OT1.5.2/dita1.2 folder in order to build DITA 1.2 Specification subsets for the following standard DITA-OT transformations:

  • EclipseHelp
  • MS HTMLHelp
  • Open Office Document (ODT)
  • PDF
  • TOCJS
  • XHTML

Specifying a DITA 1.2 Specification Map in ANT Scripts

Each of the following ANT scripts contains the following lines (or a minor variation of them):

<!-- //////////////////////////////////////////////////// -->
<!-- INSTALL THIS ANT FILE AT THE ROOT OF THE SAME FOLDER -->
<!-- THAT CONTAINS THE DITA1.2 SOURCE FILES. -->
<!-- UNCOMMENT ONE OR MORE OF THE FOLLOWING DITA MAPS -->
<!-- TO BUILD IT AS A SUBSET OF THE DITA 1.2 SPECIFICATION. -->
<!-- <property name="args.input" value="introduction.ditamap"/> -->
<property name="args.input" value="architectural-specification.ditamap"/>
<!-- <property name="args.input" value="language-reference.ditamap"/> -->
<!-- <property name="args.input" value="conformance.dita"/> -->
<!-- <property name="args.input" value="r-acknowledgments.dita"/> -->
<!-- <property name="args.input" value="non-normative-information.ditamap"/> -->

To build different subsets of the specification, uncomment or re-comment the lines that call specific DITA maps. For example, in the above sample, the DITA map for the DITA Architectural Specification (architectural-specification.ditamap) is uncommented and will build when you run an ANT script with these lines.

Building EclipseHelp

To build one or more DITA 1.2 Specification subsets for EclipseHelp, copy the following text into a file named ant_dita1.2_subset_eclipsehelp.xml and save that file to the DITA-OT1.5.2/dita1.2 directory.

<?xml version="1.0" encoding="UTF-8" ?>
<project name="sample_eclipsehelp" default="sample2eclipsehelp" basedir=".">
<property name="dita.dir" value="${basedir}${file.separator}..${file.separator}..${file.separator}DITA-OT1.5.2_m6"/>
<import file="${dita.dir}${file.separator}integrator.xml"/>
<target name="sample2eclipsehelp" depends="integrate">
<ant antfile="${dita.dir}${file.separator}build.xml" target="init">
<!-- //////////////////////////////////////////////////// -->
<!-- INSTALL THIS ANT FILE AT THE ROOT OF THE SAME FOLDER -->
<!-- THAT CONTAINS THE DITA1.2 SOURCE FILES. -->
<!-- UNCOMMENT ONE OR MORE OF THE FOLLOWING DITA MAPS -->
<!-- TO BUILD IT AS A SUBSET OF THE DITA 1.2 SPECIFICATION. -->
<!-- <property name="args.input" value="introduction.ditamap"/> -->
<property name="args.input" value="architectural-specification.ditamap"/>
<!-- <property name="args.input" value="language-reference.ditamap"/> -->
<!-- <property name="args.input" value="conformance.dita"/> -->
<!-- <property name="args.input" value="r-acknowledgments.dita"/> -->
<!-- <property name="args.input" value="non-normative-information.ditamap"/> -->
<property name="output.dir" value="out${file.separator}eclipsehelp"/>
<property name="transtype" value="eclipsehelp"/>
</ant>
</target>
</project>

CD to the DITA-OT1.5.2/dita1.2 subdirectory and run the following command.

$ ant -f ant_dita1.2_subset_eclipsehelp.xml

Review build output in DITA-OT1.5.2/dita1.2/out/eclipsehelp.

Building Microsoft HTMLHelp

To build one or more DITA 1.2 Specification subsets for Microsoft HTMLHelp, copy the following text into a file named ant_dita1.2_subset_htmlhelp.xml and save that file to the DITA-OT1.5.2/dita1.2 directory.

<?xml version="1.0" encoding="UTF-8" ?>
<project name="dita1.2_subsets_htmlhelp" default="sample2htmlhelp" basedir=".">
<property name="dita.dir" value="${basedir}${file.separator}..${file.separator}..${file.separator}DITA-OT1.5.2_m6"/>
<import file="${dita.dir}${file.separator}integrator.xml"/>
<target name="sample2htmlhelp" depends="integrate">
<ant antfile="${dita.dir}${file.separator}build.xml" target="init">
<!-- //////////////////////////////////////////////////// -->
<!-- INSTALL THIS ANT FILE AT THE ROOT OF THE SAME FOLDER -->
<!-- THAT CONTAINS THE DITA1.2 SOURCE FILES. -->
<!-- UNCOMMENT ONE OR MORE OF THE FOLLOWING DITA MAPS -->
<!-- TO BUILD IT AS A SUBSET OF THE DITA 1.2 SPECIFICATION. -->
<!-- <property name="args.input" value="introduction.ditamap"/> -->
<property name="args.input" value="architectural-specification.ditamap"/>
<!-- <property name="args.input" value="language-reference.ditamap"/> -->
<!-- <property name="args.input" value="conformance.dita"/> -->
<!-- <property name="args.input" value="r-acknowledgments.dita"/> -->
<!-- <property name="args.input" value="non-normative-information.ditamap"/> -->
<property name="output.dir" value="out${file.separator}htmlhelp"/>
<property name="transtype" value="htmlhelp"/>
</ant>
</target>
</project>

CD to the DITA-OT1.5.2/dita1.2 subdirectory and run the following command.

$ ant -f ant_dita1.2_subset_htmlhelp.xml


Review build output (*.chm) in DITA-OT1.5.2/dita1.2/out/htmlhelp.

Building Open Office

To build one or more DITA 1.2 Specification subsets for Open Office (ODT), copy the following text into a file named ant_dita1.2_subset_odt.xml and save that file to the DITA-OT1.5.2/dita1.2 directory.

<?xml version="1.0" encoding="UTF-8" ?>
<project name="sample_odt" default="sample2odt" basedir=".">
<property name="dita.dir" value="${basedir}${file.separator}..${file.separator}..${file.separator}DITA-OT1.5.2_m6"/>
<import file="${dita.dir}${file.separator}integrator.xml"/>
<target name="sample2odt" depends="integrate">
<ant antfile="${dita.dir}${file.separator}build.xml" target="init">
<!-- //////////////////////////////////////////////////// -->
<!-- INSTALL THIS ANT FILE AT THE ROOT OF THE SAME FOLDER -->
<!-- THAT CONTAINS THE DITA1.2 SOURCE FILES. -->
<!-- UNCOMMENT ONE OR MORE OF THE FOLLOWING DITA MAPS -->
<!-- TO BUILD IT AS A SUBSET OF THE DITA 1.2 SPECIFICATION. -->
<!-- <property name="args.input" value="introduction.ditamap"/> -->
<property name="args.input" value="architectural-specification.ditamap"/>
<!-- <property name="args.input" value="language-reference.ditamap"/> -->
<!-- <property name="args.input" value="conformance.dita"/> -->
<!-- <property name="args.input" value="r-acknowledgments.dita"/> -->
<!-- <property name="args.input" value="non-normative-information.ditamap"/> -->
<property name="output.dir" value="out${file.separator}odt"/>
<property name="transtype" value="odt"/>
<property name="outer.control" value="quiet"/>
</ant>
</target>
</project>

CD to the DITA-OT1.5.2/dita1.2 subdirectory and run the following command.

$ ant -f ant_dita1.2_subset_odt.xml

Review build output in DITA-OT1.5.2/dita1.2/out/odt.

Building PDF

To build one or more DITA 1.2 Specification subsets for PDF, copy the following text into a file named ant_dita1.2_subset_pdf2.xml and save that file to the DITA-OT1.5.2/dita1.2 directory.

<?xml version="1.0" encoding="UTF-8" ?>
<project name="dita1.2_subsets_pdf" default="sample2pdf2" basedir=".">
<property name="dita.dir" value="${basedir}${file.separator}..${file.separator}..${file.separator}DITA-OT1.5.2_m6"/>
<import file="${dita.dir}${file.separator}integrator.xml"/>
<target name="sample2pdf2" depends="integrate">
<ant antfile="${dita.dir}${file.separator}build.xml" target="init">
<!-- //////////////////////////////////////////////////// -->
<!-- INSTALL THIS ANT FILE AT THE ROOT OF THE SAME FOLDER -->
<!-- THAT CONTAINS THE DITA1.2 SOURCE FILES. -->
<!-- UNCOMMENT ONE OR MORE OF THE FOLLOWING DITA MAPS -->
<!-- TO BUILD IT AS A SUBSET OF THE DITA 1.2 SPECIFICATION. -->
<!-- <property name="args.input" value="introduction.ditamap"/> -->
<property name="args.input" value="architectural-specification.ditamap"/>
<!-- <property name="args.input" value="language-reference.ditamap"/> -->
<!-- <property name="args.input" value="conformance.dita"/> -->
<!-- <property name="args.input" value="r-acknowledgments.dita"/> -->
<!-- <property name="args.input" value="non-normative-information.ditamap"/> -->
<property name="output.dir" value="out${file.separator}pdf2"/>
<property name="transtype" value="pdf2"/>
<property name="outer.control" value="quiet"/>
</ant>
</target>
</project>

CD to the DITA-OT1.5.2/dita1.2 subdirectory and run the following command.

$ ant -f ant_dita1.2_subset_pdf2.xml

Review build output in DITA-OT1.5.2/dita1.2/out/pdf2.

Building TOCJS

To build one or more DITA 1.2 Specification subsets for TOCJS, copy the following text into a file named ant_dita1.2_subset_tocjs.xml and save that file to the DITA-OT1.5.2/dita1.2 directory.

<?xml version="1.0" encoding="UTF-8" ?>
<project name="docondoc" default="all">
<import file="..${file.separator}conductor.xml"/>
<property name="dita.extname" value=".xml"/>
<property name="content.frame" value="contentwin"/>
<target name="sample2html" depends="use-init">
<antcall target="dita2xhtml">
<!-- //////////////////////////////////////////////////// -->
<!-- INSTALL THIS ANT FILE AT THE ROOT OF THE SAME FOLDER -->
<!-- THAT CONTAINS THE DITA1.2 SOURCE FILES. -->
<!-- UNCOMMENT ONE OR MORE OF THE FOLLOWING DITA MAPS -->
<!-- TO BUILD IT AS A SUBSET OF THE DITA 1.2 SPECIFICATION. -->
<!-- <param name="args.input" value="introduction.ditamap"/> -->
<param name="args.input" value="architectural-specification.ditamap"/>
<!-- <param name="args.input" value="language-reference.ditamap"/> -->
<!-- <param name="args.input" value="conformance.dita"/> -->
<!-- <param name="args.input" value="r-acknowledgments.dita"/> -->
<!-- <param name="args.input" value="non-normative-information.ditamap"/> -->
<param name="output.dir" value="out${file.separator}tocjs"/>
<param name="args.css" value="..${file.separator}demo${file.separator}tocjs${file.separator}sample${file.separator}basefiles${file.separator}sample.css"/>
<param name="args.copycss" value="yes"/>
</antcall>
<copy overwrite="true" file="..${file.separator}demo${file.separator}tocjs${file.separator}sample${file.separator}basefiles${file.separator}frameset.html" tofile="out${file.separator}tocjs${file.separator}frameset.html"/>
</target>
<target name="sample2tocjs" description="Generate tocjs javascript file" depends="sample2html">
<antcall target="dita2tocjs">
<param name="transtype" value="tocjs"/>
<!-- //////////////////////////////////////////////////// -->
<!-- INSTALL THIS ANT FILE AT THE ROOT OF THE SAME FOLDER -->
<!-- THAT CONTAINS THE DITA1.2 SOURCE FILES. -->
<!-- UNCOMMENT ONE OR MORE OF THE FOLLOWING DITA MAPS -->
<!-- TO BUILD IT AS A SUBSET OF THE DITA 1.2 SPECIFICATION. -->
<!-- <param name="args.input" value="introduction.ditamap"/> -->
<param name="args.input" value="architectural-specification.ditamap"/>
<!-- <param name="args.input" value="language-reference.ditamap"/> -->
<!-- <param name="args.input" value="conformance.dita"/> -->
<!-- <param name="args.input" value="r-acknowledgments.dita"/> -->
<!-- <param name="args.input" value="non-normative-information.ditamap"/> -->
<param name="output.file" value="out${file.separator}tocjs${file.separator}toctree.js"/>
</antcall>
<copy todir="out${file.separator}tocjs">
<fileset dir="${dita.dir}${file.separator}demo${file.separator}tocjs${file.separator}basefiles">
<include name="**/*"/>
</fileset>
</copy>
</target>
<target name="sampleclean" description="clean tocjs sample output">
<delete dir="${dita.dir}${file.separator}demo${file.separator}tocjs${file.separator}out"/>
</target>
</project>

CD to the DITA-OT1.5.2/dita1.2 subdirectory and run the following command.

$ ant -f ant_dita1.2_subset_tocjs.xml sample2tocjs

Review build output (frameset.html) in DITA-OT1.5.2/dita1.2/out/tocjs.

Building XHTML

To build one or more DITA 1.2 Specification subsets for XHTML, copy the following text into a file named ant_dita1.2_subset_xhtml.xml and save that file to the DITA-OT1.5.2/dita1.2 directory.

<?xml version="1.0" encoding="UTF-8" ?>
<project name="sample_xhtml" default="sample2xhtml" basedir=".">
<property name="dita.dir" value="${basedir}${file.separator}..${file.separator}..${file.separator}DITA-OT1.5.2_m6"/>
<import file="${dita.dir}${file.separator}integrator.xml"/>
<target name="sample2xhtml" depends="integrate">
<ant antfile="${dita.dir}${file.separator}build.xml" target="init">
<!-- //////////////////////////////////////////////////// -->
<!-- INSTALL THIS ANT FILE AT THE ROOT OF THE SAME FOLDER -->
<!-- THAT CONTAINS THE DITA1.2 SOURCE FILES. -->
<!-- UNCOMMENT ONE OR MORE OF THE FOLLOWING DITA MAPS -->
<!-- TO BUILD IT AS A SUBSET OF THE DITA 1.2 SPECIFICATION. -->
<!-- <property name="args.input" value="introduction.ditamap"/> -->
<property name="args.input" value="architectural-specification.ditamap"/>
<!-- <property name="args.input" value="language-reference.ditamap"/> -->
<!-- <property name="args.input" value="conformance.dita"/> -->
<!-- <property name="args.input" value="r-acknowledgments.dita"/> -->
<!-- <property name="args.input" value="non-normative-information.ditamap"/> -->
<property name="output.dir" value="out${file.separator}xhtml"/>
<property name="transtype" value="xhtml"/>
<property name="outer.control" value="quiet"/>
</ant>
</target>
</project>

CD to the DITA-OT1.5.2/dita1.2 subdirectory and run the following command.

$ ant -f ant_dita1.2_subset_xhtml.xml

Review build output (index.html) in DITA-OT1.5.2/dita1.2/out/xhtml.

 

If you encounter difficulty building DITA 1.2 subsets using these tools, please feel free to get in touch with me.

Stan Doherty

OASIS DITA Technical Committee

stan@modularwriting.com

SDoherty@Bentley.edu 

XML.org Focus Areas: BPEL | DITA | ebXML | IDtrust | OpenDocument | SAML | UBL | UDDI
OASIS sites: OASIS | Cover Pages | XML.org | AMQP | CGM Open | eGov | Emergency | IDtrust | LegalXML | Open CSA | OSLC | WS-I