migrating-to-2.0.html 7.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 2016"><meta name="DC.rights.owner" content="(C) Copyright 2016"><meta name="DC.Type" content="reference"><meta name="description" content="In DITA-OT 2.0, XSLT templates were converted to XSLT 2.0, variable typing was implemented, and some older templates were refactored or removed. In addition, the dita command simplifies distribution of plugins by allowing installation from a URL."><meta name="DC.Relation" scheme="URI" content="../dev_ref/migration.html"><meta name="DC.Format" content="XHTML"><meta name="DC.Identifier" content="migrating-to-2.0"><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 2.0</title></head><body id="migrating-to-2.0"><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 2.3</a></li><li><a href="../release-notes/index.html">Release Notes</a></li><li><a href="../getting-started/index.html">Getting Started</a></li><li><a href="../user-guide/index.html">User Guide</a></li><li><a href="../parameters/index.html">Parameter Reference</a></li><li><a href="../dev_ref/index.html">Developer Reference</a><ul><li><a href="../dev_ref/DITA-OTArchitecture.html">DITA-OT Architecture</a></li><li><a href="../dev_ref/extending-the-ot.html">Extending the DITA-OT</a></li><li><a href="../dev_ref/plugin-creating.html">Creating plug-ins</a></li><li><a href="../dev_ref/plugin-extension-points.html">Extension points</a></li><li><a href="../dev_ref/pdf-customization.html">Customizing PDF output</a></li><li><a href="../dev_ref/migration.html">Migrating customizations</a><ul><li><a href="../dev_ref/migrating-to-2.3.html">To 2.3</a></li><li><a href="../dev_ref/migrating-to-2.2.html">To 2.2</a></li><li><a href="../dev_ref/migrating-to-2.1.html">To 2.1</a></li><li class="active"><a href="../dev_ref/migrating-to-2.0.html">To 2.0</a></li><li><a href="../dev_ref/migrating-to-1.8.html">To 1.8</a></li><li><a href="../dev_ref/migrating-to-1.7.html">To 1.7</a></li><li><a href="../dev_ref/migrating-to-1.6.html">To 1.6</a></li><li><a href="../dev_ref/migrating-to-1.5.4.html">To 1.5.4</a></li></ul></li></ul></li><li><a href="../user-guide/dita-and-dita-ot-resources.html">DITA 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 2.0</h1>
  8. <div class="body refbody"><p class="shortdesc">In DITA-OT 2.0, XSLT templates were converted to XSLT 2.0, variable typing was
  9. implemented, and some older templates were refactored or removed. In addition, the
  10. <span class="keyword cmdname">dita</span> command simplifies distribution of plugins by allowing installation
  11. from a URL.
  12. </p>
  13. <section class="section">
  14. <div class="note note note_note"><span class="note__title notetitle">Note:</span> This topic provides a summary of changes in DITA-OT 2.0 that may require modifications to custom stylesheets
  15. or plug-ins. For more information on changes in this release, see the <a class="xref" href="http://www.dita-ot.org/2.0/readme/changes/rel2.0.html" target="_blank">DITA-OT 2.0 Release Notes</a>.</div>
  16. </section>
  17. <div class="bodydiv refbodydiv">
  18. <section class="section"><h2 class="title sectiontitle">All transformations — variable typing</h2>
  19. <p class="p">XSLT stylesheets were converted to XSLT 2.0. With that change, variable types were also
  20. implemented. Plug-ins that change template variable values will need to make the following
  21. changes:</p>
  22. <ul class="ul">
  23. <li class="li">Declare the same types defined in the default templates with <code class="keyword markupname xmlatt">@as</code>.</li>
  24. <li class="li">Ensure that the generated values conform to the declared type.</li>
  25. </ul>
  26. </section>
  27. <div class="example">
  28. <p class="p">For example:</p>
  29. <pre class="pre codeblock"><code>&lt;xsl:variable name="urltest"&gt;
  30. &lt;xsl:variable name="urltest" <strong class="ph b">as="xs:boolean"</strong>&gt;</code></pre>
  31. </div>
  32. <section class="section"><h2 class="title sectiontitle">All transformations — refactoring</h2>
  33. <p class="p">Much of the toolkit code was refactored for release 2.0. Customization changes that were
  34. based on a specific template in a previous version of the toolkit might not work because
  35. the modified template is no longer used. If this is the case, the changes will need to be
  36. reimplemented based on the new XSLT templates.</p>
  37. </section>
  38. </div>
  39. <section class="section"><h2 class="title sectiontitle">HTML5</h2>
  40. <p class="p">A new <span class="keyword option">HTML5</span> transformation type has been added. Customizations that
  41. previously modified the XHTML output to generate valid HTML5 should still work, but basing
  42. your customization on the new transformation type might simplify the customization and
  43. reduce the work required to maintain compatibility with future versions of the toolkit.</p>
  44. <div class="note note note_note"><span class="note__title notetitle">Note:</span> The <span class="keyword option">HTML5</span> transformation was refactored with release 2.2. Before
  45. basing your customization on the changes in release 2.0, consider whether you might want to
  46. move to release 2.2 instead. See <a class="xref" href="migrating-to-2.2.html" title="In DITA-OT 2.2, the HTML5 transformation was refactored as its own plugin and separate plugins were created for each of the rendering engine-specific PDF transformations.">To 2.2</a>.</div>
  47. </section>
  48. <section class="section"><h2 class="title sectiontitle">Plug-in installation and distribution</h2>
  49. <p class="p">Plug-ins can now be installed or uninstalled from a ZIP archive using the new
  50. <span class="keyword cmdname">dita</span> command. Plug-ins can also be installed from a referenced URL. See
  51. <a class="xref" href="../parameters/dita-command-arguments.html" title="The dita command takes mandatory arguments to process DITA content, manage plug-ins, or print information about the command. Options can be used to modify the command behavior or specify additional configuration parameters.">Arguments and options for the dita command</a>.</p>
  52. </section>
  53. </div>
  54. <nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../dev_ref/migration.html" title="If you have XSL transformation overrides, plug-ins or other customizations written prior to DITA-OT 2.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>