branding

Allows users to include DITA CMS objects that are outside of the source object's dependencies (image, topic, map, snapshot) when generating the output.

For example, this can be used to include a copyright notice provided by the legal department, boilerplate text, branding information, or image logos when generating the output of a document.

This tasks works as follows:
  • Your provide the path of the DITA CMS objects in a branding file (branding.xml).
  • In your transformation scenario, you call the branding task to retrieve from the Content Store the documents defined in the branding.xml file. You can then use these documents in your transformation scenario to generate your output.

branding.xml file

The branding.xml file provides the path of the DITA CMS objects to extract from the Content Store.

The Output Generator provides a template for this file (branding.xml.empty) in the %OutputGenDir%\data\resources\client directory. This file has the following elements:
Table 1. branding.xml elements
Element Description
<brand type="type"> Defines a set of DITA CMS objects to extract. You can organize the objects by output type, branding type, etc. Find a type that best suits your needs. In the branding task, you will specify this brand type to extract the files that it defines.
<path> Absolute path to the DITA CMS object in the Content Store, starting from the /content/ collection.

The branding.xml file must be stored in the %OutputGenDir%\data\resources\client directory.

The following code shows a sample branding.xml file. In this example, three types are defined: PDF, PDFManual, and legal.
<branding>
   <brand type="PDF">
      <path>/content/authoring/qwe1254785412547.image</path><!-- header image -->
      <path>/content/authoring/tds6584265136551.image</path><!-- footer image -->
   </brand>
  <brand type="PDFManual">
      <path>/content/authoring/jfc5847681245687.image</path><!-- manual header image -->
      <path>/content/authoring/kyx2846816574225.image</path<!-- manual footer image -->
   </brand>
   <brand type="legal">
      <path>/content/authoring/kbx5472682263654.xml</path><!-- legal topic -->
   </brand>
</branding>

Syntax

<branding outdir="output_directory" 
           file="/branding.xml"
           fullpath="true/false">
           <key>branding type defined in branding.xml</key>
</branding>

Parameters

Attribute Description Type Required
outdir Directory where to save the files retrieved from the Content Store. String Yes
file Name of the branding file. You must enter "/branding.xml".
Note: This attribute will be more flexible in a future release.
String Yes
fullpath Specifies whether to include the TEXTML Server collection in the path when saving the files. If set to true, the TEXTML collection is added to the save path. boolean No. Default is false.
One or more <key> elements One or more brand types defined in the branding file. String No

Requirements

You must add the following path in the %OutputGenDir%\conf\client\classpath.conf file, otherwise the branding task will not work:
wrapper.java.classpath.x=../data/resources/client
Where

x is the next sequential number available. For example:

wrapper.java.classpath.100=../data/resources/client

This is a temporary requirement and will be removed in a future release.

Example

<branding outdir="${outgen.job.output.dir}/branding" 
                 file="${outgen.resources.dir.client}/branding.xml" fullpath="true">
                <key>PDF</key>
                <key>legal</key>
</branding>