pdf-plugin-structure_common-vars.dita 2.9 KB

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