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

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