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


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"
               mode="hhc">
   <xsl:variable name="title">
     <xsl:if test="$htmlhelp.autolabel=1">
       <xsl:variable name="label.markup">
         <xsl:apply-templates select="." mode="label.markup"/>
       </xsl:variable>
       <xsl:if test="normalize-space($label.markup)">
         <xsl:value-of 
select="concat($label.markup,$autotoc.label.separator)"/>
       </xsl:if>
     </xsl:if>
     <xsl:call-template name="escape-attr">
       <xsl:with-param name="value">
         <xsl:apply-templates select="." mode="title.markup"/>
       </xsl:with-param>
     </xsl:call-template>
   </xsl:variable>

   <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
     <xsl:text disable-output-escaping="yes">&lt;LI&gt; &lt;OBJECT 
type="text/sitemap"&gt;
       &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:call-template>
       <xsl:text disable-output-escaping="yes">"&gt;
     &lt;/OBJECT&gt;</xsl:text>
   </xsl:if>
   <xsl:if test="section|sect1">
     <xsl:text disable-output-escaping="yes">&lt;UL&gt;</xsl:text>
       <xsl:apply-templates
	select="section|sect1"
	mode="hhc"/>
     <xsl:text disable-output-escaping="yes">&lt;/UL&gt;</xsl:text>
   </xsl:if>
</xsl:template>


-- 
-----------------------------------------------------------------
   Jirka Kosek  	
   e-mail: jirka@kosek.cz
   http://www.kosek.cz

S/MIME Cryptographic Signature



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