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: [FILES] section of htmlhelp.hhp contains document text when htmlhelp.xsl is used with chunktoc.xsl


I try to use manually controlled chunking with htmlhelp output. I followed the instructions in Bob Stayton's book (maketoc.xsl -> chunktoc.xsl) and I got the html output chunked the way I wanted, but the [FILES] section of the generated htmlhelp.hhp contains plain document text (merged text nodes) instead of file names. If I manually fix the [FILES] section of htmlhelp.hhp I can compile the help project and I get the expected chm file.

I would appreciate it if someone could confirm that this is an existing bug or someone could tell me if I am doing something wrong and help me to solve this problem.

1. I have made this simple book for testing:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
<book id="book1">
  <chapter id="chap1">
    <title>Chapter 1</title>
    <section id="chap1__sec1">
      <title>Section 1</title>
      <section id="chap1__sec1__sec1">
        <title>Section 1_1</title>
      <section id="chap1__sec1__sec2">
        <title>Section 1_2</title>
    <section id="chap1__sec2">
      <title>Section 2</title>

2. My TestBooktoc.xml contains this:
<toc role="chunk-toc">
  <tocentry linkend="book1"><?dbhtml filename="index.html"?>
    <tocentry linkend="chap1"><?dbhtml filename="ch01.html"?>
      <tocentry linkend="chap1__sec1"><?dbhtml filename="ch01s01.html"?>
      <tocentry linkend="chap1__sec2"><?dbhtml filename="ch01s02.html"?>

3. I replaced chunk.xsl with chunktoc.xsl in my htmlhelp.xsl so now it looks like this:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
<xsl:import href="html/chunktoc.xsl"/>
<xsl:include href="htmlhelp/htmlhelp-common.xsl"/>

4. I run myhtmlhelp.xsl with the following parameters:
generate.toc=book toc,figure
use.id.as.filename=1 - It's not documented (at least I could not find any hint), but I had to realize that this does not work with chunktoc.xsl (maketoc.xsl also generates automatic file names).

5. Running the stylesheet gives properly chunked html files with auto-generated filenames: ch01.htm, ch01s01.html, ch01s02.html.

6. The generated htmlhelp.hhp file looks like this with document text in the [FILES] section:
Binary TOC=Yes
Compatibility=1.1 or later
Compiled file=htmlhelp.chm
Contents file=toc.hhc
Default Window=Main
Default topic=index.html
Display compile progress=Yes
Full-text search=Yes
Language=0x0409 English (UNITED STATES)
Enhanced decompilation=No


BookChapter 1Section 1para1.Section 1_1para1_1Section 1_2para1_2Section 2para2

If I use chunk.xsl instead of chunktoc.xsl the [FILES] section is generated properly. I guess that when I use chunktoc.xsl the <xsl:apply-templates select="/" mode="enumerate-files"/> instruction in htmlhelp-common.xsl does not find matching template rule to generate the [FILES] section so it simply copies all text nodes to the output.

I use 1.73.1 version of the XSL Stylesheets and Saxon 6.5.


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