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 spceification are available for you to download at the following site:

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

Organizationally, the DITA 1.2 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)
Functionally, the spec focuses on two principal areas:
  • Base elements and technical communication elements
  • Learning and training elements

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_std available at http://sourceforge.net/projects/dita-ot/)
    • EclipseHelp transformation
    • MS HTMLHelp (.chm) transformation
    • OpenOffice Document (.odt) transformation
    • PDF (Idiom) transformation
    • TOCJS transformation
    • XHTML transformation

Basic Build Procedure

To set up a default build environment, do the following.

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

    http://sourceforge.net/projects/dita-ot/

    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.

  2. 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

  3. 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
  4. Copy one or more of the ant build scripts documented below into this same DITA-OT1.5.2/dita1.2 folder.
  5. Edit (uncomment) these ant scripts to specify which DITA 1.2 Specification map(s) you would like to build as a subset.
  6. Run the ant build script from the DITA-OT1.5.2/dita1.2 directory.


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

  7. 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 such as , , and many others. That said, the specification is a complex and not all specification subsets build with a default DITA-OT configuration.

Specification Subset 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
Base DITA + TechComm Successful Successful Not supported. [2] Not supported. [1] Successful Successful
Learning and Training 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\dita1.2\ant_dita1.2_subset_pdf2.xml:6: The following error occurred while executing this line: F:\DITA-OT1.5.2\build.xml:64: The following error occurred while executing th is line: F:\DITA-OT1.5.2\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\dita1.2\ant_dita1.2_subset_odt.xml:6: The following error occurred while executing this line:
    F:\DITA-OT1.5.2\build.xml:64: The following error occurred while executing th is line:
    F:\DITA-OT1.5.2\build.xml:134: java.lang.OutOfMemoryError: Java heap space

DITA-OT Transformations and ANT Build Scripts

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:

  • Specification Subet Map/Topic
  • EclipseHelp
  • MS HTMLHelp
  • Open Office
  • PDF
  • TOCJS
  • XHTML

Specifying DITA 1.2 Specification Map in ANT Scripts

Each of the following ANT scripts contains the following lines (or 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 MAP REFERENCES TO BUILD -->
<!-- ORGANIZATIONAL SUBSETS (e.g. Architecture, Language Reference). -->
<!-- <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"/> -->
<!-- //////////////////////////////////////////////////// -->
<!-- UNCOMMENT ALL OF THE FOLLOWING DITA MAP REFERENCES TO BUILD -->
<!-- THE BASE DITA SPECIFICATION: -->
<!-- * Base architecture -->
<!-- <property name="args.input" value="archSpec/archspec.ditamap"/> -->
<!-- * Technical communication architecture -->
<!-- <property name="args.input" value="archSpec/archSpec-technicalContent.ditamap"/> -->
<!-- * Base language reference -->
<!-- <property name="args.input" value="base_elements.ditamap"/> -->
<!-- * Technical communication reference -->
<!-- <property name="args.input" value="technicalContent_elements.ditamap"/> -->
<!-- //////////////////////////////////////////////////// -->
<!-- UNCOMMENT ALL OF THE FOLLOWING DITA MAP REFERENCES TO BUILD -->
<!-- THE LEARNING AND TRAINING SPECIFICATION: -->
<!-- * Learning and Training Architecture -->
<!-- <property name="args.input" value="archSpec/archSpec-learningTraining.ditamap"/> -->
<!-- * Learning and Training Language reference -->
<!-- <property name="args.input" value="learningTraining_elements.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, 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.

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 MAP REFERENCES TO BUILD -->
<!-- ORGANIZATIONAL SUBSETS (e.g. Architecture, Language Reference). -->
<!-- <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"/> -->
<!-- //////////////////////////////////////////////////// -->
<!-- UNCOMMENT ALL OF THE FOLLOWING DITA MAP REFERENCES TO BUILD -->
<!-- THE BASE DITA SPECIFICATION: -->
<!-- * Base architecture -->
<!-- <property name="args.input" value="archSpec/archspec.ditamap"/> -->
<!-- * Technical communication architecture -->
<!-- <property name="args.input" value="archSpec/archSpec-technicalContent.ditamap"/> -->
<!-- * Base language reference -->
<!-- <property name="args.input" value="base_elements.ditamap"/> -->
<!-- * Technical communication reference -->
<!-- <property name="args.input" value="technicalContent_elements.ditamap"/> -->
<!-- //////////////////////////////////////////////////// -->
<!-- UNCOMMENT ALL OF THE FOLLOWING DITA MAP REFERENCES TO BUILD -->
<!-- THE LEARNING AND TRAINING SPECIFICATION: -->
<!-- * Learning and Training Architecture -->
<!-- <property name="args.input" value="archSpec/archSpec-learningTraining.ditamap"/> -->
<!-- * Learning and Training Language reference -->
<!-- <property name="args.input" value="learningTraining_elements.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 MAP REFERENCES TO BUILD -->
<!-- ORGANIZATIONAL SUBSETS (e.g. Architecture, Language Reference). -->
<!-- <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"/> -->
<!-- //////////////////////////////////////////////////// -->
<!-- UNCOMMENT ALL OF THE FOLLOWING DITA MAP REFERENCES TO BUILD -->
<!-- THE BASE DITA SPECIFICATION: -->
<!-- * Base architecture -->
<!-- <property name="args.input" value="archSpec/archspec.ditamap"/> -->
<!-- * Technical communication architecture -->
<!-- <property name="args.input" value="archSpec/archSpec-technicalContent.ditamap"/> -->
<!-- * Base language reference -->
<!-- <property name="args.input" value="base_elements.ditamap"/> -->
<!-- * Technical communication reference -->
<!-- <property name="args.input" value="technicalContent_elements.ditamap"/> -->
<!-- //////////////////////////////////////////////////// -->
<!-- UNCOMMENT ALL OF THE FOLLOWING DITA MAP REFERENCES TO BUILD -->
<!-- THE LEARNING AND TRAINING SPECIFICATION: -->
<!-- * Learning and Training Architecture -->
<!-- <property name="args.input" value="archSpec/archSpec-learningTraining.ditamap"/> -->
<!-- * Learning and Training Language reference -->
<!-- <property name="args.input" value="learningTraining_elements.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 (odt)

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 MAP REFERENCES TO BUILD -->
<!-- ORGANIZATIONAL SUBSETS (e.g. Architecture, Language Reference). -->
<!-- <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"/> -->
<!-- //////////////////////////////////////////////////// -->
<!-- UNCOMMENT ALL OF THE FOLLOWING DITA MAP REFERENCES TO BUILD -->
<!-- THE BASE DITA SPECIFICATION: -->
<!-- * Base architecture -->
<!-- <property name="args.input" value="archSpec/archspec.ditamap"/> -->
<!-- * Technical communication architecture -->
<!-- <property name="args.input" value="archSpec/archSpec-technicalContent.ditamap"/> -->
<!-- * Base language reference -->
<!-- <property name="args.input" value="base_elements.ditamap"/> -->
<!-- * Technical communication reference -->
<!-- <property name="args.input" value="technicalContent_elements.ditamap"/> -->
<!-- //////////////////////////////////////////////////// -->
<!-- UNCOMMENT ALL OF THE FOLLOWING DITA MAP REFERENCES TO BUILD -->
<!-- THE LEARNING AND TRAINING SPECIFICATION: -->
<!-- * Learning and Training Architecture -->
<!-- <property name="args.input" value="archSpec/archSpec-learningTraining.ditamap"/> -->
<!-- * Learning and Training Language reference -->
<!-- <property name="args.input" value="learningTraining_elements.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 MAP REFERENCES TO BUILD -->
<!-- ORGANIZATIONAL SUBSETS (e.g. Architecture, Language Reference). -->
<!-- <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"/> -->
<!-- //////////////////////////////////////////////////// -->
<!-- UNCOMMENT ALL OF THE FOLLOWING DITA MAP REFERENCES TO BUILD -->
<!-- THE BASE DITA SPECIFICATION: -->
<!-- * Base architecture -->
<!-- <property name="args.input" value="archSpec/archspec.ditamap"/> -->
<!-- * Technical communication architecture -->
<!-- <property name="args.input" value="archSpec/archSpec-technicalContent.ditamap"/> -->
<!-- * Base language reference -->
<!-- <property name="args.input" value="base_elements.ditamap"/> -->
<!-- * Technical communication reference -->
<!-- <property name="args.input" value="technicalContent_elements.ditamap"/> -->
<!-- //////////////////////////////////////////////////// -->
<!-- UNCOMMENT ALL OF THE FOLLOWING DITA MAP REFERENCES TO BUILD -->
<!-- THE LEARNING AND TRAINING SPECIFICATION: -->
<!-- * Learning and Training Architecture -->
<!-- <property name="args.input" value="archSpec/archSpec-learningTraining.ditamap"/> -->
<!-- * Learning and Training Language reference -->
<!-- <property name="args.input" value="learningTraining_elements.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.

NOTE: Update (uncomment) each of two sections in the following TOCJS ant file.

<?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 MAP REFERENCES TO BUILD -->
<!-- ORGANIZATIONAL SUBSETS (e.g. Architecture, Language Reference). -->
<!-- <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"/> -->
<!-- //////////////////////////////////////////////////// -->
<!-- UNCOMMENT ALL OF THE FOLLOWING DITA MAP REFERENCES TO BUILD -->
<!-- THE BASE DITA SPECIFICATION: -->
<!-- * Base architecture -->
<!-- <property name="args.input" value="archSpec/archspec.ditamap"/> -->
<!-- * Technical communication architecture -->
<!-- <property name="args.input" value="archSpec/archSpec-technicalContent.ditamap"/> -->
<!-- * Base language reference -->
<!-- <property name="args.input" value="base_elements.ditamap"/> -->
<!-- * Technical communication reference -->
<!-- <property name="args.input" value="technicalContent_elements.ditamap"/> -->
<!-- //////////////////////////////////////////////////// -->
<!-- UNCOMMENT ALL OF THE FOLLOWING DITA MAP REFERENCES TO BUILD -->
<!-- THE LEARNING AND TRAINING SPECIFICATION: -->
<!-- * Learning and Training Architecture -->
<!-- <property name="args.input" value="archSpec/archSpec-learningTraining.ditamap"/> -->
<!-- * Learning and Training Language reference -->
<!-- <property name="args.input" value="learningTraining_elements.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 MAP REFERENCES TO BUILD -->
<!-- ORGANIZATIONAL SUBSETS (e.g. Architecture, Language Reference). -->
<!-- <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"/> -->
<!-- //////////////////////////////////////////////////// -->
<!-- UNCOMMENT ALL OF THE FOLLOWING DITA MAP REFERENCES TO BUILD -->
<!-- THE BASE DITA SPECIFICATION: -->
<!-- * Base architecture -->
<!-- <property name="args.input" value="archSpec/archspec.ditamap"/> -->
<!-- * Technical communication architecture -->
<!-- <property name="args.input" value="archSpec/archSpec-technicalContent.ditamap"/> -->
<!-- * Base language reference -->
<!-- <property name="args.input" value="base_elements.ditamap"/> -->
<!-- * Technical communication reference -->
<!-- <property name="args.input" value="technicalContent_elements.ditamap"/> -->
<!-- //////////////////////////////////////////////////// -->
<!-- UNCOMMENT ALL OF THE FOLLOWING DITA MAP REFERENCES TO BUILD -->
<!-- THE LEARNING AND TRAINING SPECIFICATION: -->
<!-- * Learning and Training Architecture -->
<!-- <property name="args.input" value="archSpec/archSpec-learningTraining.ditamap"/> -->
<!-- * Learning and Training Language reference -->
<!-- <property name="args.input" value="learningTraining_elements.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

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 MAP REFERENCES TO BUILD -->
<!-- ORGANIZATIONAL SUBSETS (e.g. Architecture, Language Reference). -->
<!-- <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"/> -->
<!-- //////////////////////////////////////////////////// -->
<!-- UNCOMMENT ALL OF THE FOLLOWING DITA MAP REFERENCES TO BUILD -->
<!-- THE BASE DITA SPECIFICATION: -->
<!-- * Base architecture -->
<!-- <property name="args.input" value="archSpec/archspec.ditamap"/> -->
<!-- * Technical communication architecture -->
<!-- <property name="args.input" value="archSpec/archSpec-technicalContent.ditamap"/> -->
<!-- * Base language reference -->
<!-- <property name="args.input" value="base_elements.ditamap"/> -->
<!-- * Technical communication reference -->
<!-- <property name="args.input" value="technicalContent_elements.ditamap"/> -->
<!-- //////////////////////////////////////////////////// -->
<!-- UNCOMMENT ALL OF THE FOLLOWING DITA MAP REFERENCES TO BUILD -->
<!-- THE LEARNING AND TRAINING SPECIFICATION: -->
<!-- * Learning and Training Architecture -->
<!-- <property name="args.input" value="archSpec/archSpec-learningTraining.ditamap"/> -->
<!-- * Learning and Training Language reference -->
<!-- <property name="args.input" value="learningTraining_elements.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