reusable-components.dita 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
  3. <!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
  4. <concept id="ID">
  5. <title>Re-usable components</title>
  6. <shortdesc>Warehouse topic used to store re-usable content for concept topics or other constructs that would not be
  7. valid in the existing warehouse task <filepath>conref-task.dita</filepath>.</shortdesc>
  8. <prolog>
  9. <metadata>
  10. <keywords>
  11. <indexterm><!-- This file contains reusable content. Index entries are in each <section>. --></indexterm>
  12. </keywords>
  13. </metadata>
  14. </prolog>
  15. <conbody>
  16. <section id="use-xslt2">
  17. <title>Upgrade stylesheets to XSLT 2.0</title>
  18. <indexterm>upgrading</indexterm>
  19. <indexterm>Saxon</indexterm>
  20. <indexterm>XSLT
  21. <indexterm>1.0</indexterm></indexterm>
  22. <indexterm>XSLT
  23. <indexterm>2.0</indexterm></indexterm>
  24. <indexterm>plug-ins
  25. <indexterm>upgrading</indexterm></indexterm>
  26. <p>The Saxon project has announced plans to remove XSLT 1.0 support from the Saxon-HE library that ships with
  27. DITA-OT:</p>
  28. <lq href="https://www.xml.com/news/release-saxon-98/" format="html" scope="external">…we’re dropping XSLT 1.0
  29. backwards compatibility mode from Saxon-HE, and hope to eliminate it entirely in due course.</lq>
  30. <p>DITA-OT 3.0 and 3.0.1 included Saxon-HE 9.8.0.5, which rejects XSLT stylesheets that specify
  31. <codeph>version="1.0"</codeph>. Plug-ins with XSLT templates specifying version 1.0 will fail with the message
  32. “<msgph>XSLT 1.0 compatibility mode is not available in this configuration</msgph>.”</p>
  33. <p>To resolve this issue, change any occurrences of <codeph>&lt;xsl:stylesheet version="1.0"></codeph> in custom
  34. plug-in stylesheets to at least <codeph>&lt;xsl:stylesheet version="2.0"></codeph>.</p>
  35. <note type="tip">DITA-OT 3.0.2 includes Saxon-HE 9.8.0.7, which restores XSLT 1.0 backwards-compatibility mode,
  36. but the DITA Open Toolkit project recommends upgrading all stylesheets to XSLT 2.0 to ensure plug-ins remain
  37. compatible with future versions of DITA-OT and Saxon-HE.</note>
  38. </section>
  39. <section id="validating-plugins">
  40. <title>Validating plug-ins</title>
  41. <div id="plugin.rnc">
  42. <p>DITA-OT includes a RELAX NG schema file that can be used to validate the <filepath>plugin.xml</filepath>
  43. files that define the capabilities of each plug-in.
  44. <indexterm>schema
  45. <indexterm>RELAX NG</indexterm></indexterm>
  46. <indexterm>validate</indexterm>
  47. </p>
  48. <p>To ensure the syntax of your custom plug-in is correct, include an <xmlpi>xml-model</xmlpi> processing
  49. instruction at the beginning of the <filepath>plugin.xml</filepath> file, immediately after the XML
  50. prolog:</p>
  51. <p><xmlpi>xml-model href="dita-ot/plugin.rnc" type="application/relax-ng-compact-syntax"</xmlpi></p>
  52. <p>If your authoring environment does not apply this schema automatically, point your editor to <filepath
  53. id="samples-dir"><varname>dita-ot-dir</varname>/resources/plugin.rnc</filepath> to associate the schema with
  54. your plug-in file.</p>
  55. </div>
  56. </section>
  57. <section id="dita-for-print">
  58. <title><cite>DITA for Print: A DITA Open Toolkit Workbook</cite> (Second Edition, 2017)</title>
  59. <indexterm>Leigh White</indexterm>
  60. <indexterm>DITA for Print</indexterm>
  61. <p>Authored by Leigh W. White, DITA Specialist at IXIASOFT, and published by XML Press, <cite>DITA for
  62. Print</cite> walks readers through developing a PDF customization from scratch. </p>
  63. <p>Here is an excerpt from the back cover:</p>
  64. <lq><cite>DITA for Print</cite> is for anyone who wants to learn how to create PDFs using the DITA Open Toolkit
  65. without learning everything there is to know about XSL-FO, XSLT, or XPath, or even about the DITA Open Toolkit
  66. itself. <cite>DITA for Print</cite> is written for non-programmers, by a non-programmer, and although it is
  67. written for people who have a good understanding of the DITA standard, you don’t need a technical background to
  68. get custom PDFs up and running quickly.</lq>
  69. <p>This is an excellent, long-needed resource that was initially developed in 2013 for DITA-OT 1.8.</p>
  70. <p>The second edition has been revised to cover DITA Open Toolkit Version 2, including customizing the DITA 1.3
  71. troubleshooting topic type, localization strings, bookmarks, and the new back-cover functionality.</p>
  72. <note type="important">
  73. <p>The first edition of <cite>DITA for Print</cite> recommended copying entire files from the PDF2 plug-in to
  74. your custom plug-in. The DITA-OT project — and the second edition of the book — do not recommend this
  75. practice.</p>
  76. <p>Instead, you should copy only the specific attribute sets and templates that you want to override. Following
  77. this practice will more cleanly isolate your customizations from the DITA-OT code, which will make it easier
  78. for you to update your plug-ins to work with future versions of DITA-OT.</p></note>
  79. </section>
  80. <section id="dita-for-practitioners">
  81. <title><cite>DITA for Practitioners: Volume 1, Architecture and Technology</cite> (2012)</title>
  82. <indexterm>Eliot Kimber</indexterm>
  83. <indexterm>DITA for Practitioners: Volume 1, Architecture and Technology</indexterm>
  84. <p>Authored by Eliot Kimber and published by XML Press, this seminal resource contains a chapter dedicated to DITA
  85. Open Toolkit: “Running, Configuring, and Customizing the Open Toolkit”. In addition to a robust overview of
  86. DITA-OT customization and extension, the chapter contains a detailed example of customizing a PDF plug-in to
  87. specify 7" × 10" paper size and custom fonts for body text and headers.</p>
  88. <p>The DITA-OT chapter in <cite>DITA for Practitioners: Volume 1</cite> was written for DITA-OT 1.5.4, which was
  89. the latest stable version at the time it was written.</p>
  90. </section>
  91. <section id="java">
  92. <title>Supported Java versions</title>
  93. <p id="java-clients">DITA-OT is designed to run on Java version <keyword keyref="tool.java.version"/> or later and
  94. built and tested with the Open Java Development Kit (OpenJDK). Compatible Java distributions are available from
  95. multiple sources:
  96. <indexterm>Java
  97. <indexterm>versions</indexterm></indexterm>
  98. <indexterm>Amazon Corretto</indexterm>
  99. <indexterm>OpenJDK</indexterm>
  100. <indexterm>Oracle JDK</indexterm>
  101. <ul>
  102. <li>You can download the Oracle JRE or JDK from
  103. <xref keyref="download.oracle-jdk"/> under commercial license.</li>
  104. <li>OpenJDK is a free open-source implementation of Java available from
  105. <xref keyref="download.openjdk"/>.</li>
  106. <li>Amazon Corretto is an OpenJDK distribution from
  107. <xref keyref="download.openjdk.corretto"/>.</li>
  108. </ul>
  109. </p>
  110. </section>
  111. <section id="preprocess2">
  112. <title>Limitations of map-first pre-processing</title>
  113. <p id="no-internal-preprocess2-ext">The internal extension points that run before or after individual steps in the
  114. original <codeph>preprocess</codeph> pipeline (<codeph>preprocess.*.pre/preprocess.*.post</codeph>) are not
  115. available in the newer map-first preprocessing pipeline (<codeph>preprocess2</codeph>), which is used in the PDF
  116. and HTML Help transformations as of DITA-OT 3.0.</p>
  117. </section>
  118. <section id="legacy-plugins">
  119. <title>Unbundled plug-ins</title>
  120. <note id="legacy-plugins-note">If necessary, legacy plug-ins may be re-installed from earlier DITA-OT
  121. distributions, but they are no longer actively maintained or supported by the core toolkit committers. The
  122. source code is available on GitHub for anyone interested in maintaining the plug-ins for use with future toolkit
  123. versions.</note>
  124. </section>
  125. <section id="subcommands">
  126. <title>New subcommands in 3.5</title>
  127. <dl id="3.5-subcommands">
  128. <dlentry>
  129. <dt><cmdname>dita deliverables</cmdname></dt>
  130. <dd>Prints the list of deliverables in a project <varname>file</varname></dd>
  131. </dlentry>
  132. <dlentry id="install-subcommand">
  133. <dt><cmdname>dita install</cmdname></dt>
  134. <dd>Installs or reloads plug-ins (replaces <cmdname>dita</cmdname>
  135. <parmname>--install</parmname>)</dd>
  136. </dlentry>
  137. <dlentry>
  138. <dt><cmdname>dita plugins</cmdname></dt>
  139. <dd>Prints a list of installed plug-ins (replaces <cmdname>dita</cmdname>
  140. <parmname>--plugins</parmname>)</dd>
  141. </dlentry>
  142. <dlentry>
  143. <dt><cmdname>dita transtypes</cmdname></dt>
  144. <dd>Prints a list of installed transformation types, or <i>output formats</i> (replaces
  145. <cmdname>dita</cmdname>
  146. <parmname>--transtypes</parmname>)</dd>
  147. </dlentry>
  148. <dlentry>
  149. <dt><cmdname>dita uninstall</cmdname></dt>
  150. <dd>Removes and deletes a plug-in (replaces <cmdname>dita</cmdname>
  151. <parmname>--uninstall</parmname>)</dd>
  152. </dlentry>
  153. <dlentry id="version-subcommand">
  154. <dt><cmdname>dita version</cmdname></dt>
  155. <dd>Prints version information and exits (replaces <cmdname>dita</cmdname>
  156. <parmname>--version</parmname>)</dd>
  157. </dlentry>
  158. </dl>
  159. </section>
  160. </conbody>
  161. </concept>