migrating-to-3.1.dita 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
  3. <!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
  4. <reference id="migrating-to-3.1">
  5. <title>Migrating to release 3.1</title>
  6. <titlealts>
  7. <navtitle>To 3.1</navtitle>
  8. </titlealts>
  9. <shortdesc>DITA-OT 3.1 includes <ph id="summary">support for DITA 1.3 SVG domain elements, enhanced
  10. <xmlelement>codeblock</xmlelement> processing, and incremental improvements to Lightweight DITA processing and
  11. PDF output</ph>.</shortdesc>
  12. <prolog>
  13. <metadata>
  14. <keywords>
  15. <indexterm><xmlelement>codeblock</xmlelement></indexterm>
  16. <indexterm><xmlelement>param</xmlelement></indexterm>
  17. <indexterm><xmlatt>if:set</xmlatt></indexterm>
  18. <indexterm><xmlatt>unless:set</xmlatt></indexterm>
  19. <indexterm><xmlatt>if</xmlatt></indexterm>
  20. <indexterm><xmlatt>outputclass</xmlatt></indexterm>
  21. <indexterm>deprecated features<indexterm><codeph>dost.class.path</codeph> property</indexterm></indexterm>
  22. <indexterm>deprecated features<indexterm><codeph>xml.catalog.files</codeph> property</indexterm></indexterm>
  23. <indexterm>deprecated features<indexterm><codeph>dost.class.path</codeph></indexterm></indexterm>
  24. <indexterm>Lightweight DITA</indexterm>
  25. <indexterm>XSLT<indexterm>Ant</indexterm></indexterm>
  26. <indexterm>DITA 1.3<indexterm>SVG domain</indexterm></indexterm>
  27. <indexterm>SVG</indexterm>
  28. <indexterm>catalog<indexterm><codeph>xml.catalog.files</codeph></indexterm><indexterm><codeph>xml.catalog.path</codeph></indexterm></indexterm>
  29. </keywords>
  30. </metadata>
  31. </prolog>
  32. <refbody>
  33. <section>
  34. <note>This topic provides a summary of changes in DITA-OT 3.1 that may require modifications to custom stylesheets
  35. or plug-ins. For more information on changes in this release, see the
  36. <xref keyref="3.1-release-notes"/>.</note>
  37. </section>
  38. <section>
  39. <title>Custom if/unless attributes in Ant scripts</title>
  40. <p>Ant scripts for DITA-OT builds now make use of <xmlatt>if:set</xmlatt> and <xmlatt>unless:set</xmlatt>
  41. attributes in the Ant namespace, which can be used to control whether parameters are passed to XSLT modules.
  42. These attributes replace custom implementations of <codeph>if</codeph> and <codeph>unless</codeph> logic
  43. introduced before Ant had this capability.</p>
  44. <p>If your plug-ins include Ant scripts that use <xmlatt>if</xmlatt> or <xmlatt>unless</xmlatt> on
  45. <xmlelement>param</xmlelement> elements that pass XSLT parameters, add the following namespace attributes to
  46. the root project:
  47. <ul>
  48. <li><xmlnsname>xmlns:if</xmlnsname>=<codeph>"ant:if"</codeph></li>
  49. <li><xmlnsname>xmlns:unless</xmlnsname>=<codeph>"ant:unless"</codeph></li>
  50. </ul></p>
  51. <p>In custom Ant build files and in any files that supply parameters to existing DITA-OT XSLT modules, replace all
  52. occurrences of <codeph>if="property"</codeph> on <xmlelement>param</xmlelement> elements with
  53. <codeph>if<b>:set</b>="property"</codeph> (and <codeph>unless</codeph> → <codeph>unless<b>:set</b></codeph>
  54. respectively).</p>
  55. <p><codeblock outputclass="language-xml normalize-space show-line-numbers show-whitespace">&lt;root xmlns:if="ant:if" xmlns:unless="ant:unless">
  56. &lt;param name="antProperty" expression="${antProperty}"
  57. if<b>:set</b>="antProperty"/>
  58. &lt;/root></codeblock></p>
  59. <p>For more information on passing parameters to existing XSLT steps, see
  60. <xref keyref="plugin-extension-points-xslt-parameters"/>.</p>
  61. </section>
  62. <section>
  63. <title>Deprecated properties</title>
  64. <sectiondiv>
  65. <!-- From plugin-javalib.dita -->
  66. <p>As of DITA-OT 3.1, the Java class path is managed automatically, meaning you do not (and should not) use
  67. explicit references to Java class paths in your build scripts. In particular, the old
  68. <codeph>dost.class.path</codeph> property has been deprecated and should not be used. If you are migrating
  69. older plug-ins that manage their class path directly, you should remove any explicit class path configuration.
  70. If your plug-in was not already using the <codeph>dita.conductor.lib.import</codeph> extension point to
  71. integrate its JAR dependencies you must add it.</p>
  72. <p>The effective DITA-OT class path is the combination of the JAR files in the main <filepath>lib/</filepath>
  73. directory and the plug-in-contributed JARs, which are listed in <filepath>config/env.sh</filepath>. The
  74. <filepath>env.sh</filepath> file is updated automatically when plug-ins are installed or removed.</p>
  75. </sectiondiv>
  76. <p>The <codeph>xml.catalog.files</codeph> property has been deprecated and should not be used. Replace any such
  77. references with the <codeph>xml.catalog.path</codeph> instead.</p>
  78. </section>
  79. <section id="pdf-line-numbers">
  80. <title>PDF – Enabling line numbers in codeblocks </title>
  81. <p>The <codeph>codeblock.generate-line-number</codeph> template mode default has been changed to check for the
  82. <codeph>show-line-numbers</codeph> keyword in the <xmlatt>outputclass</xmlatt> attribute. Earlier versions of
  83. DITA-OT required custom PDF plug-ins to override the template mode to return <codeph>true()</codeph>. </p>
  84. </section>
  85. </refbody>
  86. </reference>