← Prev in month ← Prev in thread

DOCBOOK-APPS: HTMLHelp, base dir missing from filepaths in alias.h

From
Rob Smith <>
Date
2002-01-24T11:16:13+00:00
ID
001f01c1a4c8$1f9be750$
Thread
DOCBOOK-APPS: HTMLHelp, base dir missing from filepaths in alias.h
Hi,
There seems to be a bug in the htmlhelp.xsl template that generates the
alias.h file. I have set params to create the topic files in a subdirectory:

	<xsl:param name="base.dir" select="'html/'"/>
	<xsl:param name="use.id.as.filename" select="1"/>

but the entries in alias.h do not include the base directory, so I get:
	IDH_ERR_COPYFILE=IDH_ERR_COPYFILE.html
which should be:
	IDH_ERR_COPYFILE=html/IDH_ERR_COPYFILE.html

I fixed the problem by overriding the template as follows in my driver
stylesheet, to include the value of the $base.dir variable in the output:

<xsl:template match="processing-instruction('dbhh')" mode="hh-alias">
  <xsl:variable name="topicname">
    <xsl:call-template name="pi-attribute">
      <xsl:with-param name="pis" select="."/>
      <xsl:with-param name="attribute" select="'topicname'"/>
    </xsl:call-template>
  </xsl:variable>
  <xsl:value-of select="$topicname"/>
  <xsl:text>=</xsl:text>
  <xsl:value-of select="$base.dir"/> <!-- LINE INSERTED -->
  <xsl:call-template name="href.target">
    <xsl:with-param name="object" select=".."/>
  </xsl:call-template>
  <xsl:text>&#xA;</xsl:text>
</xsl:template>

It all works beautifully now. Should this change be made to htmlhelp.xsl in
the docbook distribution?

Regards,
	Rob Smith
← Prev in month ← Prev in thread