pdf-plugin-structure_common-vars.dita 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
  3. <!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
  4. <topic id="variable_overrides_the_common_vars_folder">
  5. <title>Variable overrides</title>
  6. <shortdesc>The <filepath>common/vars</filepath> folder houses custom variable definitions that override the standard
  7. definitions in <filepath>org.dita.pdf2/cfg/common/vars</filepath>. </shortdesc>
  8. <prolog>
  9. <metadata>
  10. <keywords>
  11. <indexterm><xmlelement>variable</xmlelement></indexterm>
  12. <indexterm><xmlelement>param</xmlelement></indexterm>
  13. <indexterm><xmlatt>id</xmlatt>
  14. <indexterm>variables, overriding</indexterm></indexterm>
  15. <indexterm>languages
  16. <indexterm>adding support for</indexterm></indexterm>
  17. <indexterm>languages
  18. <indexterm>ISO 639-1</indexterm></indexterm>
  19. <indexterm>ISO 639-1</indexterm>
  20. </keywords>
  21. </metadata>
  22. </prolog>
  23. <body>
  24. <p>As with index configuration, each file contains data for a single language, and should take that language’s ISO
  25. 639-1 language designator as its name.</p>
  26. <p>Variable files contain a set of <xmlelement>variable</xmlelement> elements, identified by their
  27. <xmlatt>id</xmlatt> attribute. The variable definitions are used to store static text that is used as part of
  28. the published outputs. For example, page headers, hyperlinks, etc. The id attribute for each variable should make
  29. it clear how the variable text is being used.</p>
  30. <p>Some variables contain <xmlelement>param</xmlelement> elements which indicate parameter values that are
  31. substituted at publish time by the XSL. For example, a page number that is being generated as part of the
  32. publishing process might be identified by &amp;lt;param ref-name="number"/&amp;gt; When editing or translating a
  33. variable file, these should be included in the translation, though they can be moved and rearranged within the
  34. <xmlelement>variable</xmlelement> content as needed.</p>
  35. <p>The best way to start editing a custom variables file is by making a copy of the original from
  36. <filepath>org.dita.pdf2/cfg/common/vars</filepath> and making changes as desired. When adding a new language,
  37. start from an existing language’s list of variables and translate each entry as needed.</p>
  38. <p>Note that unchanged <xmlelement>variable</xmlelement> elements can be omitted: the custom variables file need
  39. only include those <xmlelement>variable</xmlelement> elements which you have modified. Variables not found in the
  40. custom file will are taken from the standard variable files.</p>
  41. <p>Applying a custom variable does not require modifying the <filepath>catalog.xml</filepath> file. The publishing
  42. process will automatically use any custom variables definitions in place of the original ones.</p>
  43. </body>
  44. </topic>