generate-copy-outer.dita 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
  3. <!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
  4. <concept id="ID">
  5. <title>Handling content outside the map directory</title>
  6. <shortdesc>By default, DITA-OT assumes content is located in or beneath the directory containing the DITA map file.
  7. The <parmname>generate.copy.outer</parmname> parameter can be used to adjust how output is generated for content
  8. that is located outside the map directory.</shortdesc>
  9. <conbody>
  10. <section>
  11. <title>Background</title>
  12. <p>This is an issue in the following situations:
  13. <ul>
  14. <li>The DITA map is in a directory that is a peer to directories that contain referenced objects.</li>
  15. <li>The DITA map is in a directory that is below the directories that contain the referenced objects.</li>
  16. </ul></p>
  17. <p>Let’s assume that the directory structure for the DITA content looks like the following:</p>
  18. <p><pre>images/
  19. fig.png
  20. maps/
  21. start.ditamap
  22. topics/
  23. topic.dita</pre></p>
  24. <p>The DITA map is in the <filepath>maps</filepath> directory, the topics are in the <filepath>topics</filepath>
  25. directory, and the images are in the <filepath>images</filepath> directory.</p>
  26. </section>
  27. <section>
  28. <title>Exclude content outside the map directory</title>
  29. <p>Let’s assume that you run the HTML5 transformation. By default, the DITA-OT uses the
  30. <parmname>generate.copy.outer</parmname> parameter with a value of <option>1</option>, which means that no
  31. output is generated for content that is located outside the DITA map directory.</p>
  32. <p>You receive only the following output:</p>
  33. <p><pre>index.html
  34. commonltr.css
  35. commonrtl.css</pre></p>
  36. <p>The <filepath>index.html</filepath> file contains the navigation structure, but all the links are broken, since
  37. no HTML files were built for the topics.</p>
  38. <p>How do you fix this? By adjusting the parameter setting to shift the output directory.</p>
  39. </section>
  40. <section>
  41. <title>Shift the output directory to include all content</title>
  42. <p>To preserve the links to referenced topics and images and make it easier to copy the output directory, set the
  43. <parmname>generate.copy.outer</parmname> parameter to <option>3</option>.</p>
  44. <p>Now your output directory structure resembles the structure of the source directory:</p>
  45. <p><pre>images/
  46. fig.png
  47. maps/
  48. index.html
  49. topics/
  50. topic.html
  51. commonltr.css
  52. commonrtl.css</pre></p>
  53. <p>The <filepath>index.html</filepath> file is in the <filepath>maps</filepath> directory, the HTML files for the
  54. topics are in the <filepath>topics</filepath> directory, and the referenced images are in the
  55. <filepath>images</filepath> directory.</p>
  56. <note type="tip">If <parmname>args.csspath</parmname> is not set, the default CSS files (and any custom CSS files
  57. specified via <parmname>args.css</parmname>) will be copied to the root level of the output folder. To copy CSS
  58. files to an output subfolder named <filepath>css</filepath>, set <parmname>args.csspath</parmname> to
  59. <option>css</option>.</note>
  60. </section>
  61. </conbody>
  62. </concept>