Edit online

This section includes examples that can be used as a starting point for various customizations using XSLT and CSS.

Edit online

If a DITA Task only contains one step (<step> element), you probably want it to be rendered like an unordered list (displayed with a bullet instead of a number).

        <cmd>The step</cmd>
Should be rendered as:
 o The step
Instead of:
  1. The step

To achieve this, you need to create an XSLT template that adds a special @outputclass attribute (with its value set to single) for the single step, then you need to match this attribute from the CSS and change its aspect.

  1. In the customization XSL, add:
    <xsl:template match="*[contains(@class, ' task/step ')][count(../*[contains
    (@class, ' task/step ')]) = 1]">
             <xsl:copy-of select="@*"/>
             <xsl:attribute name="outputclass" select="concat(@outputclass, ' single ')"/>
  2. In your customization CSS, add:
    *[outputclass ~= "single"] {
        list-style-type:circle !important;