This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]