Joydeep
Joydeep

Reputation: 147

Docbook HTML Help Index

I have been using htmlhelp xsl to produce my htmlhelp files. Until yesterday, the index was there. But from today, I don't see any entry there in the index.hhk file. I am using xsltproc to produce my html help files. Here is my test xml script.

<?xml version='1.0'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
               "http://www.oasis-open.org/docbook/xml/4.5/
docbookx.dtd">
<book lang="en">
<bookinfo><title>My first DocBook document</title></bookinfo>

<chapter>
<title>TEST DOCBOOK</title>
<note>
    <title>This is Note<indexterm><primary>Note</primary></
indexterm></title>
    <para>This is test.</para>
</note>
</chapter>
<index/>
</book>

I used xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/htmlhelp/ htmlhelp.xsl test.xml to transform my xml files to htmlhelp files.

Now my index.hhk file always looks like this.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://
                       www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1">
<!-- Sitemap 1.0 -->
</HEAD><BODY>
<OBJECT type="text/site properties">
</OBJECT>
<UL>
</UL>
</BODY></HTML>

I don't know what's going wrong here. Please help.

Thanks.

Upvotes: 0

Views: 385

Answers (1)

Nordic Mainframe
Nordic Mainframe

Reputation: 28747

You'll need to set the stringparam htmlhelp.use.hhk to 1, if you want the hhk to be populated with extracted indexterms.

Quote from from "DocBook XSL - The Complete Guide" (http://www.sagehill.net/docbookxsl/HtmlHelp.html#HHGenIndex)

The htmlhelp.use.hhk parameter controls how your indexterm elements are converted to index entries. If htmlhelp.use.hhk is set to zero, then the stylesheet inserts an OBJECT element similar to the above example into the HTML output for each indexterm. If the parameter is set to 1, then the terms are instead put into the index.hhk file. You will still get a index.hhk file if the parameter is set to zero, but it will be almost empty. You can ignore the warning issued by the compiler about the empty file.

I've just checked it and apparently it works.

Sorry for being 5 years 4 Months late.

Upvotes: 0

Related Questions