#115 Write HH Index and Contents as HTML Files

closed
Jirka Kosek
XSL (122)
5
2005-09-16
2004-10-17
No

.hhc and .hhk files used for contents and index in
HtmlHelp are actually HTML files and should be written
accordingly to ease customization.

--- docbook-xsl-1.66.1\htmlhelp\htmlhelp-common.xsl Mon
Aug 30 09:31:28 2004
+++ docbook-xsl-1.66.1\htmlhelp\htmlhelp-common_.xsl
Sun Oct 17 23:53:22 2004
@@ -467,14 +467,14 @@
stuff instead. -->

<xsl:template name="hhc">
- <xsl:call-template name="write.text.chunk">
+ <xsl:call-template name="write.chunk">
<xsl:with-param name="filename">
<xsl:if test="$manifest.in.base.dir != 0">
<xsl:value-of select="$base.dir"/>
</xsl:if>
<xsl:value-of select="$htmlhelp.hhc"/>
</xsl:with-param>
- <xsl:with-param name="method" select="'text'"/>
+ <xsl:with-param name="indent" select="'yes'"/>
<xsl:with-param name="content">
<xsl:call-template name="hhc-main"/>
</xsl:with-param>
@@ -928,14 +928,14 @@
<!--
====================================================================
-->

<xsl:template name="hhk">
- <xsl:call-template name="write.text.chunk">
+ <xsl:call-template name="write.chunk">
<xsl:with-param name="filename">
<xsl:if test="$manifest.in.base.dir != 0">
<xsl:value-of select="$base.dir"/>
</xsl:if>
<xsl:value-of select="$htmlhelp.hhk"/>
</xsl:with-param>
- <xsl:with-param name="method" select="'text'"/>
+ <xsl:with-param name="indent" select="'yes'"/>
<xsl:with-param name="content"><xsl:text
disable-output-escaping="yes"><![CDATA[<!DOCTYPE HTML
PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>

Discussion

1 2 > >> (Page 1 of 2)
  • Jirka Kosek
    Jirka Kosek
    2004-10-22

    • assigned_to: nobody --> kosek
    • status: open --> closed
     
  • Jirka Kosek
    Jirka Kosek
    2004-10-22

    Logged In: YES
    user_id=189932

    This is not possible as HTML Help compiler chokes on files that
    are generated with HTML output method. I don't remember
    these minor syntax differences, but I remember that HTML
    output method didn't worked and I must switch to text
    method to output code that was exactly expected by
    compiler.

     
    • status: closed --> open
     
  • Logged In: YES
    user_id=669020

    Can you test this with latest HTML Help package from MS
    (versions 1.42 or 1.43)? These customizings seem to work
    well in PHP Documentation project.
    http://cvs.php.net/phpdoc/xsl/htmlhelp.xsl

     
    • milestone: --> output: HTMLHelp/JavaHelp/EclipseHelp
     
  • Logged In: YES
    user_id=669020

    Can you test this one more time? I'm almost sure you had
    troubles in some other part of template. I was unable to
    make MS htmlhelp compiler to crash or fail with this
    template and I'd be glad to get some proof of concept to
    close this patch.

     
  • Jirka Kosek
    Jirka Kosek
    2005-07-05

    Logged In: YES
    user_id=189932

    I see that you are just proposing to change method="text" to
    method="html". How this would make customizing easier?

    The real problem is that templates must use d-o-e to emit HTML
    code, because MS help complier was very sensitive in this
    respect. Getting rid of those d-o-e would be good, but I remember
    that I must use d-o-e to overcome problems in HH. There were
    also some problems with Xalan and I know that current code just
    works and I'm not very tempted by idea to refactor code and test it
    with different XSLT processors (read no time for this).

    If you can spend some time on it, please remove also all d-o-e
    from code and test it at least against Saxon, Xalan-J and xsltproc.
    If it would produce code that HH compiler can process I will apply
    your patch.

    Thanks!

     
  • Logged In: YES
    user_id=669020

    MS Help Compiler is very sensitive to whitespaces. See
    comment about whitespaces on
    http://mail-archives.apache.org/mod_mbox/httpd-cvs/200304.mbox/%3C20030422044547.40336.qmail@icarus.apache.org%3E

    I've almost finished patches to send. The difference in
    output for html method instead of text for every XSTL engine
    is in whitespaces only. I think the warning above should be
    included somewhere in documentation also.

     
  • Logged In: YES
    user_id=669020

    All testes passed nicely on Xalan, Saxon and Xsltproc. I've
    attached my testing suite for windows, so you'll be able to
    try it on different XML. ToC and index view should be the
    same in .chm files from html and text mode templates.

    Edit .hhc file and remove some linefeeds between <object>
    and <param> tags to view incorrect ToC entries in resulting CHM.

    I've also attached patch for htmlhelp-common template.

     
1 2 > >> (Page 1 of 2)