plugin-extension-points-xslt-parameters.html 8.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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="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."><meta name="DC.subject" content="XSLT, parameters, preprocessing, extension points, parameters"><meta name="keywords" content="XSLT, parameters, preprocessing, extension points, parameters"><meta name="DC.relation" scheme="URI" content="../extension-points/plugin-extension-points.html"><meta name="DC.format" content="HTML5"><meta name="DC.identifier" content="plugin-extension-points-xslt-parameters"><link rel="stylesheet" type="text/css" href="../css/commonltr.css"><link rel="stylesheet" type="text/css" href="../css/dita-ot-doc.css"><title>XSLT-parameter extension points</title></head><body id="plugin-extension-points-xslt-parameters"><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><ul><li><a href="../extension-points/all-extension-points.html">All extension points</a></li><li><a href="../extension-points/plugin-extension-points-general.html">General extension points</a></li><li><a href="../extension-points/plugin-extension-points-pre-processing.html">Pre-processing extension points</a></li><li><a href="../extension-points/plugin-extension-points-xslt-import.html">XSLT-import extension points</a></li><li class="active"><a href="../extension-points/plugin-extension-points-xslt-parameters.html">XSLT-parameter extension points</a></li><li><a href="../extension-points/plugin-extension-points-support.html">Version and support information</a></li><li><a href="../extension-points/extension-points-by-plugin.html">Plug-in extension points</a></li></ul></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">XSLT-parameter extension points</h1>
  8. <div class="body refbody"><p class="shortdesc">You can use these extension points to pass parameters into existing XSLT steps in both the pre-processing
  9. pipeline and DITA-OT transformation. The parameters generally will be available as global
  10. <code class="keyword markupname xmlelement">&lt;xsl:param&gt;</code> values with XSLT overrides.</p>
  11. <section class="section"><h2 class="title sectiontitle">Pre-processing</h2>
  12. <p class="p">You can use the following extension points to pass parameters to modules in the pre-processing pipeline:</p>
  13. <dl class="dl">
  14. <dt class="dt dlterm"><span class="keyword parmname">dita.preprocess.conref.param</span></dt>
  15. <dd class="dd">Pass parameters to the <code class="ph codeph">conref</code> module in the pre-processing pipeline</dd>
  16. <dt class="dt dlterm"><span class="keyword parmname">dita.preprocess.mappull.param</span></dt>
  17. <dd class="dd">Pass parameters to the <code class="ph codeph">mappull</code> module in the pre-processing pipeline</dd>
  18. <dt class="dt dlterm"><span class="keyword parmname">dita.preprocess.mapref.param</span></dt>
  19. <dd class="dd">Pass parameters to the <code class="ph codeph">mapref</code> module in the pre-processing pipeline</dd>
  20. <dt class="dt dlterm"><span class="keyword parmname">dita.preprocess.topicpull.param</span></dt>
  21. <dd class="dd">Pass parameters to the <code class="ph codeph">topicpull</code> module in the pre-processing pipeline</dd>
  22. </dl>
  23. </section>
  24. <section class="section"><h2 class="title sectiontitle">Transformations</h2>
  25. <p class="p">You can use the following extension points to pass parameters to modules in DITA-OT transformations:</p>
  26. <dl class="dl">
  27. <dt class="dt dlterm"><span class="keyword parmname">dita.conductor.eclipse.toc.param</span></dt>
  28. <dd class="dd">Pass parameters to the XSLT step that generates the Eclipse Help table of contents (TOC).</dd>
  29. <dt class="dt dlterm"><span class="keyword parmname">dita.conductor.html.param</span></dt>
  30. <dd class="dd">Pass
  31. parameters to the HTML and HTML Help
  32. transformations.</dd>
  33. <dt class="dt dlterm"><span class="keyword parmname">dita.conductor.html5.param</span></dt>
  34. <dd class="dd">Pass
  35. parameters to the HTML5 transformation.</dd>
  36. <dt class="dt dlterm"><span class="keyword parmname">dita.conductor.html5.toc.param</span></dt>
  37. <dd class="dd">Pass
  38. parameters to the XSLT step that generates the HTML5 table of contents (TOC).</dd>
  39. <dt class="dt dlterm"><span class="keyword parmname">dita.conductor.pdf2.param</span></dt>
  40. <dd class="dd">Pass
  41. parameters to the PDF transformation.</dd>
  42. <dt class="dt dlterm"><span class="keyword parmname">dita.conductor.xhtml.param</span></dt>
  43. <dd class="dd">Pass
  44. parameters to the XHTML and Eclipse Help transformations.</dd>
  45. <dt class="dt dlterm"><span class="keyword parmname">dita.conductor.xhtml.toc.param</span></dt>
  46. <dd class="dd">Pass
  47. parameters to the XSLT step that generates the XHTML table of contents (TOC).</dd>
  48. </dl>
  49. </section>
  50. <div class="example"><h2 class="title sectiontitle">Example</h2>
  51. <p class="p">The following two files represent a complete (albeit simple) plug-in that passes the parameters defined in the
  52. <span class="ph filepath">insertParameters.xml</span> file to the XHTML transformation process.</p>
  53. <figure class="fig fignone"><figcaption><span class="fig--title-label">Figure 1. </span>Contents of the <span class="ph filepath">plugin.xml</span> file</figcaption>
  54. <pre class="pre codeblock language-xml normalize-space show-line-numbers show-whitespace"><code>&lt;plugin id="com.example.newparam"&gt;
  55. &lt;feature extension="dita.conductor.xhtml.param"
  56. file="insertParameters.xml"/&gt;
  57. &lt;/plugin&gt;</code></pre>
  58. </figure>
  59. <figure class="fig fignone"><figcaption><span class="fig--title-label">Figure 2. </span>Contents of the <span class="ph filepath">insertParameters.xml</span></figcaption>
  60. <pre class="pre codeblock language-xml normalize-space show-line-numbers show-whitespace"><code>&lt;dummy xmlns:if="ant:if" xmlns:unless="ant:unless"&gt;
  61. <em class="ph i">&lt;!-- Any Ant code allowed in xslt task is possible. Example: --&gt;</em>
  62. &lt;param name="paramNameinXSLT" expression="${antProperty}"
  63. if:set="antProperty"/&gt;
  64. &lt;/dummy&gt;</code></pre>
  65. </figure>
  66. </div>
  67. </div>
  68. <nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../extension-points/plugin-extension-points.html" title="DITA Open Toolkit provides a series of extension points that can be used to integrate changes into the core code. Extension points are defined in the plugin.xml file for each plug-in. When plug-ins are installed, DITA-OT makes each extension visible to the rest of the toolkit.">Extension points</a></div></div></nav></article></main></body></html>