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: RE: [docbook-apps] HTMLHelp questions

Some caveats: if you change the toc as Jirka suggests (we did something
similar), then the empty topics will still be in the help project.
Though there's no way to get to them from the chm's toc pane, you'll
still see them if you do a search for a word that's in the chapter title
and they'll still be in the page sequence if you have next/prev links in
the header or footer. 

Our solution was to turn on chapter tocs and turn off navigation
(next/prev) links. That way if you do come upon a phantom topic in a
search, it won't look too weird. Also, if you have content before the
first section or sect1, then that content only shows up on the phantom
topic, so it's effectively out of the help file. 

The ideal solution would be to have the htmlhelp xsls test to see if a
topic--whether a chapter or a section--would be empty (i.e. check to see
if there's content between the title and a following sibling section or
sect#), and to leave it out of the hhc, omit generating an html file,
and still generate correct next/prev links in the surrounding pages.
That's a lot of complicated stuff to mess with tho. 


-----Original Message-----
From: Jirka Kosek [mailto:jirka@kosek.cz] 
Sent: Wednesday, June 04, 2003 7:39 AM
To: Kenneth Johansson
Subject: Re: [docbook-apps] HTMLHelp questions

Kenneth Johansson wrote:

> 2a) Can I remove titles from chapter level? I've currently set
> "chunk.first.sections" to 1 but it only moves the first section and
> leaves the first page of the chapter empty with the chapter title
> intact.
> 2b) I would like to go even further if possible and make my HTMLHelp
> tree view behave exactly like i.e. MS Word. All the book-symbols in
> MS Word are only used like a wrapper which expands and reveals the
> subsections below it. The book-symbol doesn't contain any info. Is it
> possible to customize DocBook HTMLHelp this much?
> I suppose it would require some customization of the Chunking XSL
> stylesheets as well.

Adding following template to your customization layer might work. It is 
untested, but basic idea is to point from ToC entry for chapter directly

  to the first section.

<xsl:template match="chapter"
   <xsl:variable name="title">
     <xsl:if test="$htmlhelp.autolabel=1">
       <xsl:variable name="label.markup">
         <xsl:apply-templates select="." mode="label.markup"/>
       <xsl:if test="normalize-space($label.markup)">
     <xsl:call-template name="escape-attr">
       <xsl:with-param name="value">
         <xsl:apply-templates select="." mode="title.markup"/>

   <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
     <xsl:text disable-output-escaping="yes">&lt;LI&gt; &lt;OBJECT 
       &lt;param name="Name" value="</xsl:text>
           <xsl:value-of select="normalize-space($title)"/>
       <xsl:text disable-output-escaping="yes">"&gt;
       &lt;param name="Local" value="</xsl:text>
           <xsl:call-template name="href.target.with.base.dir">
             <xsl:with-param name="object" select="(section|sect1)[1]"/>
       <xsl:text disable-output-escaping="yes">"&gt;
   <xsl:if test="section|sect1">
     <xsl:text disable-output-escaping="yes">&lt;UL&gt;</xsl:text>
     <xsl:text disable-output-escaping="yes">&lt;/UL&gt;</xsl:text>

   Jirka Kosek  	
   e-mail: jirka@kosek.cz

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