reusable-components.html 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <!DOCTYPE html
  2. SYSTEM "about:legacy-compat">
  3. <html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2019"><meta name="DC.rights.owner" content="(C) Copyright 2019"><meta name="DC.type" content="concept"><meta name="description" content="Warehouse topic used to store re-usable content for concept topics or other constructs that would not be valid in the existing warehouse task conref-task.dita."><meta name="DC.format" content="HTML5"><meta name="DC.identifier" content="ID"><link rel="stylesheet" type="text/css" href="../css/commonltr.css"><link rel="stylesheet" type="text/css" href="../css/dita-ot-doc.css"><title>Re-usable components</title></head><body id="ID"><header role="banner"><div class="header">
  4. <p>DITA Open Toolkit</p>
  5. <hr>
  6. </div></header><nav role="toc"><ul></ul></nav><main role="main"><article role="article" aria-labelledby="ariaid-title1">
  7. <h1 class="title topictitle1" id="ariaid-title1">Re-usable components</h1>
  8. <div class="body conbody"><p class="shortdesc">Warehouse topic used to store re-usable content for concept topics or other constructs that would not be
  9. valid in the existing warehouse task <span class="ph filepath">conref-task.dita</span>.</p>
  10. <section class="section" id="ID__use-xslt2"><h2 class="title sectiontitle">Upgrade stylesheets to XSLT 2.0</h2>
  11. <p class="p">The Saxon project has announced plans to remove XSLT 1.0 support from the Saxon-HE library that ships with
  12. DITA-OT:</p>
  13. <blockquote class="lq">…we’re dropping XSLT 1.0
  14. backwards compatibility mode from Saxon-HE, and hope to eliminate it entirely in due course.<br><div style="text-align:right"><a href="https://www.xml.com/news/release-saxon-98/"><cite>https://www.xml.com/news/release-saxon-98/</cite></a></div></blockquote>
  15. <p class="p">DITA-OT 3.0 and 3.0.1 included Saxon-HE 9.8.0.5, which rejects XSLT stylesheets that specify
  16. <code class="ph codeph">version="1.0"</code>. Plug-ins with XSLT templates specifying version 1.0 will fail with the message
  17. “<samp class="ph msgph">XSLT 1.0 compatibility mode is not available in this configuration</samp>.”</p>
  18. <p class="p">To resolve this issue, change any occurrences of <code class="ph codeph">&lt;xsl:stylesheet version="1.0"&gt;</code> in custom
  19. plug-in stylesheets to at least <code class="ph codeph">&lt;xsl:stylesheet version="2.0"&gt;</code>.</p>
  20. <div class="note tip note_tip"><span class="note__title">Tip:</span> DITA-OT 3.0.2 includes Saxon-HE 9.8.0.7, which restores XSLT 1.0 backwards-compatibility mode,
  21. but the DITA Open Toolkit project recommends upgrading all stylesheets to XSLT 2.0 to ensure plug-ins remain
  22. compatible with future versions of DITA-OT and Saxon-HE.</div>
  23. </section>
  24. <section class="section" id="ID__validating-plugins"><h2 class="title sectiontitle">Validating plug-ins</h2>
  25. <div class="div" id="ID__plugin.rnc">
  26. <p class="p">DITA-OT includes a RELAX NG schema file that can be used to validate the <span class="ph filepath">plugin.xml</span>
  27. files that define the capabilities of each plug-in.
  28. </p>
  29. <p class="p">To ensure the syntax of your custom plug-in is correct, include an <code class="keyword markupname xmlpi">&lt;?xml-model?&gt;</code> processing
  30. instruction at the beginning of the <span class="ph filepath">plugin.xml</span> file, immediately after the XML
  31. prolog:</p>
  32. <p class="p"><code class="keyword markupname xmlpi">&lt;?xml-model href="dita-ot/plugin.rnc" type="application/relax-ng-compact-syntax"?&gt;</code></p>
  33. <p class="p">If your authoring environment does not apply this schema automatically, point your editor to <span class="ph filepath" id="ID__samples-dir"><var class="keyword varname">dita-ot-dir</var>/resources/plugin.rnc</span> to associate the schema with
  34. your plug-in file.</p>
  35. </div>
  36. </section>
  37. <section class="section" id="ID__dita-for-print"><h2 class="title sectiontitle"><cite class="cite">DITA for Print: A DITA Open Toolkit Workbook</cite> (Second Edition, 2017)</h2>
  38. <p class="p">Authored by Leigh W. White, DITA Specialist at IXIASOFT, and published by XML Press, <cite class="cite">DITA for
  39. Print</cite> walks readers through developing a PDF customization from scratch. </p>
  40. <p class="p">Here is an excerpt from the back cover:</p>
  41. <blockquote class="lq"><cite class="cite">DITA for Print</cite> is for anyone who wants to learn how to create PDFs using the DITA Open Toolkit
  42. without learning everything there is to know about XSL-FO, XSLT, or XPath, or even about the DITA Open Toolkit
  43. itself. <cite class="cite">DITA for Print</cite> is written for non-programmers, by a non-programmer, and although it is
  44. written for people who have a good understanding of the DITA standard, you don’t need a technical background to
  45. get custom PDFs up and running quickly.</blockquote>
  46. <p class="p">This is an excellent, long-needed resource that was initially developed in 2013 for DITA-OT 1.8.</p>
  47. <p class="p">The second edition has been revised to cover DITA Open Toolkit Version 2, including customizing the DITA 1.3
  48. troubleshooting topic type, localization strings, bookmarks, and the new back-cover functionality.</p>
  49. <div class="note important note_important"><span class="note__title">Important:</span>
  50. <p class="p">The first edition of <cite class="cite">DITA for Print</cite> recommended copying entire files from the PDF2 plug-in to
  51. your custom plug-in. The DITA-OT project — and the second edition of the book — do not recommend this
  52. practice.</p>
  53. <p class="p">Instead, you should copy only the specific attribute sets and templates that you want to override. Following
  54. this practice will more cleanly isolate your customizations from the DITA-OT code, which will make it easier
  55. for you to update your plug-ins to work with future versions of DITA-OT.</p></div>
  56. </section>
  57. <section class="section" id="ID__dita-for-practitioners"><h2 class="title sectiontitle"><cite class="cite">DITA for Practitioners: Volume 1, Architecture and Technology</cite> (2012)</h2>
  58. <p class="p">Authored by Eliot Kimber and published by XML Press, this seminal resource contains a chapter dedicated to DITA
  59. Open Toolkit: “Running, Configuring, and Customizing the Open Toolkit”. In addition to a robust overview of
  60. DITA-OT customization and extension, the chapter contains a detailed example of customizing a PDF plug-in to
  61. specify 7" × 10" paper size and custom fonts for body text and headers.</p>
  62. <p class="p">The DITA-OT chapter in <cite class="cite">DITA for Practitioners: Volume 1</cite> was written for DITA-OT 1.5.4, which was
  63. the latest stable version at the time it was written.</p>
  64. </section>
  65. <section class="section" id="ID__java"><h2 class="title sectiontitle">Supported Java versions</h2>
  66. <div class="p" id="ID__java-clients">DITA-OT is designed to run on Java version <span class="keyword">8u101</span> or later.
  67. Compatible Java distributions are available from multiple sources:
  68. <div class="div div-index">
  69. </div>
  70. <ul class="ul">
  71. <li class="li">You can download the Oracle JRE or JDK from
  72. <a class="xref" href="http://www.oracle.com/technetwork/java/javase/downloads" target="_blank">oracle.com/technetwork/java</a>.</li>
  73. <li class="li">OpenJDK is an open-source implementation of Java available from
  74. <a class="xref" href="https://adoptopenjdk.net" target="_blank">adoptopenjdk.net</a>.</li>
  75. <li class="li">Amazon Corretto is an OpenJDK distribution with no-cost long-term support from
  76. <a class="xref" href="https://aws.amazon.com/corretto/" target="_blank">aws.amazon.com/corretto</a>.</li>
  77. </ul>
  78. </div>
  79. </section>
  80. <section class="section" id="ID__preprocess2"><h2 class="title sectiontitle">Limitations of map-first pre-processing</h2>
  81. <p class="p" id="ID__no-internal-preprocess2-ext">The internal extension points that run before or after individual steps in the
  82. original <code class="ph codeph">preprocess</code> pipeline (<code class="ph codeph">preprocess.*.pre/preprocess.*.post</code>) are not
  83. available in the newer map-first preprocessing pipeline (<code class="ph codeph">preprocess2</code>), which is used in the
  84. PDF and HTML Help transformations as of DITA-OT 3.0.</p>
  85. </section>
  86. </div>
  87. </article></main></body></html>