plugin-extension-points-xslt-parameters.dita 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
  3. <!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
  4. <reference id="plugin-extension-points-xslt-parameters">
  5. <title>XSLT-parameter extension points</title>
  6. <shortdesc>You can use these extension points to pass parameters into existing XSLT steps in both the pre-processing
  7. pipeline and DITA-OT transformation. The parameters generally will be available as global
  8. <xmlelement>xsl:param</xmlelement> values with XSLT overrides.</shortdesc>
  9. <prolog>
  10. <metadata>
  11. <keywords>
  12. <indexterm>XSLT
  13. <indexterm>parameters</indexterm></indexterm>
  14. <indexterm>preprocessing
  15. <indexterm>extension points, parameters</indexterm></indexterm>
  16. </keywords>
  17. </metadata>
  18. </prolog>
  19. <refbody>
  20. <section>
  21. <title>Pre-processing</title>
  22. <p>You can use the following extension points to pass parameters to modules in the pre-processing pipeline:</p>
  23. <dl>
  24. <dlentry>
  25. <dt><parmname>dita.preprocess.conref.param</parmname></dt>
  26. <dd>Pass parameters to the <codeph>conref</codeph> module in the pre-processing pipeline</dd>
  27. </dlentry>
  28. <dlentry>
  29. <dt><parmname>dita.preprocess.mappull.param</parmname></dt>
  30. <dd>Pass parameters to the <codeph>mappull</codeph> module in the pre-processing pipeline</dd>
  31. </dlentry>
  32. <dlentry>
  33. <dt><parmname>dita.preprocess.mapref.param</parmname></dt>
  34. <dd>Pass parameters to the <codeph>mapref</codeph> module in the pre-processing pipeline</dd>
  35. </dlentry>
  36. <dlentry>
  37. <dt><parmname>dita.preprocess.topicpull.param</parmname></dt>
  38. <dd>Pass parameters to the <codeph>topicpull</codeph> module in the pre-processing pipeline</dd>
  39. </dlentry>
  40. </dl>
  41. </section>
  42. <section>
  43. <title>Transformations</title>
  44. <p>You can use the following extension points to pass parameters to modules in DITA-OT transformations:</p>
  45. <dl>
  46. <dlentry>
  47. <dt><parmname>dita.conductor.eclipse.toc.param</parmname></dt>
  48. <dd conaction="pushreplace"
  49. conref="extension-points-in-org.dita.eclipsehelp.dita#org.dita.eclipsehelp-ext/dita.conductor.eclipse.toc.param.desc"
  50. >Pass parameters to the XSLT step that generates the Eclipse Help table of contents (TOC).</dd>
  51. </dlentry>
  52. <dlentry>
  53. <dt><parmname>dita.conductor.html.param</parmname></dt>
  54. <dd conaction="pushreplace"
  55. conref="extension-points-in-org.dita.xhtml.dita#org.dita.xhtml-ext/dita.conductor.html.param.desc">Pass
  56. parameters to the <?oxy_comment_start author="Roger"comment="Verify"?>HTML and<?oxy_comment_end?> HTML Help
  57. transformations.</dd>
  58. </dlentry>
  59. <dlentry>
  60. <dt><parmname>dita.conductor.html5.param</parmname></dt>
  61. <dd conaction="pushreplace"
  62. conref="extension-points-in-org.dita.html5.dita#org.dita.html5-ext/dita.conductor.html5.param.desc">Pass
  63. parameters to the HTML5 transformation.</dd>
  64. </dlentry>
  65. <dlentry>
  66. <dt><parmname>dita.conductor.html5.toc.param</parmname></dt>
  67. <dd conaction="pushreplace"
  68. conref="extension-points-in-org.dita.html5.dita#org.dita.html5-ext/dita.conductor.html5.toc.param.desc">Pass
  69. parameters to the XSLT step that generates the HTML5 table of contents (TOC).</dd>
  70. </dlentry>
  71. <dlentry>
  72. <dt><parmname>dita.conductor.pdf2.param</parmname></dt>
  73. <dd conaction="pushreplace"
  74. conref="extension-points-in-org.dita.pdf2.dita#org.dita.pdf2-ext/dita.conductor.pdf2.param.desc">Pass
  75. parameters to the PDF transformation.</dd>
  76. </dlentry>
  77. <dlentry>
  78. <dt><parmname>dita.conductor.xhtml.param</parmname></dt>
  79. <dd conaction="pushreplace"
  80. conref="extension-points-in-org.dita.xhtml.dita#org.dita.xhtml-ext/dita.conductor.xhtml.param.desc">Pass
  81. parameters to the XHTML and Eclipse Help transformations.</dd>
  82. </dlentry>
  83. <dlentry>
  84. <dt><parmname>dita.conductor.xhtml.toc.param</parmname></dt>
  85. <dd conaction="pushreplace"
  86. conref="extension-points-in-org.dita.xhtml.dita#org.dita.xhtml-ext/dita.conductor.xhtml.toc.param.desc">Pass
  87. parameters to the XSLT step that generates the XHTML table of contents (TOC).</dd>
  88. </dlentry>
  89. </dl>
  90. </section>
  91. <example>
  92. <title>Example</title>
  93. <p>The following two files represent a complete (albeit simple) plug-in that passes the parameters defined in the
  94. <filepath>insertParameters.xml</filepath> file to the XHTML transformation process.</p>
  95. <fig>
  96. <title>Contents of the <filepath>plugin.xml</filepath> file</title>
  97. <codeblock outputclass="language-xml normalize-space show-line-numbers show-whitespace">&lt;plugin id="com.example.newparam">
  98. &lt;feature extension="dita.conductor.xhtml.param"
  99. file="insertParameters.xml"/>
  100. &lt;/plugin></codeblock>
  101. </fig>
  102. <fig>
  103. <title>Contents of the <filepath>insertParameters.xml</filepath></title>
  104. <codeblock outputclass="language-xml normalize-space show-line-numbers show-whitespace">&lt;dummy xmlns:if="ant:if" xmlns:unless="ant:unless">
  105. <i>&lt;!-- Any Ant code allowed in xslt task is possible. Example: --></i>
  106. &lt;param name="paramNameinXSLT" expression="${antProperty}"
  107. if:set="antProperty"/>
  108. &lt;/dummy></codeblock>
  109. </fig>
  110. </example>
  111. </refbody>
  112. </reference>