Transformations
Using the Transformation Wizard, you can insert boilerplate content or code into every topic in your targets
You can add transformations to NetHelp, HTML Help, EPUB, JavaHelp, Eclipse Help, Microsoft Help Viewer, and Microsoft Help 2.0 Help targets.
Transformation files created with the wizard can be used in any project.
Custom HTML5 code can be defined for the following places in a topic:
- Inside the <head> element (e.g., scripts, CSS, metadata)
- At the beginning of topic text (i.e., above the topic title)
- At the end of topic text
- Select the Target ribbon.
- Click the Target Properties button. The Help Targets dialog opens.
- In the Advanced section, next to the XML transformation field, click . The Transformation Wizard opens.
- Enter your custom code in the appropriate section(s): <head> element, beginning of topic, or end of topic.
-
Click Save. You are prompted to name and save the file. The transformation file created (*.config) is stored at the root of your Doc-To-Help project folder. (This location is the default, but you can store it anywhere.)
After you build your target, the code will be inserted in each topic of the target.
If would like to reuse the transformation file in another project, do the following:
- In Word, click the Target Properties button on the Target ribbon. The Help Targets dialog opens.
- In the Advanced section, next to the XML transformation field, click .
- Navigate to the *.config file, select it, and click Open.
Example
There is an example transformation named "timestamp.config" that will add timestamp text to each topic of a target. It is located at: C:\Program Files (x86)\MadCap Software\DocToHelp\Transforms\Examples\Timestamp
Example
To insert keywords in the <head> element of each topic, add this to the first field of the Transformation Wizard.
<meta name="keywords" content="help authoring tool, doc-to-help, doctohelp, online help"/>
Example
To insert a distinctive header (green, bold, and italic) in each topic, add this to the middle field of the Transformation Wizard.
<div style="font-size:large; font-style:italic; color:green; font-weight:bold" >
Draft Version 1.1, for Internal Review Only
</div>
Example
To insert a footer with a logo and hyperlink in each topic, add this to the last field of the Transformation Wizard.
<div style="width:90%">
<hr style="color:#CCCCCC" />
<div style="float: left">
<img src="http://www.madcapsoftware.com/newimages/company/icon.png" alt="MadCap Logo" />
</div>
<div style="float: right">
MadCap Software<br />
San Diego, CA<br />
<a href="http://www.madcapsoftware.com" target="_blank">madcapsoftware.com</a>
</div>
</div>
Note Verify that the Generate XHTML check box is selected in the Help Targets dialog before building your target. It is selected by default in most targets.
Note Transformations cannot be used with Manual targets.
Note You can also add programmatic and XSLT transformations to your projects.