customizing.dita 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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="customizing" xml:lang="en-US">
  5. <title>Customizing DITA Open Toolkit</title>
  6. <titlealts>
  7. <navtitle>Customizing DITA-OT</navtitle>
  8. </titlealts>
  9. <shortdesc>There are several ways to customize and extend the toolkit. You can adjust various aspects of the default
  10. output by setting parameters or using custom stylesheets. For more complex customizations, use custom DITA-OT
  11. plug-ins to override other parts of processing.</shortdesc>
  12. <prolog>
  13. <metadata>
  14. <keywords>
  15. <indexterm>plug-ins<indexterm>best practices</indexterm></indexterm>
  16. <indexterm>upgrading<indexterm>default plug-ins</indexterm></indexterm>
  17. </keywords>
  18. </metadata>
  19. </prolog>
  20. <refbody>
  21. <section>
  22. <p>A single XSL file can be used as an override by passing it in as a parameter. For example, when building XHTML
  23. content, the XSL parameter allows users to specify a single local XSL file (inside or outside of the toolkit)
  24. that is called in place of the default XHTML code. Typically, this code imports the default processing code, and
  25. overrides a couple of processing routines. This approach is best when the override is very minimal, or when the
  26. style varies from build to build. However, any extension made with this sort of override is also possible with a
  27. plug-in.</p>
  28. <p>Creating a plug-in can be very simple to very complex, and is generally the best method for changing or
  29. extending the toolkit. Plug-ins can be used to accomplish almost any modification that is needed for toolkit
  30. processing, from minor style tweaks to extensive, complicated new output formats.</p>
  31. <p>Editing DITA-OT code directly is strongly discouraged. Modifying the code directly significantly increases the
  32. work and risk involved with future upgrades. It is also likely that such modifications will break plug-ins
  33. provided by others, limiting the functions available to the toolkit.</p>
  34. <note type="warning">Any changes made directly in the code would be overwritten when upgrading to newer versions
  35. of DITA-OT, so users that have customized their toolkit installation in this way are often “stuck” on older
  36. versions of the toolkit and unable to take advantage of improvements in recent versions of DITA-OT.</note>
  37. </section>
  38. </refbody>
  39. </reference>