The DITA OT seems to have a limitation that causes it to fail to put CSS links into the TOC file as you might expect it to. There is code there that looks like it should work, and I don't see why it is failing when the CSS links (that use similar code) work for the individual HTML topic files.
The main file that does the Multiple HTML transform is this:
<dita ot>\xsl\map2xhtmtoc.xslIt doesn't really do much except set up the XSLT output to be XML (to produce XHTML output) and then import this file, which does most of the work for the TOC:
map2htmtoc.xslThat file is where most of the magic for the TOC happens.
It contains this template that should build up and insert CSS links:
<xsl:template name="generateCssLinks">
<xsl:variable name="urltest">
<xsl:call-template name="url-string">
<xsl:with-param name="urltext">
<xsl:value-of select="concat($CSSPATH,$CSS)"/>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:if test="string-length($CSS)>0">
<xsl:choose>
<xsl:when test="$urltest='url'">
<link rel="stylesheet" type="text/css" href="{$CSSPATH}{$CSS}" />
</xsl:when>
<xsl:otherwise>
<link rel="stylesheet" type="text/css" href="{$PATH2PROJ}{$CSSPATH}{$CSS}" />
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="$newline"/>
</xsl:if>
</xsl:template> My tests show that this is failing for some reason, but I can't figure out why.
If you need a solution immediately I'd just hard code what you need into the main template and leave it at that for now. The easiest way to do that is to change the following. My new stuff is in
blue. You would obviously change the text "insert your path here" to be your actual path.
<!-- *********************************************************************************
Setup the HTML wrapper for the table of contents
********************************************************************************* -->
<xsl:template match="/">
<html>
<xsl:value-of select="$newline"/>
<head>
<xsl:value-of select="$newline"/>
<xsl:if test="string-length($contenttarget)>0 and
$contenttarget!='NONE'">
<base target="{$contenttarget}"/>
</xsl:if>
<xsl:choose>
<xsl:when test="/*[contains(@class,' map/map ')]/*[contains(@class,' topic/title ')]">
<title>
<xsl:value-of select="/*[contains(@class,' map/map ')]/*[contains(@class,' topic/title ')]"/>
</title>
<xsl:value-of select="$newline"/>
</xsl:when>
<xsl:when test="/*[contains(@class,' map/map ')]/@title">
<title>
<xsl:value-of select="/*[contains(@class,' map/map ')]/@title"/>
</title>
<xsl:value-of select="$newline"/>
</xsl:when>
</xsl:choose>
<xsl:call-template name="generateCssLinks"/>
<xsl:call-template name="gen-user-head"/>
<xsl:call-template name="gen-user-scripts"/>
<xsl:call-template name="gen-user-styles"/>
<link rel="stylesheet" type="text/css" href="insert your path here" />
</head>
<xsl:value-of select="$newline"/>
<body>
<xsl:if test="string-length($OUTPUTCLASS) > 0">
<xsl:attribute name="class">
<xsl:value-of select="$OUTPUTCLASS"/>
</xsl:attribute>
</xsl:if>
<xsl:value-of select="$newline"/>
<xsl:apply-templates/>
</body>
<xsl:value-of select="$newline"/>
</html>
</xsl:template>If I have some time I might have a look further to see what is really going on there. I suspect this should already be a known issue and that it likely would have a bug listed at the DITA OT project at SourceForge:
http://sourceforge.net/tracker/?group_id=132728&atid=725074