The dita2htmlImpl.xsl stylesheet provides code stubs that extend the appearance of your HTML result document. If you copy these stubs into your override stylesheet and provide your own code within them, the result content will be pasted into appropriate parts of the overall HTML page.
Regions that can be modified by these stubs include header, footer, topic-top blurbs (a common location for mini-contents boxes), self-contained scripts (such as JavaScript used commonly for DHTML support), self-contained styles, flagging based on property value matches, panel titles and prefixes for panel titles (to auto-generate explicit bookmarks for your users). See the section of dita2htmlImpl.xsl called start of override stubs for the examples of mostly empty stubs that you can modify.
For example, copy the following template rule into an override file, such as a copy of dita2xhtml.xsl, to generate a mini table of contents at the top of a topic that directly nests child topics:
<!-- override for main stub --> <xsl:template name="gen-user-sidetoc"> <!-- if there are nested topics... --> <xsl:if test="descendant::*[contains(@class,' topic/topic ')]"> <p> <table width="150" align="right" border="1" frame="box" rules="none"> <tr><td height="5" bgcolor="#0033CC" align="center"> <b><font color="#FFFFFF">Contents:</font></b></td> </tr> <xsl:for-each select="descendant::*[contains(@class,' topic/topic ')]"> <xsl:variable name="ttext"><xsl:value-of select="*[contains(@class,' topic/title ')]"/></xsl:variable> <tr><td class="toc">- <a href="#{generate-id()}"><xsl:value-of select="$ttext"/></a> <!--recursive call for subtopics here"/--> </td></tr> </xsl:for-each> </table> </p> </xsl:if> </xsl:template>