OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: Chunked files output directory for root element


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 <kenneth.morse@gmail.com> 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




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]