project-files-xml.dita 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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>Sample XML project files</title>
  6. <titlealts>
  7. <navtitle>XML project files</navtitle>
  8. </titlealts>
  9. <shortdesc>DITA-OT includes sample XML project files that can be used to define a publication project. The XML format
  10. can be validated with a RELAX NG schema provided in the <filepath>resources</filepath> folder of the DITA-OT
  11. installation (<filepath>project.rnc</filepath>).</shortdesc>
  12. <prolog>
  13. <metadata>
  14. <keywords>
  15. <indexterm>XML project files</indexterm>
  16. <indexterm>project files
  17. <indexterm>XML</indexterm></indexterm>
  18. </keywords>
  19. </metadata>
  20. </prolog>
  21. <conbody>
  22. <p>Project files can be designed in a modular fashion to create reusable configuration structures that allow you to
  23. define settings in one file and refer to them in other projects to publish multiple deliverables at once.</p>
  24. <p>For example, <filepath conkeyref="conref-task/samples-dir"/><filepath>/project-files/html.xml</filepath> defines
  25. a single HTML deliverable.</p>
  26. <fig>
  27. <title>Sample project file for HTML output</title>
  28. <codeblock outputclass="language-xml normalize-space show-line-numbers show-whitespace"><coderef href="../samples/project-files/html.xml"/></codeblock>
  29. </fig>
  30. <p>This file can be used to generate the HTML version of the DITA-OT documentation by running the following command
  31. from the <filepath>docsrc</filepath> folder of the DITA-OT installation directory:</p>
  32. <codeblock><cmdname>dita</cmdname> <parmname>--project</parmname>=<varname>samples/project-files/html.xml</varname></codeblock>
  33. <p>The project file for HTML output imports the common <codeph>html</codeph> context from a shared project context
  34. defined in the <filepath conkeyref="conref-task/samples-dir"/><filepath>/project-files/common.xml</filepath> file,
  35. which includes the input map file and the DITAVAL file used to filter the output.</p>
  36. <fig>
  37. <title>Sample shared context for HTML-based output</title>
  38. <codeblock outputclass="language-xml normalize-space show-line-numbers show-whitespace"><coderef href="../samples/project-files/common.xml"/></codeblock>
  39. </fig>
  40. <p>The same common <codeph>html</codeph> context is also referenced in the project file for HTMLHelp output, as
  41. illustrated in <filepath conkeyref="conref-task/samples-dir"
  42. /><filepath>/project-files/htmlhelp.xml</filepath>.</p>
  43. <fig>
  44. <title>Sample project file for HTMLHelp output</title>
  45. <codeblock outputclass="language-xml normalize-space show-line-numbers show-whitespace"><coderef href="../samples/project-files/htmlhelp.xml"/></codeblock>
  46. </fig>
  47. <p>The <filepath conkeyref="conref-task/samples-dir"/><filepath>/project-files/pdf.xml</filepath> file defines a
  48. single PDF deliverable.</p>
  49. <fig>
  50. <title>Sample project file for PDF output</title>
  51. <codeblock outputclass="language-xml normalize-space show-line-numbers show-whitespace"><coderef href="../samples/project-files/pdf.xml"/></codeblock>
  52. </fig>
  53. <p>This file can be used to generate the PDF version of the DITA-OT documentation by running the following command
  54. from the <filepath>docsrc</filepath> folder of the DITA-OT installation directory:</p>
  55. <codeblock><cmdname>dita</cmdname> <parmname>--project</parmname>=<varname>samples/project-files/pdf.xml</varname></codeblock>
  56. <p>The <filepath conkeyref="conref-task/samples-dir"/><filepath>/project-files/distribution-docs.xml</filepath> file
  57. includes both the HTML and PDF projects as follows:</p>
  58. <codeblock outputclass="language-xml normalize-space show-whitespace"><coderef href="../samples/project-files/distribution-docs.xml#line-range(3,6)"/></codeblock>
  59. <p>To build both the HTML and PDF versions of the documentation as included in the distribution package, run the
  60. following command from the <filepath>docsrc</filepath> folder of the DITA-OT installation directory:</p>
  61. <codeblock><cmdname>dita</cmdname> <parmname>--project</parmname>=<varname>samples/project-files/distribution-docs.xml</varname></codeblock>
  62. <p>The <filepath conkeyref="conref-task/samples-dir"/><filepath>/project-files/all.xml</filepath> file includes all
  63. three project deliverables as follows:</p>
  64. <codeblock outputclass="language-xml normalize-space show-whitespace"><coderef href="../samples/project-files/all.xml#line-range(3,7)"/></codeblock>
  65. </conbody>
  66. </concept>