I've since removed the dbhtml-dir customization and in its place customized
the chunk-filename mode (chunk-code.xsl) instead:

<xsl:template match="*" mode="chunk-filename" priority="1">
...
  <!--
  <xsl:if test="$fn != ''">
    <xsl:call-template name="dbhtml-dir"/>
  </xsl:if>
  -->

  <xsl:choose>
    <xsl:when test="local-name(.) = 'book'">
      <xsl:text>topfolder/</xsl:text>
    </xsl:when>
    <xsl:otherwise>
      <xsl:text>topfolder/subfolder/</xsl:text>
    </xsl:otherwise>
  </xsl:choose>
...
</xsl:template>

Ken


On Feb 14, 2008 4:30 PM, Ken Morse <[EMAIL PROTECTED]> wrote:

> Is there a way to have only the root element chunk go to a different
> folder than the other chunk files without resorting to a dbhtml dir
> processing instruction?
>
> With recent versions of Macintosh OS X, it's typical to have the root
> element (index.html) in a top-level folder, and the rest of the html files
> in a subfolder. I've got this partially working by putting the output in the
> subfolder using base.dir and then using a customized dbhtml-dir template
> that puts sets the output directory to the parent only when the current
> element being processed is book:
>
> <xsl:template name="dbhtml-dir">
> ...
>   <xsl:if test="local-name(.) = 'book'">
>     <xsl:text>../</xsl:text>
>    </xsl:if>
> </xsl:template>
>
> This works for all the pages but index.html -- for this root element chunk
> the links are incorrect -- the links in the index.html page (toc, etc.)
> are pointing to the parent folder of index.htm, rather than index.htm's
> subfolder that contains the rest of the chunked files. The links of the
> files in the subfolder appear to all be correct, even the links that point
> to the root page.
>
> Is there some more specific customization I could apply for the first page
> that would properly handle these links?
>
> Thanks,
> Ken
>
>

Reply via email to