migrating-to-3.1.html 9.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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="reference"><meta name="description" content="DITA-OT 3.1 includes support for DITA 1.3 SVG domain elements, enhanced codeblock processing, and incremental improvements to Lightweight DITA processing and PDF output."><meta name="DC.subject" content=", codeblock, param, if:set, unless:set, if, outputclass, deprecated features, property, dost.class.path, xml.catalog.files, Lightweight DITA, XSLT, Ant, DITA 1.3, SVG domain, SVG, catalog, xml.catalog.path"><meta name="keywords" content=", codeblock, param, if:set, unless:set, if, outputclass, deprecated features, property, dost.class.path, xml.catalog.files, Lightweight DITA, XSLT, Ant, DITA 1.3, SVG domain, SVG, catalog, xml.catalog.path"><meta name="DC.relation" scheme="URI" content="../topics/migration.html"><meta name="DC.format" content="HTML5"><meta name="DC.identifier" content="migrating-to-3.1"><link rel="stylesheet" type="text/css" href="../css/commonltr.css"><link rel="stylesheet" type="text/css" href="../css/dita-ot-doc.css"><title>Migrating to release 3.1</title></head><body id="migrating-to-3.1"><header role="banner"><div class="header">
  4. <p>DITA Open Toolkit</p>
  5. <hr>
  6. </div></header><nav role="toc"><ul><li><a href="../index.html">DITA Open Toolkit 3.3</a></li><li><a href="../release-notes/index.html">Release Notes</a></li><li><a href="../topics/installing-client.html">Installing DITA-OT</a></li><li><a href="../topics/alternative-input-formats.html">Authoring formats</a></li><li><a href="../topics/building-output.html">Building output</a></li><li><a href="../parameters/index.html">Setting parameters</a></li><li><a href="../topics/customizing.html">Customizing DITA-OT</a><ul><li><a href="../topics/html-customization.html">Customizing HTML</a></li><li><a href="../topics/pdf-customization.html">Customizing PDF</a></li><li><a href="../topics/custom-plugins.html">Working with plug-ins</a></li><li><a href="../extension-points/plugin-extension-points.html">Extension points</a></li><li><a href="../topics/migration.html">Migrating customizations</a><ul><li><a href="../topics/migrating-to-3.3.html">To 3.3</a></li><li><a href="../topics/migrating-to-3.2.html">To 3.2</a></li><li class="active"><a href="../topics/migrating-to-3.1.html">To 3.1</a></li><li><a href="../topics/migrating-to-3.0.html">To 3.0</a></li><li><a href="../topics/migrating-to-2.5.html">To 2.5</a></li><li><a href="../topics/migrating-to-2.4.html">To 2.4</a></li><li><a href="../topics/migrating-to-2.3.html">To 2.3</a></li><li><a href="../topics/migrating-to-2.2.html">To 2.2</a></li><li><a href="../topics/migrating-to-2.1.html">To 2.1</a></li><li><a href="../topics/migrating-to-2.0.html">To 2.0</a></li><li><a href="../topics/migrating-to-1.8.html">To 1.8</a></li><li><a href="../topics/migrating-to-1.7.html">To 1.7</a></li><li><a href="../topics/migrating-to-1.6.html">To 1.6</a></li><li><a href="../topics/migrating-to-1.5.4.html">To 1.5.4</a></li></ul></li><li><a href="../topics/globalization.html">Globalizing DITA content</a></li><li><a href="../topics/rebuilding-docs.html">Rebuilding documentation</a></li></ul></li><li><a href="../topics/troubleshooting-overview.html">Troubleshooting</a></li><li><a href="../reference/index.html">Reference</a></li><li><a href="../topics/dita-and-dita-ot-resources.html">Resources</a></li></ul></nav><main role="main"><article role="article" aria-labelledby="ariaid-title1">
  7. <h1 class="title topictitle1" id="ariaid-title1">Migrating to release 3.1</h1>
  8. <div class="body refbody"><p class="shortdesc">DITA-OT 3.1 includes <span class="ph" id="migrating-to-3.1__summary">support for DITA 1.3 SVG domain elements, enhanced
  9. <code class="keyword markupname xmlelement">&lt;codeblock&gt;</code> processing, and incremental improvements to Lightweight DITA processing and
  10. PDF output</span>.</p>
  11. <section class="section">
  12. <div class="note note note_note"><span class="note__title">Note:</span> This topic provides a summary of changes in DITA-OT 3.1 that may require modifications to custom stylesheets
  13. or plug-ins. For more information on changes in this release, see the
  14. <a class="xref" href="https://www.dita-ot.org/3.1/release-notes/" target="_blank">DITA-OT 3.1 Release Notes</a>.</div>
  15. </section>
  16. <section class="section"><h2 class="title sectiontitle">Custom if/unless attributes in Ant scripts</h2>
  17. <p class="p">Ant scripts for DITA-OT builds now make use of <code class="keyword markupname xmlatt">@if:set</code> and <code class="keyword markupname xmlatt">@unless:set</code>
  18. attributes in the Ant namespace, which can be used to control whether parameters are passed to XSLT modules.
  19. These attributes replace custom implementations of <code class="ph codeph">if</code> and <code class="ph codeph">unless</code> logic
  20. introduced before Ant had this capability.</p>
  21. <div class="p">If your plug-ins include Ant scripts that use <code class="keyword markupname xmlatt">@if</code> or <code class="keyword markupname xmlatt">@unless</code> on
  22. <code class="keyword markupname xmlelement">&lt;param&gt;</code> elements that pass XSLT parameters, add the following namespace attributes to
  23. the root project:
  24. <ul class="ul">
  25. <li class="li"><code class="keyword markupname xmlnsname">xmlns:if</code>=<code class="ph codeph">"ant:if"</code></li>
  26. <li class="li"><code class="keyword markupname xmlnsname">xmlns:unless</code>=<code class="ph codeph">"ant:unless"</code></li>
  27. </ul></div>
  28. <p class="p">In custom Ant build files and in any files that supply parameters to existing DITA-OT XSLT modules, replace all
  29. occurrences of <code class="ph codeph">if="property"</code> on <code class="keyword markupname xmlelement">&lt;param&gt;</code> elements with
  30. <code class="ph codeph">if<strong class="ph b">:set</strong>="property"</code> (and <code class="ph codeph">unless</code> → <code class="ph codeph">unless<strong class="ph b">:set</strong></code>
  31. respectively).</p>
  32. <div class="p"><pre class="pre codeblock language-xml normalize-space show-line-numbers show-whitespace"><code>&lt;root xmlns:if="ant:if" xmlns:unless="ant:unless"&gt;
  33. &lt;param name="antProperty" expression="${antProperty}"
  34. if<strong class="ph b">:set</strong>="antProperty"/&gt;
  35. &lt;/root&gt;</code></pre></div>
  36. <p class="p">For more information on passing parameters to existing XSLT steps, see
  37. <a class="xref" href="../extension-points/plugin-extension-points-xslt-parameters.html" title="You can use these extension points to pass parameters into existing XSLT steps in both the pre-processing pipeline and DITA-OT transformation. The parameters generally will be available as global xsl:param values with XSLT overrides.">XSLT-parameter extension points</a>.</p>
  38. </section>
  39. <section class="section"><h2 class="title sectiontitle">Deprecated properties</h2>
  40. <div class="sectiondiv">
  41. <p class="p">As of DITA-OT 3.1, the Java class path is managed automatically, meaning you do not (and should not) use
  42. explicit references to Java class paths in your build scripts. In particular, the old
  43. <code class="ph codeph">dost.class.path</code> property has been deprecated and should not be used. If you are migrating
  44. older plug-ins that manage their class path directly, you should remove any explicit class path configuration.
  45. If your plug-in was not already using the <code class="ph codeph">dita.conductor.lib.import</code> extension point to
  46. integrate its JAR dependencies you must add it.</p>
  47. <p class="p">The effective DITA-OT class path is the combination of the JAR files in the main <span class="ph filepath">lib/</span>
  48. directory and the plug-in-contributed JARs, which are listed in <span class="ph filepath">config/env.sh</span>. The
  49. <span class="ph filepath">env.sh</span> file is updated automatically when plug-ins are installed or removed.</p>
  50. </div>
  51. <p class="p">The <code class="ph codeph">xml.catalog.files</code> property has been deprecated and should not be used. Replace any such
  52. references with the <code class="ph codeph">xml.catalog.path</code> instead.</p>
  53. </section>
  54. <section class="section" id="migrating-to-3.1__pdf-line-numbers"><h2 class="title sectiontitle">PDF – Enabling line numbers in codeblocks </h2>
  55. <p class="p">The <code class="ph codeph">codeblock.generate-line-number</code> template mode default has been changed to check for the
  56. <code class="ph codeph">show-line-numbers</code> keyword in the <code class="keyword markupname xmlatt">@outputclass</code> attribute. Earlier versions of
  57. DITA-OT required custom PDF plug-ins to override the template mode to return <code class="ph codeph">true()</code>. </p>
  58. </section>
  59. </div>
  60. <nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/migration.html" title="If you have XSL transformation overrides, plug-ins or other customizations written prior to DITA-OT 3.3, you may need to make changes to ensure your overrides work properly with the latest toolkit versions.">Migrating customizations</a></div></div></nav></article></main></body></html>