WinANT Help

 

WinANT Omit Short Description Feature

This topic describes how the Omit shortdesc feature works in the WinANT program.

The default DITA Open Toolkit transformers generate the <shortdesc>element into the top of the output topic. Many DITA users see the shortdesc element purely as metadata, and that it therefore should not appear in the topic itself.

A feature in WinANT, known as the Omit shortdesc feature, provides a way of selecting whether the shortdesc appears in the output. Its use requires some minor changes to the Open Toolkit XSL files to allow a parameter to be passed from WinANT through the build file.

To implement the Omit shortdesc feature, the XSL-T file was modified to remove the <shortdesc> element from the output, and that modified file saved as a new file (dita2xhtml_Impl_noshortdesc.xsl).

When a DITA collection is being processed, the Ant processor looks for an args.xsl parameter in the build file to override the default XSL transform file for the type of transformation (transtype). When the Omit shortdesc option is set in WinANT, the program adds that args.xsl parameter to the build file by adding the following line:

<param args.xsl="c:\dita-ot\xsl\xslhtml\dita2xhtml_Impl_noshortdesc.xsl" />

This results in the modified XSL file being used for processing, instead of the standard XSL file.

The modification to the XSL file was to set the style of the paragraph into which the <shortdesc> is generated to have a display attribute of none. The modified section of the XSL is as follows:

<!-- called shortdesc processing - para at start of topic -->
<xsl:template match="*[contains(@class,' topic/shortdesc ')]" mode="outofline">
<!-- HYPERWRITE CHANGE - added style attribute to hide shortdesc content from output-->
<p style="display: none">
<!-- called shortdesc processing - para at start of topic -->
<xsl:call-template name="commonattributes"/>
<xsl:apply-templates/>
</p><xsl:value-of select="$newline"/>
</xsl:template>

Further similar enhancements to WinANT functionality may be added to WinANT in the future.