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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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="You can use theses 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.Relation" scheme="URI" content="../dev_ref/plugin-extension-points.html"><meta name="DC.Format" content="XHTML"><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 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><ul><li><a href="../dev_ref/plugin-extension-points-general.html">General extension points</a></li><li><a href="../dev_ref/plugin-extension-points-pre-processing.html">Pre-processing extension points</a></li><li><a href="../dev_ref/plugin-extension-points-xslt-import.html">XSLT-import extension points</a></li><li class="active"><a href="../dev_ref/plugin-extension-points-xslt-parameters.html">XSLT-parameter extension points</a></li><li><a href="../dev_ref/plugin-extension-points-support.html">Version and support information</a></li><li><a href="../extension-points/all-extension-points.html">All extension points</a></li></ul></li><li><a href="../dev_ref/pdf-customization.html">Customizing PDF output</a></li><li><a href="../dev_ref/migration.html">Migrating customizations</a></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">XSLT-parameter extension points</h1>
  8. <div class="body refbody"><p class="shortdesc">You can use theses 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.maplink.param</span></dt>
  17. <dd class="dd">Pass parameters to the <code class="ph codeph">maplink</code> module in the pre-processing pipeline</dd>
  18. <dt class="dt dlterm"><span class="keyword parmname">dita.preprocess.mappull.param</span></dt>
  19. <dd class="dd">Pass parameters to the <code class="ph codeph">mappull</code> module in the pre-processing pipeline</dd>
  20. <dt class="dt dlterm"><span class="keyword parmname">dita.preprocess.mapref.param</span></dt>
  21. <dd class="dd">Pass parameters to the <code class="ph codeph">mapref</code> module in the pre-processing pipeline</dd>
  22. <dt class="dt dlterm"><span class="keyword parmname">dita.preprocess.topicpull.param</span></dt>
  23. <dd class="dd">Pass parameters to the <code class="ph codeph">topicpull</code> module in the pre-processing pipeline</dd>
  24. </dl>
  25. </section>
  26. <section class="section"><h2 class="title sectiontitle">Transformations</h2>
  27. <p class="p">You can use the following extension points to pass parameters to modules in DITA-OT transformations:</p>
  28. <dl class="dl">
  29. <dt class="dt dlterm"><span class="keyword parmname">dita.conductor.eclipse.toc.param</span></dt>
  30. <dd class="dd">Pass parameters to the XSLT step that generates the Eclipse Help table of contents (TOC).</dd>
  31. <dt class="dt dlterm"><span class="keyword parmname">dita.conductor.html.param</span></dt>
  32. <dd class="dd">Pass parameters to the HTML and HTML Help transformations.</dd>
  33. <dt class="dt dlterm"><span class="keyword parmname">dita.conductor.pdf2.param</span></dt>
  34. <dd class="dd">Pass parameters to the PDF (formerly PDF2) transformation.</dd>
  35. <dt class="dt dlterm"><span class="keyword parmname">dita.conductor.xhtml.param</span></dt>
  36. <dd class="dd">Pass parameters to the XHTML and Eclipse Help transformations.</dd>
  37. <dt class="dt dlterm"><span class="keyword parmname">dita.conductor.xhtml.toc.param</span></dt>
  38. <dd class="dd">Pass parameters to to the XSLT step that generates the XHTML table of contents (TOC).</dd>
  39. </dl>
  40. </section>
  41. <div class="example"><h2 class="title sectiontitle">Example</h2>
  42. <p class="p">The following two files represent a complete (albeit simple) plug-in that passes the
  43. parameters defined in the <span class="ph filepath">insertParameters.xml</span> file to the XHTML
  44. transformation process.</p>
  45. <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>
  46. <pre class="pre codeblock"><code>&lt;plugin id="com.example.newparam"&gt;
  47. &lt;feature extension="dita.conductor.xhtml.param" file="insertParameters.xml"/&gt;
  48. &lt;/plugin&gt;</code></pre>
  49. </figure>
  50. <figure class="fig fignone"><figcaption><span class="fig--title-label">Figure 2. </span>Contents of the <span class="ph filepath">insertParameters.xml</span></figcaption>
  51. <pre class="pre codeblock"><code>&lt;dummy&gt;
  52. &lt;!-- Any Ant code allowed in xslt task is possible. Common example: --&gt;
  53. &lt;param name="paramNameinXSLT" expression="${antProperty}" if="antProperty"/&gt;
  54. &lt;/dummy&gt;</code></pre>
  55. </figure>
  56. </div>
  57. </div>
  58. <nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../dev_ref/plugin-extension-points.html" title="The 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, the DITA-OT makes each extension visible to the rest of the toolkit.">Extension points</a></div></div></nav></article></main></body></html>