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] | [Elist Home]

Subject: DOCBOOK-APPS: Solution to funky TOCs in HTML Help...

I have just this morning sent a fix to Jirka for an issue with generating
HTML Help from DocBook XML.  The TOC that appeared in the left-side menu of
the compiled help file (.CHM) would sometimes be messed up with extra line
returns.   I tracked it down to the case where I did:

  About This Guide

instead of:

  <title>About This Guide</title>

The newlines in the first case would appear literally in toc.hhc
and would mess up the TOC in the .CHM file.  I figured out how to solve
the problem, though, by adding a fix to 'htmlhelp-common.xsl'. Everywhere
where Jirka has:

  <xsl:value-of select="$title"/>

I added the 'normalize-space()' funcation like this:

  <xsl:value-of select="normalize-space($title)"/>

This function gets rid of any white space before or after the text of
the title.  It worked great for me using the 1.41 stylesheets and the
'xsltproc' processor (from libxslt).  Don't know if it works with
Saxon or Xalan.

I sent the version I used off to Jirka this morning, but thought I 
would pass along the info because I know a number of people mentioned
having difficulties along these lines.


P.S. The other solution, of course, is simply to make sure that all
titles are on one line.

Dan York, Director of Training        dyork@e-smith.com
Ph: +1-613-751-4401  Mobile: +1-613-263-4312 Fax: +1-613-564-7739 
Mitel Network Corporation Network Server Solutions Group 
150 Metcalfe St., Suite 1500, Ottawa,ON K2P 1P1 Canada
http://www.e-smith.com/            open source, open mind

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

Powered by eList eXpress LLC