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


Hi

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"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd";>
<book id="book1">
  <title>Book</title>
  <chapter id="chap1">
    <title>Chapter 1</title>
    <section id="chap1__sec1">
      <title>Section 1</title>
      <para>para1.
      <section id="chap1__sec1__sec1">
        <title>Section 1_1</title>
        <para>para1_1</para>
      </section>
      <section id="chap1__sec1__sec2">
        <title>Section 1_2</title>
        <para>para1_2</para>
      </section>
    </section>
    <section id="chap1__sec2">
      <title>Section 2</title>
      <para>para2</para>
    </section>
  </chapter>
</book>

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>
      <tocentry linkend="chap1__sec2"><?dbhtml filename="ch01s02.html"?>
      </tocentry>
    </tocentry>
  </tocentry>
</toc>  

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";
                version="1.0">
<xsl:import href="html/chunktoc.xsl"/>
<xsl:include href="htmlhelp/htmlhelp-common.xsl"/>

4. I run myhtmlhelp.xsl with the following parameters:
chunk.section.depth=3
chunk.toc=TestBooktoc.xml
generate.section.toc.level=0
generate.toc=book toc,figure
htmlhelp.use.hhk=1
saxon.character.representation=native;decimal
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:
[OPTIONS]
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)
Title=Book
Enhanced decompilation=No

[WINDOWS]
Main="Book","toc.hhc",,"index.html","index.html",,,,,0x2520,,0x703006,,,,,,,,0

[FILES]
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.

Regards
Tamas



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