plugin-xmlcatalog.html 9.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <!DOCTYPE html
  2. SYSTEM "about:legacy-compat">
  3. <html lang="en-us"><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="task"><meta name="description" content="You can update either the main DITA-OT XML catalog or the XML catalog that is used by the PDF plug-in. This enables DITA-OT to support new specializations and document-type shells."><meta name="DC.subject" content="deprecated features, dita.specialization.catalog, DITA, specializations, plug-ins, DITA specializations, OASIS, catalog, extending"><meta name="keywords" content="deprecated features, dita.specialization.catalog, DITA, specializations, plug-ins, DITA specializations, OASIS, catalog, extending"><meta name="DC.relation" scheme="URI" content="../topics/plugin-applications.html"><meta name="DC.relation" scheme="URI" content="../extension-points/plugin-extension-points-general.html"><meta name="DC.relation" scheme="URI" content="../topics/plugins-installing.html"><meta name="DC.format" content="HTML5"><meta name="DC.identifier" content="plugin-xmlcatalog"><meta name="DC.language" content="en-US"><link rel="stylesheet" type="text/css" href="../css/commonltr.css"><link rel="stylesheet" type="text/css" href="../css/dita-ot-doc.css"><title>Extending an XML catalog file</title></head><body id="plugin-xmlcatalog"><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><ul><li><a href="../topics/plugins-installing.html">Installing plug-ins</a></li><li><a href="../topics/plugins-removing.html">Removing plug-ins</a></li><li><a href="../topics/plugins-registry.html">Plug-in registry</a></li><li><a href="../topics/plugin-configfile.html">Plug-in descriptor file</a></li><li><a href="../topics/plugin-dependencies.html">Plug-in dependencies</a></li><li><a href="../topics/plugin-applications.html">Plug-in applications</a><ul><li class="active"><a href="../topics/plugin-xmlcatalog.html">Extending an XML catalog file</a></li><li><a href="../topics/plugin-anttarget.html">Adding a new target to the Ant build process</a></li><li><a href="../topics/plugin-antpreprocess.html">Adding an Ant target to the pre-processing pipeline</a></li><li><a href="../topics/plugin-newtranstype.html">Adding a new transformation type</a></li><li><a href="../topics/plugin-overridestyle.html">Overriding an XSLT-processing step</a></li><li><a href="../topics/using-plugin-URI-extension.html">Referencing files from other plug-ins</a></li><li><a href="../topics/plugin-xsltparams.html">Adding parameters to existing XSLT steps</a></li><li><a href="../topics/plugin-javalib.html">Adding a Java library to the classpath</a></li><li><a href="../topics/plugin-messages.html">Adding new diagnostic messages</a></li><li><a href="../topics/plugin-newextensions.html">Creating a new plug-in extension point</a></li><li><a href="../topics/implement-saxon-customizations.html">Adding Saxon customizations</a></li></ul></li><li><a href="../topics/plugin-sample.html">Example plugin.xml file</a></li><li><a href="../topics/plugin-best-practices.html">Best practices</a></li><li><a href="../topics/plugin-coding-conventions.html">Coding conventions</a></li></ul></li><li><a href="../extension-points/plugin-extension-points.html">Extension points</a></li><li><a href="../topics/migration.html">Migrating customizations</a></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">Extending an XML catalog file</h1>
  8. <div class="body taskbody"><p class="shortdesc">You can update either the main DITA-OT XML catalog or the XML catalog that is used by the PDF plug-in. This
  9. enables DITA-OT to support new specializations and document-type shells.</p>
  10. <section class="section context"><div class="tasklabel"><h2 class="sectiontitle tasklabel">About this task</h2></div>
  11. <p class="p">You can use the <span class="keyword parmname">dita.specialization.catalog.relative</span> and
  12. <span class="keyword parmname">org.dita.pdf2.catalog.relative</span> extension points to update the DITA-OT catalog files.</p>
  13. <div class="note remember note_remember"><span class="note__title">Remember:</span> The <span class="keyword parmname">dita.specialization.catalog</span> extension is deprecated. Use
  14. <span class="keyword parmname">dita.specialization.catalog.relative</span> instead.</div>
  15. </section>
  16. <section><div class="tasklabel"><h2 class="sectiontitle tasklabel">Procedure</h2></div><ol class="ol steps"><li class="li step stepexpand">
  17. <span class="ph cmd">Using the OASIS catalog format, create an XML catalog file that contains only the new values that you want
  18. to add to a DITA-OT catalog file.</span>
  19. </li><li class="li step stepexpand">
  20. <span class="ph cmd">Create a <span class="ph filepath">plugin.xml</span> file that contains the following content:</span>
  21. <div class="itemgroup info"><pre class="pre codeblock language-xml normalize-space show-line-numbers show-whitespace"><code>&lt;plugin id="<var class="keyword varname">plugin-id</var>"&gt;
  22. &lt;feature extension="<var class="keyword varname">extension-point</var>" file="<var class="keyword varname">file</var>"/&gt;
  23. &lt;/plugin&gt;</code></pre>where:
  24. <ul class="ul">
  25. <li class="li"><var class="keyword varname">plugin-id</var> is the plug-in identifier, for example,
  26. <code class="ph codeph">com.example.catalog</code>.</li>
  27. <li class="li"><var class="keyword varname">extension-point</var> is either <span class="keyword parmname">dita.specialization.catalog.relative</span>
  28. or <span class="keyword parmname">org.dita.pdf2.catalog.relative</span>.</li>
  29. <li class="li"><var class="keyword varname">file</var> is the name of the new catalog file, for example,
  30. <span class="ph filepath">catalog-dita.xml</span>. </li>
  31. </ul></div>
  32. </li><li class="li step stepexpand">
  33. <span class="ph cmd">Save the new XML catalog file to your plug-in. Be sure that the local file references are relative to the
  34. location of the catalog and plug-in.</span>
  35. </li><li class="li step stepexpand">
  36. <span class="ph cmd">Install the plug-in.</span>
  37. </li></ol></section>
  38. <section class="section result"><div class="tasklabel"><h2 class="sectiontitle tasklabel">Results</h2></div>The catalog entries inside of the new catalog file are added to the core DITA-OT catalog file.</section>
  39. <section class="example"><h2 class="title sectiontitle">Example</h2>
  40. <p class="p">This example assumes that <span class="ph filepath">catalog-dita.xml</span> contains an OASIS catalog for any document-type
  41. shells inside this plug-in. The catalog entries in <span class="ph filepath">catalog-dita.xml</span> are relative to the
  42. catalog itself; when the plug-in is installed, they are added to the core DITA-OT catalog (with the correct
  43. path).</p>
  44. <pre class="pre codeblock language-xml normalize-space show-line-numbers show-whitespace"><code>&lt;plugin id="com.example.catalog"&gt;
  45. &lt;feature extension="dita.specialization.catalog.relative"
  46. file="catalog-dita.xml"/&gt;
  47. &lt;/plugin&gt;</code></pre>
  48. </section>
  49. </div>
  50. <nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/plugin-applications.html" title="Plug-ins allow you to extend the functionality of DITA-OT. This might entail adding support for specialized document types, integrating processing overrides, or defining new output transformations.">Plug-in applications</a></div></div><div class="linklist relinfo reltasks"><strong>Related tasks</strong><br><ul class="linklist"><li class="linklist"><a class="link" href="../topics/plugins-installing.html" title="Use the dita command to install a plug-in.">Installing plug-ins</a></li></ul></div><div class="linklist relinfo relref"><strong>Related reference</strong><br><ul class="linklist"><li class="linklist"><a class="link" href="../extension-points/plugin-extension-points-general.html" title="These extension points enable you to extend DITA-OT. You can add Ant targets or imports; add a Java library to the classpath parameter; add a new transformation type; extend a catalog file; add new diagnostic messages, and more.">General extension points</a></li></ul></div></nav></article></main></body></html>