This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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:

  <title>
  About This Guide
  </title>

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.

Regards,
Dan

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

------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-apps-request@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]