123 lines
		
	
	
		
			No EOL
		
	
	
		
			12 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			123 lines
		
	
	
		
			No EOL
		
	
	
		
			12 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<!DOCTYPE html
 | 
						|
  SYSTEM "about:legacy-compat">
 | 
						|
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2020"><meta name="generator" content="DITA-OT"><meta name="description" content="DITA-OT includes sample XML project files that can be used to define a publication project. The XML format can be validated with a RELAX NG schema provided in the resources folder of the DITA-OT installation (project.rnc)."><meta name="keywords" content="XML project files, project files, XML"><link rel="stylesheet" type="text/css" href="../css/commonltr.css"><link rel="stylesheet" type="text/css" href="../css/dita-ot-doc.css"><title>Sample XML project files</title></head><body id="ID"><header role="banner"><div class="header">
 | 
						|
  <p>DITA Open Toolkit</p>
 | 
						|
  <hr>
 | 
						|
</div></header><nav role="toc"><ul><li><a href="../index.html">DITA Open Toolkit 3.6</a></li><li><a href="../release-notes/index.html">Release Notes</a></li><li><a href="../topics/installing-client.html">Installing DITA-OT</a></li><li><a href="../topics/building-output.html">Building output</a><ul><li><a href="../topics/build-using-dita-command.html">Using the dita command</a><ul><li><a href="../topics/using-dita-properties-file.html">Using a properties file</a></li><li><a href="../topics/migrating-ant-to-dita.html">Migrating Ant builds</a></li><li><a href="../topics/using-project-files.html">Using a project file</a><ul><li class="active"><a href="../topics/project-files-xml.html">XML project files</a></li><li><a href="../topics/project-files-json.html">JSON project files</a></li><li><a href="../topics/project-files-yaml.html">YAML project files</a></li></ul></li></ul></li><li><a href="../topics/using-docker-images.html">Using Docker images</a></li><li><a href="../topics/publishing-with-ant.html">Using Ant</a></li><li><a href="../reference/java-api.html">Using the Java API</a></li></ul></li><li><a href="../topics/input-formats.html">Authoring formats</a></li><li><a href="../topics/output-formats.html">Output formats</a></li><li><a href="../parameters/index.html">Parameters</a></li><li><a href="../topics/html-customization.html">Customizing HTML</a></li><li><a href="../topics/pdf-customization.html">Customizing PDF</a></li><li><a href="../topics/adding-plugins.html">Adding plug-ins</a></li><li><a href="../topics/custom-plugins.html">Creating plug-ins</a></li><li><a href="../topics/troubleshooting-overview.html">Troubleshooting</a></li><li><a href="../reference/index.html">Reference</a></li><li><a href="../topics/dita-and-dita-ot-resources.html">Resources</a></li></ul></nav><main role="main"><article role="article" aria-labelledby="ariaid-title1">
 | 
						|
  <h1 class="title topictitle1" id="ariaid-title1">Sample XML project files</h1>
 | 
						|
  
 | 
						|
  
 | 
						|
  
 | 
						|
  <div class="body conbody"><p class="shortdesc">DITA-OT includes sample XML project files that can be used to define a publication project. The XML format
 | 
						|
    can be validated with a RELAX NG schema provided in the <span class="ph filepath">resources</span> folder of the DITA-OT
 | 
						|
    installation (<span class="ph filepath">project.rnc</span>).</p>
 | 
						|
    <p class="p">Project files can be designed in a modular fashion to create reusable configuration structures that allow you to
 | 
						|
      define settings in one file and refer to them in other projects to publish multiple deliverables at once.</p>
 | 
						|
    <p class="p">For example, <span class="ph filepath"><var class="keyword varname">dita-ot-dir</var>/docsrc/samples</span><span class="ph filepath">/project-files/html.xml</span> defines
 | 
						|
      a single HTML deliverable.</p>
 | 
						|
    <figure class="fig fignone"><figcaption><span class="fig--title-label">Figure 1. </span>Sample project file for HTML output</figcaption>
 | 
						|
      
 | 
						|
      <pre class="pre codeblock language-xml normalize-space show-line-numbers show-whitespace"><code><?xml version="1.0" encoding="UTF-8"?>
 | 
						|
<?xml-model href="https://www.dita-ot.org/rng/project.rnc" type="application/relax-ng-compact-syntax"?>
 | 
						|
<project xmlns="https://www.dita-ot.org/project">
 | 
						|
  <include href="common.xml"/>
 | 
						|
  <deliverable name="HTML5" id="html">
 | 
						|
    <context idref="html"/>
 | 
						|
    <output href="."/>
 | 
						|
    <publication transtype="html5">
 | 
						|
      <param name="args.copycss" value="yes"/>
 | 
						|
      <param name="args.css" value="dita-ot-doc.css"/>
 | 
						|
      <param name="args.csspath" value="css"/>
 | 
						|
      <param name="args.cssroot" path="../../resources"/>
 | 
						|
      <param name="args.gen.task.lbl" value="YES"/>
 | 
						|
      <param name="args.hdr" href="../../resources/header.xml"/>
 | 
						|
      <param name="html5.toc.generate" value="no"/>
 | 
						|
      <param name="nav-toc" value="partial"/>
 | 
						|
      <param name="processing-mode" value="strict"/>
 | 
						|
    </publication>
 | 
						|
  </deliverable>
 | 
						|
</project></code></pre>
 | 
						|
    </figure>
 | 
						|
    <p class="p">This file can be used to generate the HTML version of the DITA-OT documentation by running the following command
 | 
						|
      from the <span class="ph filepath">docsrc</span> folder of the DITA-OT installation directory:</p>
 | 
						|
    <pre class="pre codeblock"><code><span class="keyword cmdname">dita</span> <span class="keyword parmname">--project</span>=<var class="keyword varname">samples/project-files/html.xml</var></code></pre>
 | 
						|
    <p class="p">The project file for HTML output imports the common <code class="ph codeph">html</code> context from a shared project context
 | 
						|
      defined in the <span class="ph filepath"><var class="keyword varname">dita-ot-dir</var>/docsrc/samples</span><span class="ph filepath">/project-files/common.xml</span> file,
 | 
						|
      which includes the input map file and the DITAVAL file used to filter the output.</p>
 | 
						|
    <figure class="fig fignone"><figcaption><span class="fig--title-label">Figure 2. </span>Sample shared context for HTML-based output</figcaption>
 | 
						|
      
 | 
						|
      <pre class="pre codeblock language-xml normalize-space show-line-numbers show-whitespace"><code><?xml version="1.0" encoding="UTF-8"?>
 | 
						|
<?xml-model href="https://www.dita-ot.org/rng/project.rnc" type="application/relax-ng-compact-syntax"?>
 | 
						|
<project xmlns="https://www.dita-ot.org/project">
 | 
						|
  <context id="html" name="HTML">
 | 
						|
    <input href="../../userguide.ditamap"/>
 | 
						|
    <profile>
 | 
						|
      <ditaval href="../../resources/html.ditaval"/>
 | 
						|
    </profile>
 | 
						|
  </context>
 | 
						|
</project></code></pre>
 | 
						|
    </figure>
 | 
						|
    <p class="p">The same common <code class="ph codeph">html</code> context is also referenced in the project file for HTMLHelp output, as
 | 
						|
      illustrated in <span class="ph filepath"><var class="keyword varname">dita-ot-dir</var>/docsrc/samples</span><span class="ph filepath">/project-files/htmlhelp.xml</span>.</p>
 | 
						|
    <figure class="fig fignone"><figcaption><span class="fig--title-label">Figure 3. </span>Sample project file for HTMLHelp output</figcaption>
 | 
						|
      
 | 
						|
      <pre class="pre codeblock language-xml normalize-space show-line-numbers show-whitespace"><code><?xml version="1.0" encoding="UTF-8"?>
 | 
						|
<?xml-model href="https://www.dita-ot.org/rng/project.rnc" type="application/relax-ng-compact-syntax"?>
 | 
						|
<project xmlns="https://www.dita-ot.org/project">
 | 
						|
  <deliverable name="HTMLHelp" id="htmlhelp">
 | 
						|
    <context idref="html"/>
 | 
						|
    <output href="htmlhelp"/>
 | 
						|
    <publication transtype="htmlhelp">
 | 
						|
      <param name="args.copycss" value="yes"/>
 | 
						|
      <param name="args.css" value="dita-ot-doc.css"/>
 | 
						|
      <param name="args.csspath" value="css"/>
 | 
						|
      <param name="args.cssroot" path="../../resources"/>
 | 
						|
      <param name="args.gen.task.lbl" value="YES"/>
 | 
						|
      <param name="processing-mode" value="strict"/>
 | 
						|
    </publication>
 | 
						|
  </deliverable>
 | 
						|
</project></code></pre>
 | 
						|
    </figure>
 | 
						|
    <p class="p">The <span class="ph filepath"><var class="keyword varname">dita-ot-dir</var>/docsrc/samples</span><span class="ph filepath">/project-files/pdf.xml</span> file defines a
 | 
						|
      single PDF deliverable.</p>
 | 
						|
    <figure class="fig fignone"><figcaption><span class="fig--title-label">Figure 4. </span>Sample project file for PDF output</figcaption>
 | 
						|
      
 | 
						|
      <pre class="pre codeblock language-xml normalize-space show-line-numbers show-whitespace"><code><?xml version="1.0" encoding="UTF-8"?>
 | 
						|
<?xml-model href="https://www.dita-ot.org/rng/project.rnc" type="application/relax-ng-compact-syntax"?>
 | 
						|
<project xmlns="https://www.dita-ot.org/project">
 | 
						|
  <deliverable id="pdf">
 | 
						|
    <context name="User Guide">
 | 
						|
      <input href="../../userguide-book.ditamap"/>
 | 
						|
    </context>
 | 
						|
    <output href="."/>
 | 
						|
    <publication transtype="pdf2">
 | 
						|
      <param name="args.chapter.layout" value="BASIC"/>
 | 
						|
      <param name="args.gen.task.lbl" value="YES"/>
 | 
						|
      <param name="include.rellinks" value="friend"/>
 | 
						|
      <param name="outputFile.base" value="userguide"/>
 | 
						|
      <param name="processing-mode" value="strict"/>
 | 
						|
    </publication>
 | 
						|
  </deliverable>
 | 
						|
</project></code></pre>
 | 
						|
    </figure>
 | 
						|
    <p class="p">This file can be used to generate the PDF version of the DITA-OT documentation by running the following command
 | 
						|
      from the <span class="ph filepath">docsrc</span> folder of the DITA-OT installation directory:</p>
 | 
						|
    <pre class="pre codeblock"><code><span class="keyword cmdname">dita</span> <span class="keyword parmname">--project</span>=<var class="keyword varname">samples/project-files/pdf.xml</var></code></pre>
 | 
						|
    <p class="p">The <span class="ph filepath"><var class="keyword varname">dita-ot-dir</var>/docsrc/samples</span><span class="ph filepath">/project-files/distribution-docs.xml</span> file
 | 
						|
      includes both the HTML and PDF projects as follows:</p>
 | 
						|
    <pre class="pre codeblock language-xml normalize-space show-whitespace"><code><project xmlns="https://www.dita-ot.org/project">
 | 
						|
  <include href="html.xml"/>
 | 
						|
  <include href="pdf.xml"/>
 | 
						|
</project></code></pre>
 | 
						|
    <p class="p">To build both the HTML and PDF versions of the documentation as included in the distribution package, run the
 | 
						|
      following command from the <span class="ph filepath">docsrc</span> folder of the DITA-OT installation directory:</p>
 | 
						|
    <pre class="pre codeblock"><code><span class="keyword cmdname">dita</span> <span class="keyword parmname">--project</span>=<var class="keyword varname">samples/project-files/distribution-docs.xml</var></code></pre>
 | 
						|
    <p class="p">The <span class="ph filepath"><var class="keyword varname">dita-ot-dir</var>/docsrc/samples</span><span class="ph filepath">/project-files/all.xml</span> file includes all
 | 
						|
      three project deliverables as follows:</p>
 | 
						|
    <pre class="pre codeblock language-xml normalize-space show-whitespace"><code><project xmlns="https://www.dita-ot.org/project">
 | 
						|
  <include href="html.xml"/>
 | 
						|
  <include href="htmlhelp.xml"/>
 | 
						|
  <include href="pdf.xml"/>
 | 
						|
</project></code></pre>
 | 
						|
  </div>
 | 
						|
<nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/using-project-files.html" title="DITA-OT 3.4 introduces new project files to define publication projects with multiple deliverables. Projects specify a context, output folder, and publication for each deliverable. A re-usable context groups source files and filters, and a publication defines an output format with transformation parameters. You can pass a project file to the dita command to publish multiple deliverables at once.">Publishing with project files</a></div></div></nav></article></main></body></html> |