migrating-to-3.1.dita 5.6 KB

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