I use the DITA Open Toolkit to convert my DITA files into CHM (HTML Help Worskhop) and tocjs (HTML) format.
I need to copy the content of 1 topic into all the others topics of my map (like a header file for example).
I tested to create a header template :
<xsl:template name="ShortDescriptionTemplate">
<p class="Dx:ShortDescription"> <!--<xsl:apply-templates select="*[contains(@class,' topic/shortdesc ')]"/>--> <xsl:variable name="shortDv1"><xsl:apply-templates select="shortdesc"/></xsl:variable> <xsl:value-of select="normalize-space($shortDv1)"/> </p><xsl:value-of select="$newline"/> </xsl:template>
<xsl:template match="/|node()|@*" mode="gen-user-header">
<div id="header"> <xsl:if test="contains(@class,' topic/topic ')"> <xsl:text>Bonjour 1</xsl:text><!-- Works!!! Displays on all topics --> <xsl:call-template name="ShortDescriptionTemplate"/> <!-- Doesn't Works!!! Displays on my shortdesc topic but nothing in the others topics--> <xsl:copy-of select="shortdesc"/> <!-- nothing in the others topics--> </div> </xsl:template>
Someone to help me ?
Thanks,