code-srv-test/dita-ot-3.6/doc/topics/migrating-to-3.1.html
2021-03-23 22:38:58 +00:00

73 lines
No EOL
9.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html
SYSTEM "about:legacy-compat">
<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 2020"><meta name="generator" content="DITA-OT"><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="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"><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">
<p>DITA Open Toolkit</p>
<hr>
</div></header><nav role="toc"><ul><li><a href="../index.html">DITA Open Toolkit 3.6</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/building-output.html">Building output</a></li><li><a href="../topics/input-formats.html">Authoring formats</a></li><li><a href="../topics/output-formats.html">Output formats</a></li><li><a href="../parameters/index.html">Parameters</a></li><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/adding-plugins.html">Adding plug-ins</a></li><li><a href="../topics/custom-plugins.html">Creating plug-ins</a><ul><li><a href="../topics/plugin-benefits.html">Plug-in benefits</a></li><li><a href="../topics/plugin-configfile.html">Plug-in descriptor file</a></li><li><a href="../topics/plugin-coding-conventions.html">Coding conventions</a></li><li><a href="../topics/plugin-dependencies.html">Plug-in dependencies</a></li><li><a href="../topics/plugin-use-cases.html">Plug-in use cases</a></li><li><a href="../topics/html-customization-plugins.html">Custom HTML plug-ins</a></li><li><a href="../topics/pdf-customization-plugins.html">Custom PDF plug-ins</a></li><li><a href="../topics/globalization.html">Globalizing DITA content</a></li><li><a href="../topics/migration.html">Migrating customizations</a><ul><li><a href="../topics/migrating-to-3.6.html">To 3.6</a></li><li><a href="../topics/migrating-to-3.5.html">To 3.5</a></li><li><a href="../topics/migrating-to-3.4.html">To 3.4</a></li><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></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">
<h1 class="title topictitle1" id="ariaid-title1">Migrating to release 3.1</h1>
<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
<code class="keyword markupname xmlelement">&lt;codeblock&gt;</code> processing, and incremental improvements to Lightweight DITA processing and
PDF output</span>.</p>
<section class="section">
<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
or plug-ins. For more information on changes in this release, see the
<a class="xref" href="https://www.dita-ot.org/3.1/release-notes/" target="_blank" rel="external noopener">DITA-OT 3.1 Release Notes</a>.</div>
</section>
<section class="section"><h2 class="title sectiontitle">Custom if/unless attributes in Ant scripts</h2>
<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>
attributes in the Ant namespace, which can be used to control whether parameters are passed to XSLT modules.
These attributes replace custom implementations of <code class="ph codeph">if</code> and <code class="ph codeph">unless</code> logic
introduced before Ant had this capability.</p>
<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
<code class="keyword markupname xmlelement">&lt;param&gt;</code> elements that pass XSLT parameters, add the following namespace attributes to
the root project:
<ul class="ul">
<li class="li"><code class="keyword markupname xmlnsname">xmlns:if</code>=<code class="ph codeph">"ant:if"</code></li>
<li class="li"><code class="keyword markupname xmlnsname">xmlns:unless</code>=<code class="ph codeph">"ant:unless"</code></li>
</ul></div>
<p class="p">In custom Ant build files and in any files that supply parameters to existing DITA-OT XSLT modules, replace all
occurrences of <code class="ph codeph">if="property"</code> on <code class="keyword markupname xmlelement">&lt;param&gt;</code> elements with
<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>
respectively).</p>
<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;
&lt;param name="antProperty" expression="${antProperty}"
if<strong class="ph b">:set</strong>="antProperty"/&gt;
&lt;/root&gt;</code></pre></div>
<p class="p">For more information on passing parameters to existing XSLT steps, see
<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>
</section>
<section class="section"><h2 class="title sectiontitle">Deprecated properties</h2>
<div class="sectiondiv">
<p class="p">As of DITA-OT 3.1, the Java class path is managed automatically, meaning you do not (and should not) use
explicit references to Java class paths in your build scripts. In particular, the old
<code class="ph codeph">dost.class.path</code> property has been deprecated and should not be used. If you are migrating
older plug-ins that manage their class path directly, you should remove any explicit class path configuration.
If your plug-in was not already using the <code class="ph codeph">dita.conductor.lib.import</code> extension point to
integrate its JAR dependencies you must add it.</p>
<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>
directory and the plug-in-contributed JARs, which are listed in <span class="ph filepath">config/env.sh</span>. The
<span class="ph filepath">env.sh</span> file is updated automatically when plug-ins are installed or removed.</p>
</div>
<p class="p">The <code class="ph codeph">xml.catalog.files</code> property has been deprecated and should not be used. Replace any such
references with the <code class="ph codeph">xml.catalog.path</code> instead.</p>
</section>
<section class="section" id="migrating-to-3.1__pdf-line-numbers"><h2 class="title sectiontitle">PDF Enabling line numbers in codeblocks </h2>
<p class="p">The <code class="ph codeph">codeblock.generate-line-number</code> template mode default has been changed to check for the
<code class="ph codeph">show-line-numbers</code> keyword in the <code class="keyword markupname xmlatt">@outputclass</code> attribute. Earlier versions of
DITA-OT required custom PDF plug-ins to override the template mode to return <code class="ph codeph">true()</code>. </p>
</section>
</div>
<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.6, 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>