reusable-components.dita 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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<indexterm>1.0</indexterm></indexterm>
  21. <indexterm>XSLT<indexterm>2.0</indexterm></indexterm>
  22. <indexterm>plug-ins<indexterm>upgrading</indexterm></indexterm>
  23. <p>The Saxon project has announced plans to remove XSLT 1.0 support from the Saxon-HE library that ships with
  24. DITA-OT:</p>
  25. <lq href="https://www.xml.com/news/release-saxon-98/" format="html" scope="external">…we’re dropping XSLT 1.0
  26. backwards compatibility mode from Saxon-HE, and hope to eliminate it entirely in due course.</lq>
  27. <p>DITA-OT 3.0 and 3.0.1 included Saxon-HE 9.8.0.5, which rejects XSLT stylesheets that specify
  28. <codeph>version="1.0"</codeph>. Plug-ins with XSLT templates specifying version 1.0 will fail with the message
  29. “<msgph>XSLT 1.0 compatibility mode is not available in this configuration</msgph>.”</p>
  30. <p>To resolve this issue, change any occurrences of <codeph>&lt;xsl:stylesheet version="1.0"></codeph> in custom
  31. plug-in stylesheets to at least <codeph>&lt;xsl:stylesheet version="2.0"></codeph>.</p>
  32. <note type="tip">DITA-OT 3.0.2 includes Saxon-HE 9.8.0.7, which restores XSLT 1.0 backwards-compatibility mode,
  33. but the DITA Open Toolkit project recommends upgrading all stylesheets to XSLT 2.0 to ensure plug-ins remain
  34. compatible with future versions of DITA-OT and Saxon-HE.</note>
  35. </section>
  36. <section id="validating-plugins">
  37. <title>Validating plug-ins</title>
  38. <div id="plugin.rnc">
  39. <p>DITA-OT includes a RELAX NG schema file that can be used to validate the <filepath>plugin.xml</filepath>
  40. files that define the capabilities of each plug-in.
  41. <indexterm>schema<indexterm>RELAX NG</indexterm></indexterm>
  42. <indexterm>validate</indexterm>
  43. </p>
  44. <p>To ensure the syntax of your custom plug-in is correct, include an <xmlpi>xml-model</xmlpi> processing
  45. instruction at the beginning of the <filepath>plugin.xml</filepath> file, immediately after the XML
  46. prolog:</p>
  47. <p><xmlpi>xml-model href="dita-ot/plugin.rnc" type="application/relax-ng-compact-syntax"</xmlpi></p>
  48. <p>If your authoring environment does not apply this schema automatically, point your editor to <filepath
  49. id="samples-dir"><varname>dita-ot-dir</varname>/resources/plugin.rnc</filepath> to associate the schema with
  50. your plug-in file.</p>
  51. </div>
  52. </section>
  53. <section id="dita-for-print">
  54. <title><cite>DITA for Print: A DITA Open Toolkit Workbook</cite> (Second Edition, 2017)</title>
  55. <indexterm>Leigh White</indexterm>
  56. <indexterm>DITA for Print</indexterm>
  57. <p>Authored by Leigh W. White, DITA Specialist at IXIASOFT, and published by XML Press, <cite>DITA for
  58. Print</cite> walks readers through developing a PDF customization from scratch. </p>
  59. <p>Here is an excerpt from the back cover:</p>
  60. <lq><cite>DITA for Print</cite> is for anyone who wants to learn how to create PDFs using the DITA Open Toolkit
  61. without learning everything there is to know about XSL-FO, XSLT, or XPath, or even about the DITA Open Toolkit
  62. itself. <cite>DITA for Print</cite> is written for non-programmers, by a non-programmer, and although it is
  63. written for people who have a good understanding of the DITA standard, you don’t need a technical background to
  64. get custom PDFs up and running quickly.</lq>
  65. <p>This is an excellent, long-needed resource that was initially developed in 2013 for DITA-OT 1.8.</p>
  66. <p>The second edition has been revised to cover DITA Open Toolkit Version 2, including customizing the DITA 1.3
  67. troubleshooting topic type, localization strings, bookmarks, and the new back-cover functionality.</p>
  68. <note type="important">
  69. <p>The first edition of <cite>DITA for Print</cite> recommended copying entire files from the PDF2 plug-in to
  70. your custom plug-in. The DITA-OT project — and the second edition of the book — do not recommend this
  71. practice.</p>
  72. <p>Instead, you should copy only the specific attribute sets and templates that you want to override. Following
  73. this practice will more cleanly isolate your customizations from the DITA-OT code, which will make it easier
  74. for you to update your plug-ins to work with future versions of DITA-OT.</p></note>
  75. </section>
  76. <section id="dita-for-practitioners">
  77. <title><cite>DITA for Practitioners: Volume 1, Architecture and Technology</cite> (2012)</title>
  78. <indexterm>Eliot Kimber</indexterm>
  79. <indexterm>DITA for Practitioners: Volume 1, Architecture and Technology</indexterm>
  80. <p>Authored by Eliot Kimber and published by XML Press, this seminal resource contains a chapter dedicated to DITA
  81. Open Toolkit: “Running, Configuring, and Customizing the Open Toolkit”. In addition to a robust overview of
  82. DITA-OT customization and extension, the chapter contains a detailed example of customizing a PDF plug-in to
  83. specify 7" × 10" paper size and custom fonts for body text and headers.</p>
  84. <p>The DITA-OT chapter in <cite>DITA for Practitioners: Volume 1</cite> was written for DITA-OT 1.5.4, which was
  85. the latest stable version at the time it was written.</p>
  86. </section>
  87. <section id="java">
  88. <title>Supported Java versions</title>
  89. <p id="java-clients">DITA-OT is designed to run on Java version <keyword keyref="tool.java.version"/> or later.
  90. Compatible Java distributions are available from multiple sources:
  91. <div outputclass="div-index">
  92. <indexterm>Java<indexterm>versions</indexterm></indexterm>
  93. <indexterm>Amazon Corretto</indexterm>
  94. <indexterm>OpenJDK</indexterm>
  95. </div>
  96. <ul>
  97. <li>You can download the Oracle JRE or JDK from
  98. <xref keyref="download.oracle-jdk"/>.</li>
  99. <li>OpenJDK is an open-source implementation of Java available from
  100. <xref keyref="download.openjdk"/>.</li>
  101. <li>Amazon Corretto is an OpenJDK distribution with no-cost long-term support from
  102. <xref keyref="download.openjdk.corretto"/>.</li>
  103. </ul>
  104. </p>
  105. </section>
  106. <section id="preprocess2">
  107. <title>Limitations of map-first pre-processing</title>
  108. <p id="no-internal-preprocess2-ext">The internal extension points that run before or after individual steps in the
  109. original <codeph>preprocess</codeph> pipeline (<codeph>preprocess.*.pre/preprocess.*.post</codeph>) are not
  110. available in the newer map-first preprocessing pipeline (<codeph>preprocess2</codeph>), which is used in the
  111. PDF and HTML Help transformations as of DITA-OT 3.0.</p>
  112. </section>
  113. </conbody>
  114. </concept>