plugin-xmlcatalog.dita 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
  3. <!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
  4. <task id="plugin-xmlcatalog" xml:lang="en-US">
  5. <title>Extending an XML catalog file</title>
  6. <shortdesc>You can update either the main DITA-OT XML catalog or the XML catalog that is used by the PDF plug-in. This
  7. enables DITA-OT to support new specializations and document-type shells.</shortdesc>
  8. <prolog>
  9. <metadata>
  10. <keywords>
  11. <indexterm>deprecated features<indexterm><parmname>dita.specialization.catalog</parmname></indexterm></indexterm>
  12. <indexterm>DITA<indexterm>specializations</indexterm></indexterm>
  13. <indexterm>plug-ins<indexterm>DITA specializations</indexterm></indexterm>
  14. <indexterm>OASIS</indexterm>
  15. <indexterm>catalog<indexterm>extending</indexterm></indexterm>
  16. </keywords>
  17. </metadata>
  18. </prolog>
  19. <taskbody>
  20. <context>
  21. <p>You can use the <parmname>dita.specialization.catalog.relative</parmname> and
  22. <parmname>org.dita.pdf2.catalog.relative</parmname> extension points to update the DITA-OT catalog files.</p>
  23. <note type="remember">The <parmname>dita.specialization.catalog</parmname> extension is deprecated. Use
  24. <parmname>dita.specialization.catalog.relative</parmname> instead.</note>
  25. </context>
  26. <steps>
  27. <step>
  28. <cmd>Using the OASIS catalog format, create an XML catalog file that contains only the new values that you want
  29. to add to a DITA-OT catalog file.</cmd>
  30. </step>
  31. <step>
  32. <cmd>Create a <filepath>plugin.xml</filepath> file that contains the following content:</cmd>
  33. <info><codeblock outputclass="language-xml normalize-space show-line-numbers show-whitespace">&lt;plugin id="<varname>plugin-id</varname>">
  34. &lt;feature extension="<varname>extension-point</varname>" file="<varname>file</varname>"/>
  35. &lt;/plugin></codeblock>where:
  36. <ul>
  37. <li><varname>plugin-id</varname> is the plug-in identifier, for example,
  38. <codeph>com.example.catalog</codeph>.</li>
  39. <li><varname>extension-point</varname> is either <parmname>dita.specialization.catalog.relative</parmname>
  40. or <parmname>org.dita.pdf2.catalog.relative</parmname>.</li>
  41. <li><varname>file</varname> is the name of the new catalog file, for example,
  42. <filepath>catalog-dita.xml</filepath>. </li>
  43. </ul></info>
  44. </step>
  45. <step>
  46. <cmd>Save the new XML catalog file to your plug-in. Be sure that the local file references are relative to the
  47. location of the catalog and plug-in.</cmd>
  48. </step>
  49. <step>
  50. <cmd>Install the plug-in.</cmd>
  51. </step>
  52. </steps>
  53. <result>The catalog entries inside of the new catalog file are added to the core DITA-OT catalog file.</result>
  54. <example>
  55. <title>Example</title>
  56. <p>This example assumes that <filepath>catalog-dita.xml</filepath> contains an OASIS catalog for any document-type
  57. shells inside this plug-in. The catalog entries in <filepath>catalog-dita.xml</filepath> are relative to the
  58. catalog itself; when the plug-in is installed, they are added to the core DITA-OT catalog (with the correct
  59. path).</p>
  60. <codeblock outputclass="language-xml normalize-space show-line-numbers show-whitespace">&lt;plugin id="com.example.catalog">
  61. &lt;feature extension="dita.specialization.catalog.relative"
  62. file="catalog-dita.xml"/>
  63. &lt;/plugin></codeblock>
  64. </example>
  65. </taskbody>
  66. </task>