Tailoring XHTML output

XHTML tailoring overview

The Toolkit supports several <property> settings that can be used to customize the appearance of XHTML output. XHTML is generated when the "transtype" property has the value "xhtml". The following table shows which properties you can set that affect the appearance of your XHTML output:

Parameter Definition, Usage Examples
args.ftr URI of the file containing XHTML to be placed in the body running-footer area of the output file. The file must be well-formed XML. Example: <property name="args.ftr" value="file:/C:/sandbox/myftr.xml"/>
args.hdf URI of the file containing XHTML to be placed in the head area of the output file. The file must be well-formed XML. Example: <property name="args.hdf" value="file:/C:/sandbox/myhdf.xml"/>
args.hdr URI of the file containing XHTML to be placed in the running-header area of the output file. The file must be well-formed XML. Example: <property name="args.hdr" value="file:/C:/sandbox/myhdr.xml"/>

Instructions for tailoring XHTML ouput (specific example)

Assume DITA source files are stored in C:/sandbox. In the sandbox directory are files myhdr.xml and myftr.xml. The files must be well-formed XML, so myftr.xml might look like this:

<p>DRAFT</p>
		

In the Ant script that builds the XHTML target, add properties for args.hdr and args.ftr. The target in the Ant script would look like this:

		
<target name="tk2xhtml">
<ant antfile="${basedir}${file.separator}conductor.xml" target="init">
<property name="args.input" value="doc/toolkit.ditamap"/>
<property name="output.dir" value="out/toolkit/xhtml"/>
<property name="transtype" value="xhtml"/>
<property name="dita.extname" value=".dita"/>
<property name="args.hdr" value="file:/C:/sandbox/myhdr.xml"/>
<property name="args.ftr" value="file:/C:/sandbox/myftr.xml"/>
</ant>
</target>